aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Zybała <fzybala@virtuslab.com>2020-06-17 10:23:05 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-17 14:14:44 +0200
commitb53af4902bd6c1042c51e6eebb68e9864877c368 (patch)
tree69bf8b5002c11f189542586fdc88e257a10a75d4
parentcabb4ae863ae41799ef8c11c5a2a1ef7fc34d22b (diff)
downloaddokka-b53af4902bd6c1042c51e6eebb68e9864877c368.tar.gz
dokka-b53af4902bd6c1042c51e6eebb68e9864877c368.tar.bz2
dokka-b53af4902bd6c1042c51e6eebb68e9864877c368.zip
Added typealiases to Types tab
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
index 6d50f19a..b69f60d2 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt
@@ -93,13 +93,6 @@ open class DefaultPageCreator(
group(styles = setOf(ContentStyle.TabbedContent)){
+contentForComments(p)
+contentForScope(p, p.dri, p.sourceSets)
- block("Type aliases", 2, ContentKind.TypeAliases, p.typealiases, p.sourceSets.toSet(), extra = mainExtra + SimpleAttr.header("Type aliases")) {
- link(it.name, it.dri, kind = ContentKind.Main)
- sourceSetDependentHint(it.dri, it.sourceSets.toSet(), kind = ContentKind.SourceSetDependantHint, styles = emptySet()) {
- contentForBrief(it)
- +buildSignature(it)
- }
- }
}
}
@@ -108,7 +101,11 @@ open class DefaultPageCreator(
dri: DRI,
sourceSets: Set<SourceSetData>
) = contentBuilder.contentFor(s as Documentable) {
- divergentBlock("Types", s.classlikes, ContentKind.Classlikes, extra = mainExtra + SimpleAttr.header("Types"))
+ val types = listOf(
+ s.classlikes,
+ (s as? DPackage)?.typealiases ?: emptyList()
+ ).flatten()
+ divergentBlock("Types", types, ContentKind.Classlikes, extra = mainExtra + SimpleAttr.header("Types"))
divergentBlock("Functions", s.functions, ContentKind.Functions, extra = mainExtra + SimpleAttr.header( "Functions"))
block("Properties", 2, ContentKind.Properties, s.properties, sourceSets.toSet(), extra = mainExtra + SimpleAttr.header( "Properties")) {
link(it.name, it.dri, kind = ContentKind.Main)