diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2023-02-24 17:44:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 17:44:24 +0200 |
commit | 1040288ca76e070445f1400df2fcc5a56310be28 (patch) | |
tree | 52bed40e8a320f0835540b0cd38ea1899800e395 /plugins/base/src/test/kotlin/utils | |
parent | 8d23340d1c377b8f490cdee3c2c874453d321dd8 (diff) | |
download | dokka-1040288ca76e070445f1400df2fcc5a56310be28.tar.gz dokka-1040288ca76e070445f1400df2fcc5a56310be28.tar.bz2 dokka-1040288ca76e070445f1400df2fcc5a56310be28.zip |
Reorganize tabs for Classlike (#2764)
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r-- | plugins/base/src/test/kotlin/utils/contentUtils.kt | 95 |
1 files changed, 51 insertions, 44 deletions
diff --git a/plugins/base/src/test/kotlin/utils/contentUtils.kt b/plugins/base/src/test/kotlin/utils/contentUtils.kt index d38af3f4..4fce1155 100644 --- a/plugins/base/src/test/kotlin/utils/contentUtils.kt +++ b/plugins/base/src/test/kotlin/utils/contentUtils.kt @@ -1,9 +1,7 @@ package utils import matchers.content.* -import org.jetbrains.dokka.pages.ContentGroup -import org.jetbrains.dokka.pages.ContentPage -import org.jetbrains.dokka.pages.RootPageNode +import org.jetbrains.dokka.pages.* //TODO: Try to unify those functions after update to 1.4 fun ContentMatcherBuilder<*>.functionSignature( @@ -197,35 +195,43 @@ fun ContentMatcherBuilder<*>.propertySignature( header { +"Package-level declarations" } skipAllNotMatching() } - group { + tabbedGroup { group { skipAllNotMatching() - header { +"Properties" } - table { - group { - link { +name } - platformHinted { - group { - annotations.entries.forEach { - group { - unwrapAnnotation(it) - } - } - if (visibility.isNotBlank()) +"$visibility " - if (modifier.isNotBlank()) +"$modifier " - +("${keywords.joinToString("") { "$it " }}$preposition ") - link { +name } - if (type != null) { - +(": ") - group { - link { - +(type) + tab(BasicTabbedContentType.PROPERTY) { + header{ + "Properties" } + table { + group { + link { +name } + divergentGroup { + divergentInstance { + divergent { + group { + group { + annotations.entries.forEach { + group { + unwrapAnnotation(it) + } + } + if (visibility.isNotBlank()) +"$visibility " + if (modifier.isNotBlank()) +"$modifier " + +("${keywords.joinToString("") { "$it " }}$preposition ") + link { +name } + if (type != null) { + +(": ") + group { + link { + +(type) + } + } + } + if (value != null) { + +(" = $value") + } + } } } } - if (value != null) { - +(" = $value") - } } } } @@ -242,39 +248,40 @@ fun ContentMatcherBuilder<*>.typealiasSignature(name: String, expressionTarget: } group { group { - skipAllNotMatching() - header { +"Types" } - table { - group { - link { +name } - divergentGroup { - divergentInstance { - group { + tab(BasicTabbedContentType.TYPE) { + header{ + "Types" } + table { + group { + link { +name } + divergentGroup { + divergentInstance { group { group { group { - +"typealias " group { + +"typealias " group { - link { +name } + group { + link { +name } + } + skipAllNotMatching() + } + +" = " + group { + link { +expressionTarget } } - skipAllNotMatching() - } - +" = " - group { - link { +expressionTarget } } } } } } + skipAllNotMatching() } - skipAllNotMatching() } + skipAllNotMatching() } skipAllNotMatching() } - skipAllNotMatching() } } } |