aboutsummaryrefslogtreecommitdiff
path: root/src/Kotlin/DocumentationBuilder.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-13 16:26:11 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-13 16:26:11 +0100
commit891cc8569d535c3ac5ade23d7fd56dbca619e05b (patch)
tree4a9d5eec58105cd5cf28e88613156c55f1adbb3f /src/Kotlin/DocumentationBuilder.kt
parent19ec79c91350e91449d01d4e1823313af1dd81bc (diff)
parent1ce5373a1f6c99d01db2156a833fcd796ef53e27 (diff)
downloaddokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.tar.gz
dokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.tar.bz2
dokka-891cc8569d535c3ac5ade23d7fd56dbca619e05b.zip
Merge pull request #11 from orangy/enum-members
better display for enum members
Diffstat (limited to 'src/Kotlin/DocumentationBuilder.kt')
-rw-r--r--src/Kotlin/DocumentationBuilder.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Kotlin/DocumentationBuilder.kt b/src/Kotlin/DocumentationBuilder.kt
index 8b6b19d3..a9b017bb 100644
--- a/src/Kotlin/DocumentationBuilder.kt
+++ b/src/Kotlin/DocumentationBuilder.kt
@@ -210,9 +210,13 @@ class DocumentationBuilder(val session: ResolveSession, val options: Documentati
}
val node = DocumentationNode(this, kind)
node.appendSupertypes(this)
- if (getKind() != ClassKind.OBJECT) {
+ if (getKind() != ClassKind.OBJECT && getKind() != ClassKind.ENUM_ENTRY) {
node.appendChildren(getTypeConstructor().getParameters(), DocumentationReference.Kind.Detail)
- node.appendChildren(getConstructors(), DocumentationReference.Kind.Member)
+ val constructorsToDocument = if (getKind() == ClassKind.ENUM_CLASS)
+ getConstructors().filter { it.getValueParameters().size() > 0 }
+ else
+ getConstructors()
+ node.appendChildren(constructorsToDocument, DocumentationReference.Kind.Member)
}
node.appendChildren(getDefaultType().getMemberScope().getAllDescriptors(), DocumentationReference.Kind.Member)
val classObjectDescriptor = getClassObjectDescriptor()