diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-04 02:09:16 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-11-05 02:11:51 +0300 |
commit | 694d51d7bb5a5900fb30d201a8d675cec0f5e92b (patch) | |
tree | a308b00dd5275a24ea235b7d7b4da27111f15095 /core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt | |
parent | ce7ebd213a56abd2be6beacbef26b339935baeb6 (diff) | |
download | dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.tar.gz dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.tar.bz2 dokka-694d51d7bb5a5900fb30d201a8d675cec0f5e92b.zip |
Fix Can't find node by signature in asJava mode
fixes #205
Diffstat (limited to 'core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt index 2b085769..275972fa 100644 --- a/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt +++ b/core/src/main/kotlin/Kotlin/DeclarationLinkResolver.kt @@ -1,6 +1,7 @@ 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.idea.kdoc.resolveKDocLink @@ -10,7 +11,8 @@ class DeclarationLinkResolver val refGraph: NodeReferenceGraph, val logger: DokkaLogger, val options: DocumentationOptions, - val externalDocumentationLinkResolver: ExternalDocumentationLinkResolver) { + val externalDocumentationLinkResolver: ExternalDocumentationLinkResolver, + val descriptorSignatureProvider: DescriptorSignatureProvider) { fun tryResolveContentLink(fromDescriptor: DeclarationDescriptor, href: String): ContentBlock? { @@ -29,7 +31,8 @@ class DeclarationLinkResolver if (externalHref != null) { return ContentExternalLink(externalHref) } - return ContentNodeLazyLink(href, { -> refGraph.lookupOrWarn(symbol.signature(), logger) }) + val signature = descriptorSignatureProvider.signature(symbol) + return ContentNodeLazyLink(href, { -> refGraph.lookupOrWarn(signature, logger) }) } if ("/" in href) { return ContentExternalLink(href) |