From 628356d63443b11ff2221707c54a397f548d38a4 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 8 Jan 2016 19:57:23 +0100 Subject: link to JDK classes (KT-10452) --- core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'core/src/main/kotlin/Kotlin/DocumentationBuilder.kt') 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) -- cgit