aboutsummaryrefslogtreecommitdiff
path: root/src/Formats
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/Formats
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/Formats')
-rw-r--r--src/Formats/StructuredFormatService.kt10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index 977d81d0..3f505e37 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka
import java.util.LinkedHashMap
+import org.jetbrains.dokka.LanguageService.RenderMode
public data class FormatLink(val text: String, val location: Location)
@@ -162,7 +163,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
val breakdownBySummary = members.groupBy { formatText(location, it.summary) }
for ((summary, items) in breakdownBySummary) {
val signatureTexts = items map { signature ->
- val signature = languageService.render(signature)
+ val signature = languageService.render(signature, RenderMode.SUMMARY)
val signatureAsCode = ContentCode()
signatureAsCode.append(signature)
formatText(location, signatureAsCode)
@@ -216,6 +217,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
appendSection(location, "Class Object Properties", node.members(DocumentationNode.Kind.ClassObjectProperty), node, to)
appendSection(location, "Class Object Functions", node.members(DocumentationNode.Kind.ClassObjectFunction), node, to)
appendSection(location, "Accessors", node.members(DocumentationNode.Kind.PropertyAccessor), node, to)
+ appendSection(location, "Enum Values", node.members(DocumentationNode.Kind.EnumItem), node, to)
appendSection(location, "Other members", node.members.filter {
it.kind !in setOf(
DocumentationNode.Kind.Class,
@@ -230,11 +232,13 @@ public abstract class StructuredFormatService(val locationService: LocationServi
DocumentationNode.Kind.PropertyAccessor,
DocumentationNode.Kind.ClassObjectProperty,
DocumentationNode.Kind.ClassObjectFunction,
- DocumentationNode.Kind.ExternalClass
+ DocumentationNode.Kind.ExternalClass,
+ DocumentationNode.Kind.EnumItem
)
}, node, to)
appendSection(location, "Extensions", node.extensions, node, to)
- appendSection(location, "Inheritors", node.inheritors, node, to)
+ appendSection(location, "Inheritors",
+ node.inheritors.filter { it.kind != DocumentationNode.Kind.EnumItem }, node, to)
appendSection(location, "Links", node.links, node, to)
}