aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-08-17 10:49:41 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-17 11:52:28 +0200
commitef1bb10aca292e14d8deb35694243fd84fc75341 (patch)
tree2aae938883e6c8d1b35948d2da947b0af955bd54 /plugins/javadoc
parenta2be91ea289ddb1a8634c5fd252243f1b9ab7000 (diff)
downloaddokka-ef1bb10aca292e14d8deb35694243fd84fc75341.tar.gz
dokka-ef1bb10aca292e14d8deb35694243fd84fc75341.tar.bz2
dokka-ef1bb10aca292e14d8deb35694243fd84fc75341.zip
Rename `ContentSourceSet` to `DisplaySourceSet`
Diffstat (limited to 'plugins/javadoc')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt8
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt4
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt34
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt4
4 files changed, 25 insertions, 25 deletions
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
index a72544e2..20fe9831 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPageCreator.kt
@@ -75,7 +75,7 @@ open class JavadocPageCreator(
JavadocContentGroup(
setOf(m.dri),
JavadocContentKind.OverviewSummary,
- m.jvmSourceSets.toContentSourceSets()
+ m.jvmSourceSets.toDisplaySourceSets()
) {
title(m.name, m.brief(), "0.0.1", dri = setOf(m.dri), kind = ContentKind.Main)
leafList(setOf(m.dri),
@@ -94,7 +94,7 @@ open class JavadocPageCreator(
JavadocContentGroup(
setOf(p.dri),
JavadocContentKind.PackageSummary,
- p.jvmSourceSets.toContentSourceSets()
+ p.jvmSourceSets.toDisplaySourceSets()
) {
title(p.name, p.brief(), "0.0.1", dri = setOf(p.dri), kind = ContentKind.Packages)
val rootList = p.classlikes.groupBy { it::class }.map { (key, value) ->
@@ -125,7 +125,7 @@ open class JavadocPageCreator(
JavadocContentGroup(
setOf(c.dri),
JavadocContentKind.Class,
- c.jvmSourceSets.toContentSourceSets()
+ c.jvmSourceSets.toDisplaySourceSets()
) {
title(
c.name.orEmpty(),
@@ -235,7 +235,7 @@ open class JavadocPageCreator(
sourceSets.toSet()
),
dci = DCI(setOf(dri), JavadocContentKind.OverviewSummary),
- sourceSets = sourceSets.toContentSourceSets(),
+ sourceSets = sourceSets.toDisplaySourceSets(),
style = emptySet(),
extra = PropertyContainer.empty()
)
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
index 40e4fa30..d99a571f 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/location/JavadocLocationProvider.kt
@@ -7,7 +7,7 @@ import org.jetbrains.dokka.links.Nullable
import org.jetbrains.dokka.links.parent
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.pages.ContentPage
-import org.jetbrains.dokka.model.ContentSourceSet
+import org.jetbrains.dokka.model.DisplaySourceSet
import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaContext
@@ -64,7 +64,7 @@ class JavadocLocationProvider(pageRoot: RootPageNode, dokkaContext: DokkaContext
private fun JavadocClasslikePageNode.findAnchorableByDRI(dri: DRI): AnchorableJavadocNode? =
(constructors + methods + entries + properties).firstOrNull { it.dri == dri }
- override fun resolve(dri: DRI, sourceSets: Set<ContentSourceSet>, context: PageNode?): String {
+ override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?): String {
return nodeIndex[dri]?.let { resolve(it, context) }
?: nodeIndex[dri.parent]?.takeIf { it is JavadocClasslikePageNode }?.let {
val anchor = when (val anchorElement = (it as? JavadocClasslikePageNode)?.findAnchorableByDRI(dri)) {
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt
index 870d02f6..d1ccb73e 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocContentNodes.kt
@@ -1,7 +1,7 @@
package org.jetbrains.dokka.javadoc.pages
import org.jetbrains.dokka.links.DRI
-import org.jetbrains.dokka.model.ContentSourceSet
+import org.jetbrains.dokka.model.DisplaySourceSet
import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.pages.*
@@ -12,7 +12,7 @@ enum class JavadocContentKind : Kind {
abstract class JavadocContentNode(
dri: Set<DRI>,
kind: Kind,
- override val sourceSets: Set<ContentSourceSet>
+ override val sourceSets: Set<DisplaySourceSet>
) : ContentNode {
override val dci: DCI = DCI(dri, kind)
override val style: Set<Style> = emptySet()
@@ -33,7 +33,7 @@ interface JavadocListEntry {
data class EmptyNode(
val dri: DRI,
val kind: Kind,
- override val sourceSets: Set<ContentSourceSet>,
+ override val sourceSets: Set<DisplaySourceSet>,
override val extra: PropertyContainer<ContentNode> = PropertyContainer.empty()
) : ContentNode {
override val dci: DCI = DCI(setOf(dri), kind)
@@ -41,7 +41,7 @@ data class EmptyNode(
override fun withNewExtras(newExtras: PropertyContainer<ContentNode>): EmptyNode = copy(extra = newExtras)
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): EmptyNode =
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): EmptyNode =
copy(sourceSets = sourceSets)
override fun hasAnyContent(): Boolean = false
@@ -50,7 +50,7 @@ data class EmptyNode(
data class JavadocContentGroup(
val dri: Set<DRI>,
val kind: Kind,
- override val sourceSets: Set<ContentSourceSet>,
+ override val sourceSets: Set<DisplaySourceSet>,
override val children: List<JavadocContentNode>
) : JavadocContentNode(dri, kind, sourceSets) {
@@ -58,7 +58,7 @@ data class JavadocContentGroup(
operator fun invoke(
dri: Set<DRI>,
kind: Kind,
- sourceSets: Set<ContentSourceSet>,
+ sourceSets: Set<DisplaySourceSet>,
block: JavaContentGroupBuilder.() -> Unit
): JavadocContentGroup =
JavadocContentGroup(dri, kind, sourceSets, JavaContentGroupBuilder(sourceSets).apply(block).list)
@@ -68,11 +68,11 @@ data class JavadocContentGroup(
override fun withNewExtras(newExtras: PropertyContainer<ContentNode>): JavadocContentGroup = this
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): JavadocContentGroup =
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): JavadocContentGroup =
copy(sourceSets = sourceSets)
}
-class JavaContentGroupBuilder(val sourceSets: Set<ContentSourceSet>) {
+class JavaContentGroupBuilder(val sourceSets: Set<DisplaySourceSet>) {
val list = mutableListOf<JavadocContentNode>()
}
@@ -83,13 +83,13 @@ data class TitleNode(
val parent: String?,
val dri: Set<DRI>,
val kind: Kind,
- override val sourceSets: Set<ContentSourceSet>
+ override val sourceSets: Set<DisplaySourceSet>
) : JavadocContentNode(dri, kind, sourceSets) {
override fun hasAnyContent(): Boolean = !title.isBlank() || !version.isBlank() || subtitle.isNotEmpty()
override fun withNewExtras(newExtras: PropertyContainer<ContentNode>): TitleNode = this
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): TitleNode =
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): TitleNode =
copy(sourceSets = sourceSets)
}
@@ -108,12 +108,12 @@ data class RootListNode(
val entries: List<LeafListNode>,
val dri: Set<DRI>,
val kind: Kind,
- override val sourceSets: Set<ContentSourceSet>,
+ override val sourceSets: Set<DisplaySourceSet>,
) : JavadocContentNode(dri, kind, sourceSets) {
override fun hasAnyContent(): Boolean = children.isNotEmpty()
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): RootListNode =
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): RootListNode =
copy(sourceSets = sourceSets)
}
@@ -123,11 +123,11 @@ data class LeafListNode(
val entries: List<JavadocListEntry>,
val dri: Set<DRI>,
val kind: Kind,
- override val sourceSets: Set<ContentSourceSet>
+ override val sourceSets: Set<DisplaySourceSet>
) : JavadocContentNode(dri, kind, sourceSets) {
override fun hasAnyContent(): Boolean = children.isNotEmpty()
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): LeafListNode = copy(sourceSets = sourceSets)
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): LeafListNode = copy(sourceSets = sourceSets)
}
@@ -160,7 +160,7 @@ class LinkJavadocListEntry(
val name: String,
val dri: Set<DRI>,
val kind: Kind = ContentKind.Symbol,
- val sourceSets: Set<ContentSourceSet>
+ val sourceSets: Set<DisplaySourceSet>
) :
JavadocListEntry {
override val stringTag: String
@@ -170,7 +170,7 @@ class LinkJavadocListEntry(
private var builtString: String? = null
- fun build(body: (String, Set<DRI>, Kind, List<ContentSourceSet>) -> String) {
+ fun build(body: (String, Set<DRI>, Kind, List<DisplaySourceSet>) -> String) {
builtString = body(name, dri, kind, sourceSets.toList())
}
}
@@ -189,7 +189,7 @@ data class JavadocSignatureContentNode(
) : JavadocContentNode(setOf(dri), kind, signatureWithoutModifiers.sourceSets) {
override fun hasAnyContent(): Boolean = true
- override fun withSourceSets(sourceSets: Set<ContentSourceSet>): JavadocSignatureContentNode {
+ override fun withSourceSets(sourceSets: Set<DisplaySourceSet>): JavadocSignatureContentNode {
return copy(signatureWithoutModifiers = signatureWithoutModifiers.withSourceSets(sourceSets))
}
}
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt
index 3c6bd2ae..cc1995eb 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.javadoc.pages.*
import org.jetbrains.dokka.javadoc.renderer.SearchRecord.Companion.allTypes
import org.jetbrains.dokka.base.renderers.sourceSets
import org.jetbrains.dokka.links.DRI
-import org.jetbrains.dokka.model.ContentSourceSet
+import org.jetbrains.dokka.model.DisplaySourceSet
import org.jetbrains.dokka.model.Documentable
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.utilities.formatToEndWithHtml
@@ -182,7 +182,7 @@ class SearchScriptsCreator(private val locationProvider: JavadocLocationProvider
private fun resolveUrlForSearchIndex(
dri: DRI,
- sourceSets: Set<ContentSourceSet>,
+ sourceSets: Set<DisplaySourceSet>,
label: String
): String =
locationProvider.resolve(dri, sourceSets).formatToEndWithHtml() + "#" + label