diff options
| author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-08-17 10:49:41 +0200 |
|---|---|---|
| committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-17 11:52:28 +0200 |
| commit | ef1bb10aca292e14d8deb35694243fd84fc75341 (patch) | |
| tree | 2aae938883e6c8d1b35948d2da947b0af955bd54 /plugins/base/src/main/kotlin/resolvers/local | |
| parent | a2be91ea289ddb1a8634c5fd252243f1b9ab7000 (diff) | |
| download | dokka-ef1bb10aca292e14d8deb35694243fd84fc75341.tar.gz dokka-ef1bb10aca292e14d8deb35694243fd84fc75341.tar.bz2 dokka-ef1bb10aca292e14d8deb35694243fd84fc75341.zip | |
Rename `ContentSourceSet` to `DisplaySourceSet`
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers/local')
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/BaseLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/BaseLocationProvider.kt index 9c9a0c0e..7387789b 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/BaseLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/BaseLocationProvider.kt @@ -3,7 +3,7 @@ package org.jetbrains.dokka.base.resolvers.local import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.ContentSourceSet +import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.model.sourceSetIDs import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.plugin @@ -24,7 +24,7 @@ abstract class BaseLocationProvider(protected val dokkaContext: DokkaContext) : protected fun getExternalLocation( dri: DRI, - sourceSets: Set<ContentSourceSet> + sourceSets: Set<DisplaySourceSet> ): String { val jdkToExternalDocumentationLinks = dokkaContext.configuration.sourceSets .filter { sourceSet -> sourceSet.sourceSetID in sourceSets.sourceSetIDs } diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt index c437b52a..b9df45ae 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt @@ -4,7 +4,7 @@ import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.base.resolvers.anchors.SymbolAnchorHint import org.jetbrains.dokka.base.resolvers.external.ExternalLocationProvider import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.ContentSourceSet +import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.model.withDescendants import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.plugability.DokkaContext @@ -51,7 +51,7 @@ open class DefaultLocationProvider( override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean): String = pathTo(node, context) + if (!skipExtension) extension else "" - override fun resolve(dri: DRI, sourceSets: Set<ContentSourceSet>, context: PageNode?): String = + override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?): String = pagesIndex[dri]?.let { resolve(it, context) } ?: anchorsIndex[dri]?.let { resolve(it, context) + "#$dri" } // Not found in PageGraph, that means it's an external link diff --git a/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt index d95594cf..5077195f 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/LocationProvider.kt @@ -1,12 +1,12 @@ package org.jetbrains.dokka.base.resolvers.local import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.model.ContentSourceSet +import org.jetbrains.dokka.model.DisplaySourceSet import org.jetbrains.dokka.pages.PageNode import org.jetbrains.dokka.pages.RootPageNode interface LocationProvider { - fun resolve(dri: DRI, sourceSets: Set<ContentSourceSet>, context: PageNode? = null): String + fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode? = null): String fun resolve(node: PageNode, context: PageNode? = null, skipExtension: Boolean = false): String fun resolveRoot(node: PageNode): String fun ancestors(node: PageNode): List<PageNode> diff --git a/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt index 3f903bb3..75c2ccf6 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/MultimoduleLocationProvider.kt @@ -1,7 +1,7 @@ package org.jetbrains.dokka.base.resolvers.local import org.jetbrains.dokka.links.DRI -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 @@ -14,7 +14,7 @@ class MultimoduleLocationProvider(private val root: RootPageNode, context: Dokka it.name to it.path }.toMap() - override fun resolve(dri: DRI, sourceSets: Set<ContentSourceSet>, context: PageNode?): String = + override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?): String = dri.takeIf { it.packageName == MULTIMODULE_PACKAGE_PLACEHOLDER }?.classNames?.let { paths[it] }?.let { "$it/${identifierToFilename(dri.classNames.orEmpty())}/index.html" } ?: defaultLocationProvider.resolve(dri, sourceSets, context) |
