diff options
author | Zubakov <aleks.zubakov@gmail.com> | 2018-08-27 16:27:41 +0300 |
---|---|---|
committer | Zubakov <aleks.zubakov@gmail.com> | 2018-08-27 16:30:32 +0300 |
commit | 0b43db4ff81746e44d06780d8d14bb49dc1d87aa (patch) | |
tree | 86783b7a4be37295e00abfd10293360e1f97433f /core/src/main/kotlin/Model/DocumentationNode.kt | |
parent | b265a9ffacb8f8e8e6226a9458a92697b02355a8 (diff) | |
download | dokka-0b43db4ff81746e44d06780d8d14bb49dc1d87aa.tar.gz dokka-0b43db4ff81746e44d06780d8d14bb49dc1d87aa.tar.bz2 dokka-0b43db4ff81746e44d06780d8d14bb49dc1d87aa.zip |
Introduce origin reference kind, change documentation graph merge logic, minor refactoring
Diffstat (limited to 'core/src/main/kotlin/Model/DocumentationNode.kt')
-rw-r--r-- | core/src/main/kotlin/Model/DocumentationNode.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt index 23137364..146c1e99 100644 --- a/core/src/main/kotlin/Model/DocumentationNode.kt +++ b/core/src/main/kotlin/Model/DocumentationNode.kt @@ -84,6 +84,9 @@ open class DocumentationNode(val name: String, get() = references(RefKind.Detail).map { it.to } val members: List<DocumentationNode> get() = references(RefKind.Member).map { it.to } + val origins: List<DocumentationNode> + get() = references(RefKind.Origin).map { it.to } + val inheritedMembers: List<DocumentationNode> get() = references(RefKind.InheritedMember).map { it.to } val allInheritedMembers: List<DocumentationNode> @@ -203,6 +206,7 @@ fun DocumentationNode.append(child: DocumentationNode, kind: RefKind) { RefKind.Detail -> child.addReferenceTo(this, RefKind.Owner) RefKind.Member -> child.addReferenceTo(this, RefKind.Owner) RefKind.Owner -> child.addReferenceTo(this, RefKind.Member) + RefKind.Origin -> child.addReferenceTo(this, RefKind.Owner) else -> { /* Do not add any links back for other types */ } } |