aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/KotlinLanguageService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-09-09 14:54:19 +0200
committerDmitry Jemerov <yole@jetbrains.com>2015-09-09 14:54:19 +0200
commit1e862f2fc05c9d01d4d9c00de5d1a4235ff85a9d (patch)
tree147d9f03651404de595b81090767cefe38d9778b /src/Kotlin/KotlinLanguageService.kt
parent60c915a9d35d8026bd2fc1a193b97b89cbf29621 (diff)
downloaddokka-1e862f2fc05c9d01d4d9c00de5d1a4235ff85a9d.tar.gz
dokka-1e862f2fc05c9d01d4d9c00de5d1a4235ff85a9d.tar.bz2
dokka-1e862f2fc05c9d01d4d9c00de5d1a4235ff85a9d.zip
render annotations with @; render only @MustBeDocumented annotations; render all modifiers
Diffstat (limited to 'src/Kotlin/KotlinLanguageService.kt')
-rw-r--r--src/Kotlin/KotlinLanguageService.kt11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Kotlin/KotlinLanguageService.kt b/src/Kotlin/KotlinLanguageService.kt
index a22ba8af..d61db546 100644
--- a/src/Kotlin/KotlinLanguageService.kt
+++ b/src/Kotlin/KotlinLanguageService.kt
@@ -154,8 +154,9 @@ class KotlinLanguageService : LanguageService {
}
}
- private fun ContentBlock.renderParameter(node: DocumentationNode) {
+ private fun ContentBlock.renderParameter(node: DocumentationNode, renderMode: RenderMode) {
renderAnnotationsForNode(node)
+ renderModifiersForNode(node, renderMode)
identifier(node.name, IdentifierKind.ParameterName)
symbol(":")
nbsp()
@@ -212,7 +213,7 @@ class KotlinLanguageService : LanguageService {
}
private fun ContentBlock.renderAnnotation(node: DocumentationNode) {
- identifier(node.name, IdentifierKind.AnnotationName)
+ identifier("@" + node.name, IdentifierKind.AnnotationName)
val parameters = node.details(DocumentationNode.Kind.Parameter)
if (!parameters.isEmpty()) {
symbol("(")
@@ -229,9 +230,9 @@ class KotlinLanguageService : LanguageService {
renderAnnotationsForNode(node)
when (node.kind) {
DocumentationNode.Kind.Class,
- DocumentationNode.Kind.AnnotationClass -> keyword("class ")
+ DocumentationNode.Kind.AnnotationClass,
+ DocumentationNode.Kind.Enum -> keyword("class ")
DocumentationNode.Kind.Interface -> keyword("interface ")
- DocumentationNode.Kind.Enum -> keyword("enum class ")
DocumentationNode.Kind.EnumItem -> keyword("enum val ")
DocumentationNode.Kind.Object -> keyword("object ")
else -> throw IllegalArgumentException("Node $node is not a class-like object")
@@ -266,7 +267,7 @@ class KotlinLanguageService : LanguageService {
symbol("(")
renderList(node.details(DocumentationNode.Kind.Parameter)) {
- renderParameter(it)
+ renderParameter(it, renderMode)
}
symbol(")")
if (needReturnType(node)) {