diff options
author | Alex Saveau <asaveau@google.com> | 2020-07-01 02:06:31 +0000 |
---|---|---|
committer | Alex Saveau <asaveau@google.com> | 2020-07-01 03:02:10 +0000 |
commit | be1744a7264c9e50fc5a857ce34e6a972ffe12ac (patch) | |
tree | 4afbd8643924b906beb5493a6f3703ca1314be44 | |
parent | 92fcde47f4eaf8e9dfe26104ade0d9aeebe4461a (diff) | |
download | dokka-be1744a7264c9e50fc5a857ce34e6a972ffe12ac.tar.gz |
Add Interfaces section to Dokka as Kotlin docs
Bug: 149372553
Change-Id: I5f20a2de2b57db0b36e5fb678aa37cd38f0e54f5
-rw-r--r-- | core/src/main/kotlin/Formats/DacHtmlFormat.kt | 1 | ||||
-rw-r--r-- | core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Formats/DacHtmlFormat.kt b/core/src/main/kotlin/Formats/DacHtmlFormat.kt index 7038a7fbe..d997f1ca2 100644 --- a/core/src/main/kotlin/Formats/DacHtmlFormat.kt +++ b/core/src/main/kotlin/Formats/DacHtmlFormat.kt @@ -514,6 +514,7 @@ class DevsiteLayoutHtmlFormatOutputBuilder( bodyContent = { h1 { +page.node.name } nodeContent(page.node) + summaryNodeGroup(page.interfaces.sortedBy { it.nameWithOuterClass().toLowerCase() }, "Interfaces", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.classes.sortedBy { it.nameWithOuterClass().toLowerCase() }, "Classes", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.exceptions.sortedBy { it.nameWithOuterClass().toLowerCase() }, "Exceptions", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.typeAliases.sortedBy { it.nameWithOuterClass().toLowerCase() }, "Type-aliases", headerAsRow = false) { classLikeRow(it) } diff --git a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt index 23cb81a1a..a04a9187c 100644 --- a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt +++ b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlFormatOutputBuilder.kt @@ -392,6 +392,7 @@ open class JavaLayoutHtmlFormatOutputBuilder( bodyContent = { h1 { +page.node.name } nodeContent(page.node) + summaryNodeGroup(page.interfaces, "Interfaces", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.classes, "Classes", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.exceptions, "Exceptions", headerAsRow = false) { classLikeRow(it) } summaryNodeGroup(page.typeAliases, "Type-aliases", headerAsRow = false) { classLikeRow(it) } @@ -1088,6 +1089,8 @@ open class JavaLayoutHtmlFormatOutputBuilder( assert(node.kind == NodeKind.Package) } + val interfaces = node.members(NodeKind.Interface) + + node.members(NodeKind.Class).flatMap { it.members(NodeKind.Interface) } val classes = node.members(NodeKind.Class) val exceptions = node.members(NodeKind.Exception) val typeAliases = node.members(NodeKind.TypeAlias) |