From b53af4902bd6c1042c51e6eebb68e9864877c368 Mon Sep 17 00:00:00 2001 From: Filip ZybaƂa Date: Wed, 17 Jun 2020 10:23:05 +0200 Subject: Added typealiases to Types tab --- .../kotlin/translators/documentables/DefaultPageCreator.kt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/base/src/main/kotlin') 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 ) = 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) -- cgit