diff options
author | Eugene Petrenko <eugene.petrenko@gmail.com> | 2018-09-11 14:03:29 +0300 |
---|---|---|
committer | Eugene Petrenko <eugene.petrenko@gmail.com> | 2018-09-11 14:03:29 +0300 |
commit | a54070f5db04d05b48c369b211efe044fbc02a8d (patch) | |
tree | aac5889906f49f68c39e1416ea39d4d19bad008e /core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt | |
parent | e29f1c966056b0f7ee31dd9bd7d55f9e526fa7fe (diff) | |
parent | 0df19264ccae3d294946caf634ee15eea0c4fe4a (diff) | |
download | dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.gz dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.tar.bz2 dokka-a54070f5db04d05b48c369b211efe044fbc02a8d.zip |
Merge remote-tracking branch 'zub/dev-multiplatf' into kotlin-website-jonnyzzz
Diffstat (limited to 'core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt index ffef399d..c3a84e57 100644 --- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt +++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt @@ -1,21 +1,18 @@ package org.jetbrains.dokka import com.google.inject.Inject -import org.jetbrains.dokka.Model.DescriptorSignatureProvider import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor import org.jetbrains.kotlin.idea.kdoc.resolveKDocLink -import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyPrivateApi -import org.jetbrains.kotlin.resolve.descriptorUtil.isEffectivelyPublicApi class DeclarationLinkResolver @Inject constructor(val resolutionFacade: DokkaResolutionFacade, val refGraph: NodeReferenceGraph, val logger: DokkaLogger, - val options: DocumentationOptions, + val passConfiguration: DokkaConfiguration.PassConfiguration, val externalDocumentationLinkResolver: ExternalDocumentationLinkResolver, - val descriptorSignatureProvider: DescriptorSignatureProvider) { + val elementSignatureProvider: ElementSignatureProvider) { fun tryResolveContentLink(fromDescriptor: DeclarationDescriptor, href: String): ContentBlock? { @@ -34,14 +31,14 @@ class DeclarationLinkResolver if (externalHref != null) { return ContentExternalLink(externalHref) } - val signature = descriptorSignatureProvider.signature(symbol) + val signature = elementSignatureProvider.signature(symbol) val referencedAt = fromDescriptor.signatureWithSourceLocation() return ContentNodeLazyLink(href, { -> val target = refGraph.lookup(signature) if (target == null) { - logger.warn("Can't find node by signature $signature, referenced at $referencedAt") + logger.warn("Can't find node by signature `$signature`, referenced at $referencedAt") } target }) @@ -66,7 +63,7 @@ class DeclarationLinkResolver if (symbol is CallableMemberDescriptor && symbol.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE) { return symbol.overriddenDescriptors.firstOrNull() } - if (symbol is TypeAliasDescriptor && !symbol.isDocumented(options)) { + if (symbol is TypeAliasDescriptor && !symbol.isDocumented(passConfiguration)) { return symbol.classDescriptor } return symbol |