diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 20:20:02 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-10-03 20:20:02 +0400 |
commit | d6fd04521ba4c4c430286078dd56309111c180e6 (patch) | |
tree | cd02584ade5cd0c0cfa8da30da5ccb0ea7b2131c /src/Kotlin | |
parent | 7c6da4babd01da31c57c5c6c827eb2957c989b1c (diff) | |
download | dokka-d6fd04521ba4c4c430286078dd56309111c180e6.tar.gz dokka-d6fd04521ba4c4c430286078dd56309111c180e6.tar.bz2 dokka-d6fd04521ba4c4c430286078dd56309111c180e6.zip |
Cross-reference links on types, relative locations.
Diffstat (limited to 'src/Kotlin')
-rw-r--r-- | src/Kotlin/CrossReferences.kt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Kotlin/CrossReferences.kt b/src/Kotlin/CrossReferences.kt index bfab8309..c06b81d4 100644 --- a/src/Kotlin/CrossReferences.kt +++ b/src/Kotlin/CrossReferences.kt @@ -1,7 +1,5 @@ package org.jetbrains.dokka -import org.jetbrains.jet.lang.descriptors.ClassKind - /** * Generates cross-references for documentation such as extensions for a type * @@ -26,6 +24,15 @@ public fun DocumentationContext.buildCrossReferences(node: DocumentationNode) { typeNode?.addReferenceTo(node, DocumentationReference.Kind.Inheritor) } } + node.details.forEach { detail -> + val descriptor = relations[detail] + if (descriptor != null) { + val typeNode = descriptorToNode[descriptor] + if (typeNode != null) { + detail.addReferenceTo(typeNode, DocumentationReference.Kind.Link) + } + } + } for (child in node.members) { buildCrossReferences(child) |