aboutsummaryrefslogtreecommitdiff
path: root/src/Formats/StructuredFormatService.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-01-09 19:48:44 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-01-09 19:48:44 +0100
commit4b0dcee83efbdb77ae5e389ee04c309c52446153 (patch)
treeed2251d21b2b79985ce958a30e4c238e90f606f9 /src/Formats/StructuredFormatService.kt
parentc1a1cf14edfcf3b1b0cd166d60cee30e109ffe1a (diff)
downloaddokka-4b0dcee83efbdb77ae5e389ee04c309c52446153.tar.gz
dokka-4b0dcee83efbdb77ae5e389ee04c309c52446153.tar.bz2
dokka-4b0dcee83efbdb77ae5e389ee04c309c52446153.zip
generate ExternalClass nodes to hold extension functions and properties for classes from other packages
Diffstat (limited to 'src/Formats/StructuredFormatService.kt')
-rw-r--r--src/Formats/StructuredFormatService.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/Formats/StructuredFormatService.kt b/src/Formats/StructuredFormatService.kt
index b75f39d1..cb510f80 100644
--- a/src/Formats/StructuredFormatService.kt
+++ b/src/Formats/StructuredFormatService.kt
@@ -178,10 +178,15 @@ public abstract class StructuredFormatService(val locationService: LocationServi
for ((breadcrumbs, items) in breakdownByLocation) {
appendLine(to, breadcrumbs)
appendLine(to)
- appendLocation(location, to, items)
+ appendLocation(location, to, items.filter { it.kind != DocumentationNode.Kind.ExternalClass })
}
for (node in nodes) {
+ if (node.kind == DocumentationNode.Kind.ExternalClass) {
+ appendSection(location, "Extensions for ${node.name}", node.members, node, to)
+ continue
+ }
+
appendSection(location, "Packages", node.members(DocumentationNode.Kind.Package), node, to)
appendSection(location, "Types", node.members.filter {
it.kind in setOf(
@@ -191,6 +196,7 @@ public abstract class StructuredFormatService(val locationService: LocationServi
DocumentationNode.Kind.Object,
DocumentationNode.Kind.AnnotationClass)
}, node, to)
+ appendSection(location, "Extensions for External Classes", node.members(DocumentationNode.Kind.ExternalClass), node, to)
appendSection(location, "Constructors", node.members(DocumentationNode.Kind.Constructor), node, to)
appendSection(location, "Properties", node.members(DocumentationNode.Kind.Property), node, to)
appendSection(location, "Functions", node.members(DocumentationNode.Kind.Function), node, to)
@@ -210,7 +216,8 @@ public abstract class StructuredFormatService(val locationService: LocationServi
DocumentationNode.Kind.Function,
DocumentationNode.Kind.PropertyAccessor,
DocumentationNode.Kind.ClassObjectProperty,
- DocumentationNode.Kind.ClassObjectFunction
+ DocumentationNode.Kind.ClassObjectFunction,
+ DocumentationNode.Kind.ExternalClass
)
}, node, to)
appendSection(location, "Extensions", node.extensions, node, to)