diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-05-05 17:45:12 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-14 13:30:33 +0200 |
commit | 3f2a790190da4f40ea6d8a976aa1929b2a1b002b (patch) | |
tree | 752ee84451954e9ea5e6d4133e18e41aaee2f7b1 /core/src/main/kotlin/pages/ContentNodes.kt | |
parent | a440f0cb8756019131a2c15389e747aea3c585e7 (diff) | |
download | dokka-3f2a790190da4f40ea6d8a976aa1929b2a1b002b.tar.gz dokka-3f2a790190da4f40ea6d8a976aa1929b2a1b002b.tar.bz2 dokka-3f2a790190da4f40ea6d8a976aa1929b2a1b002b.zip |
Changing approach from platform-driven to source-set-driven
Diffstat (limited to 'core/src/main/kotlin/pages/ContentNodes.kt')
-rw-r--r-- | core/src/main/kotlin/pages/ContentNodes.kt | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt index 26bcdf77..bb669199 100644 --- a/core/src/main/kotlin/pages/ContentNodes.kt +++ b/core/src/main/kotlin/pages/ContentNodes.kt @@ -1,6 +1,7 @@ package org.jetbrains.dokka.pages import org.jetbrains.dokka.links.DRI +import org.jetbrains.dokka.model.SourceSetData import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.model.properties.WithExtraProperties @@ -10,7 +11,7 @@ data class DCI(val dri: Set<DRI>, val kind: Kind) { interface ContentNode : WithExtraProperties<ContentNode> { val dci: DCI - val platforms: Set<PlatformData> + val sourceSets: Set<SourceSetData> val style: Set<Style> } @@ -18,7 +19,7 @@ interface ContentNode : WithExtraProperties<ContentNode> { data class ContentText( val text: String, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style> = emptySet(), override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentNode { @@ -27,7 +28,7 @@ data class ContentText( // TODO: Remove data class ContentBreakLine( - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val dci: DCI = DCI(emptySet(), ContentKind.Empty), override val style: Set<Style> = emptySet(), override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() @@ -40,11 +41,11 @@ data class ContentHeader( override val children: List<ContentNode>, val level: Int, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style>, override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentComposite { - constructor(level: Int, c: ContentComposite) : this(c.children, level, c.dci, c.platforms, c.style, c.extra) + constructor(level: Int, c: ContentComposite) : this(c.children, level, c.dci, c.sourceSets, c.style, c.extra) override fun withNewExtras(newExtras: PropertyContainer<ContentNode>): ContentHeader = copy(extra = newExtras) } @@ -54,7 +55,7 @@ data class ContentCode( override val children: List<ContentNode>, val language: String, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style>, override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentComposite { @@ -69,7 +70,7 @@ data class ContentDRILink( override val children: List<ContentNode>, val address: DRI, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style> = emptySet(), override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentLink { @@ -81,7 +82,7 @@ data class ContentResolvedLink( override val children: List<ContentNode>, val address: String, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style> = emptySet(), override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentLink { @@ -95,7 +96,7 @@ data class ContentEmbeddedResource( val address: String, val altText: String?, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style> = emptySet(), override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentLink { @@ -113,7 +114,7 @@ data class ContentTable( val header: List<ContentGroup>, override val children: List<ContentGroup>, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style>, override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentComposite { @@ -125,7 +126,7 @@ data class ContentList( override val children: List<ContentNode>, val ordered: Boolean, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style>, override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentComposite { @@ -136,7 +137,7 @@ data class ContentList( data class ContentGroup( override val children: List<ContentNode>, override val dci: DCI, - override val platforms: Set<PlatformData>, + override val sourceSets: Set<SourceSetData>, override val style: Set<Style>, override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty() ) : ContentComposite { @@ -145,7 +146,7 @@ data class ContentGroup( data class PlatformHintedContent( val inner: ContentNode, - override val platforms: Set<PlatformData> + override val sourceSets: Set<SourceSetData> ) : ContentComposite { override val children = listOf(inner) @@ -171,7 +172,7 @@ interface Kind enum class ContentKind : Kind { Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment, - Empty, Source, TypeAliases, Cover, Inheritors, PlatformDependantHint; + Empty, Source, TypeAliases, Cover, Inheritors, SourceSetDependantHint; companion object { private val platformTagged = |