diff options
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt index 45b39eec..c25aa543 100644 --- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt +++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt @@ -1,13 +1,12 @@ package org.jetbrains.dokka.base.resolvers.local -import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.resolvers.external.ExternalLocationProvider import org.jetbrains.dokka.base.resolvers.shared.ExternalDocumentation import org.jetbrains.dokka.base.resolvers.shared.PackageList import org.jetbrains.dokka.links.DRI -import org.jetbrains.dokka.pages.RootPageNode import org.jetbrains.dokka.model.DisplaySourceSet +import org.jetbrains.dokka.pages.RootPageNode import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.plugin import org.jetbrains.dokka.plugability.query @@ -25,7 +24,7 @@ abstract class DefaultLocationProvider( .sourceSets .flatMap { sourceSet -> sourceSet.externalDocumentationLinks.map { - PackageList.load(it.packageListUrl, sourceSet.jdkVersion, dokkaContext) + PackageList.load(it.packageListUrl, sourceSet.jdkVersion, dokkaContext.configuration.offlineMode) ?.let { packageList -> ExternalDocumentation(it.url, packageList) } } } @@ -35,14 +34,13 @@ abstract class DefaultLocationProvider( val externalLocationProvider = (externalLocationProviderFactories.asSequence() .mapNotNull { it.getExternalLocationProvider(extDocInfo) }.firstOrNull() ?: run { dokkaContext.logger.error("No ExternalLocationProvider for '${extDocInfo.packageList.url}' found"); null }) - run { null } packageName to externalLocationProvider } } .toMap() .filterKeys(String::isNotBlank) - protected open fun getExternalLocation(dri: DRI, sourceSets: Set<DokkaSourceSet>): String? = + protected open fun getExternalLocation(dri: DRI, sourceSets: Set<DisplaySourceSet>): String? = packagesIndex[dri.packageName]?.resolve(dri) } |