aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Formats
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-01-04 21:29:24 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-01-04 21:29:24 +0100
commitefd848a7d5f5f241de4696d34a500d76f51b3cbc (patch)
treee45bfeef1786c9226efbfa353a2c0ab12b8b8dad /core/src/main/kotlin/Formats
parente0d00cba3613d092b6fa6af961378584c7c77b75 (diff)
downloaddokka-efd848a7d5f5f241de4696d34a500d76f51b3cbc.tar.gz
dokka-efd848a7d5f5f241de4696d34a500d76f51b3cbc.tar.bz2
dokka-efd848a7d5f5f241de4696d34a500d76f51b3cbc.zip
separate groups for annotations and exceptions in the members list
Diffstat (limited to 'core/src/main/kotlin/Formats')
-rw-r--r--core/src/main/kotlin/Formats/StructuredFormatService.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/Formats/StructuredFormatService.kt b/core/src/main/kotlin/Formats/StructuredFormatService.kt
index e1ca7a62..faa0b1ef 100644
--- a/core/src/main/kotlin/Formats/StructuredFormatService.kt
+++ b/core/src/main/kotlin/Formats/StructuredFormatService.kt
@@ -187,7 +187,8 @@ abstract class StructuredFormatService(locationService: LocationService,
val singleNode = nodes.singleOrNull()
if (singleNode != null && singleNode.isModuleOrPackage()) {
if (singleNode.kind == NodeKind.Package) {
- appendHeader(to, "Package " + formatText(singleNode.name), 2)
+ val packageName = if (singleNode.name.isEmpty()) "<root>" else singleNode.name
+ appendHeader(to, "Package " + formatText(packageName), 2)
}
to.append(formatText(location, singleNode.content))
} else {
@@ -275,7 +276,9 @@ abstract class StructuredFormatService(locationService: LocationService,
}
appendSection("Packages", node.members(NodeKind.Package))
- appendSection("Types", node.members.filter { it.kind in NodeKind.classLike })
+ appendSection("Types", node.members.filter { it.kind in NodeKind.classLike && it.kind != NodeKind.AnnotationClass && it.kind != NodeKind.Exception })
+ appendSection("Annotations", node.members(NodeKind.AnnotationClass))
+ appendSection("Exceptions", node.members(NodeKind.Exception))
appendSection("Extensions for External Classes", node.members(NodeKind.ExternalClass))
appendSection("Enum Values", node.members(NodeKind.EnumItem))
appendSection("Constructors", node.members(NodeKind.Constructor))
@@ -292,6 +295,7 @@ abstract class StructuredFormatService(locationService: LocationService,
NodeKind.Enum,
NodeKind.Object,
NodeKind.AnnotationClass,
+ NodeKind.Exception,
NodeKind.Constructor,
NodeKind.Property,
NodeKind.Package,