aboutsummaryrefslogtreecommitdiff
path: root/src/Model/DocumentationNode.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-26 19:08:59 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-26 19:08:59 +0100
commit146764aca661d51daa298c7cfe6b9b5efcff7e5f (patch)
tree8379c830a61ffa9a879e29405c83847b552aa028 /src/Model/DocumentationNode.kt
parent1e74c644b1163948c389dd9082e0cba60ab5ed65 (diff)
downloaddokka-146764aca661d51daa298c7cfe6b9b5efcff7e5f.tar.gz
dokka-146764aca661d51daa298c7cfe6b9b5efcff7e5f.tar.bz2
dokka-146764aca661d51daa298c7cfe6b9b5efcff7e5f.zip
stop generating separate pages for property accessors
Diffstat (limited to 'src/Model/DocumentationNode.kt')
-rw-r--r--src/Model/DocumentationNode.kt12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Model/DocumentationNode.kt b/src/Model/DocumentationNode.kt
index f0c3ddf5..8fec29c4 100644
--- a/src/Model/DocumentationNode.kt
+++ b/src/Model/DocumentationNode.kt
@@ -3,11 +3,14 @@ package org.jetbrains.dokka
import java.util.LinkedHashSet
public open class DocumentationNode(val name: String,
- val content: Content,
+ content: Content,
val kind: DocumentationNode.Kind) {
private val references = LinkedHashSet<DocumentationReference>()
+ var content: Content = content
+ private set
+
public val summary: ContentNode get() = content.summary
public val owner: DocumentationNode?
@@ -38,6 +41,13 @@ public open class DocumentationNode(val name: String,
references.addAll(other.references)
}
+ public fun updateContent(body: MutableContent.() -> Unit) {
+ if (content !is MutableContent) {
+ content = MutableContent()
+ }
+ (content as MutableContent).body()
+ }
+
public fun details(kind: DocumentationNode.Kind): List<DocumentationNode> = details.filter { it.kind == kind }
public fun members(kind: DocumentationNode.Kind): List<DocumentationNode> = members.filter { it.kind == kind }
public fun links(kind: DocumentationNode.Kind): List<DocumentationNode> = links.filter { it.kind == kind }