aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-08 19:57:23 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-08 19:57:23 +0100
commit628356d63443b11ff2221707c54a397f548d38a4 (patch)
tree54c8c5f1bcece2ce56f3cb14f504db52b144f196 /core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
parent299b5c1566820128e3276f761404789e09b909a5 (diff)
downloaddokka-628356d63443b11ff2221707c54a397f548d38a4.tar.gz
dokka-628356d63443b11ff2221707c54a397f548d38a4.tar.bz2
dokka-628356d63443b11ff2221707c54a397f548d38a4.zip
link to JDK classes (KT-10452)
Diffstat (limited to 'core/src/main/kotlin/Kotlin/DocumentationBuilder.kt')
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index f3b206c6..4694bcdf 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -66,7 +66,8 @@ class DocumentationBuilder
val descriptorDocumentationParser: DescriptorDocumentationParser,
val options: DocumentationOptions,
val refGraph: NodeReferenceGraph,
- val logger: DokkaLogger)
+ val logger: DokkaLogger,
+ val linkResolver: DeclarationLinkResolver)
{
val visibleToDocumentation = setOf(Visibilities.PROTECTED, Visibilities.PUBLIC)
val boringBuiltinClasses = setOf(
@@ -180,8 +181,14 @@ class DocumentationBuilder
node.appendTextNode("?", NodeKind.NullabilityModifier)
}
if (classifierDescriptor != null) {
- link(node, classifierDescriptor,
- if (classifierDescriptor.isBoringBuiltinClass()) RefKind.HiddenLink else RefKind.Link)
+ val jdkLink = linkResolver.buildJdkLink(classifierDescriptor)
+ if (jdkLink != null) {
+ node.append(DocumentationNode(jdkLink, Content.Empty, NodeKind.ExternalLink), RefKind.Link)
+ }
+ else {
+ link(node, classifierDescriptor,
+ if (classifierDescriptor.isBoringBuiltinClass()) RefKind.HiddenLink else RefKind.Link)
+ }
}
append(node, RefKind.Detail)