aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-16 16:48:11 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-16 16:48:11 +0100
commit76e0db0359d8bdcdbbc7efddeccf115c2e5c731d (patch)
tree30bebe0bc4e334a55c2aaaf927a9aee995ddc98f /src/Java
parent614f5fafd60d845b1befc1f6eb6b18984b7ef351 (diff)
downloaddokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.tar.gz
dokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.tar.bz2
dokka-76e0db0359d8bdcdbbc7efddeccf115c2e5c731d.zip
API to create simple text nodes more easily
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/JavaDocumentationBuilder.kt9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Java/JavaDocumentationBuilder.kt b/src/Java/JavaDocumentationBuilder.kt
index 4b554584..f6e01a75 100644
--- a/src/Java/JavaDocumentationBuilder.kt
+++ b/src/Java/JavaDocumentationBuilder.kt
@@ -123,7 +123,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions)
fun PsiField.build(): DocumentationNode {
val node = DocumentationNode(this, nodeKind())
if (!hasModifierProperty(PsiModifier.FINAL)) {
- node.append(DocumentationNode("var", Content.Empty, Kind.Modifier), DocumentationReference.Kind.Detail)
+ node.appendTextNode("var", Kind.Modifier)
}
node.appendType(getType())
return node
@@ -157,7 +157,7 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions)
val node = DocumentationNode(this, Kind.Parameter)
node.appendType(getType())
if (getType() is PsiEllipsisType) {
- node.append(DocumentationNode("vararg", Content.Empty, Kind.Annotation), DocumentationReference.Kind.Annotation)
+ node.appendTextNode("vararg", Kind.Annotation, DocumentationReference.Kind.Annotation)
}
return node
}
@@ -176,12 +176,11 @@ public class JavaDocumentationBuilder(private val options: DocumentationOptions)
}
PsiModifier.MODIFIERS.forEach {
if (it != "static" && modifierList.hasExplicitModifier(it)) {
- val modifierNode = DocumentationNode(it, Content.Empty, Kind.Modifier)
- append(modifierNode, DocumentationReference.Kind.Detail)
+ appendTextNode(it, Kind.Modifier)
}
}
if ((element is PsiClass || element is PsiMethod) && !element.hasModifierProperty(PsiModifier.FINAL)) {
- append(DocumentationNode("open", Content.Empty, Kind.Modifier), DocumentationReference.Kind.Detail)
+ appendTextNode("open", Kind.Modifier)
}
}