diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-05-26 00:19:54 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2018-07-14 23:57:12 +0300 |
commit | f5746c40cbb44204edd137b3183ef0d04958047b (patch) | |
tree | 57e1876aa573d09215cc34959961c691179ab248 /core/src/main/kotlin/Kotlin | |
parent | 633fda36403e8c5483054737d285dd01b5c190bb (diff) | |
download | dokka-f5746c40cbb44204edd137b3183ef0d04958047b.tar.gz dokka-f5746c40cbb44204edd137b3183ef0d04958047b.tar.bz2 dokka-f5746c40cbb44204edd137b3183ef0d04958047b.zip |
KT-24624: Partial, more detailed signature on class page
Diffstat (limited to 'core/src/main/kotlin/Kotlin')
-rw-r--r-- | core/src/main/kotlin/Kotlin/KotlinLanguageService.kt | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt index b6474583..237fa9b9 100644 --- a/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt +++ b/core/src/main/kotlin/Kotlin/KotlinLanguageService.kt @@ -7,6 +7,10 @@ import org.jetbrains.dokka.LanguageService.RenderMode * Implements [LanguageService] and provides rendering of symbols in Kotlin language */ class KotlinLanguageService : CommonLanguageService() { + override fun showModifierInSummary(node: DocumentationNode): Boolean { + return node.name !in fullOnlyModifiers + } + private val fullOnlyModifiers = setOf("public", "protected", "private", "inline", "noinline", "crossinline", "reified") @@ -283,22 +287,6 @@ class KotlinLanguageService : CommonLanguageService() { } } - private fun ContentBlock.renderModifiersForNode( - node: DocumentationNode, - renderMode: RenderMode, - nowrap: Boolean = false - ) { - val modifiers = node.details(NodeKind.Modifier) - for (it in modifiers) { - if (node.kind == org.jetbrains.dokka.NodeKind.Interface && it.name == "abstract") - continue - if (renderMode == RenderMode.SUMMARY && it.name in fullOnlyModifiers) { - continue - } - renderModifier(this, it, renderMode, nowrap) - } - } - private fun ContentBlock.renderAnnotationsForNode(node: DocumentationNode) { node.annotations.forEach { renderAnnotation(it) |