aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Languages
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-04-26 18:04:18 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-14 23:46:18 +0300
commitf8c358a6a5b269a8dcd5240db8dd14a497c261c2 (patch)
tree382caff2a420e1ff3c96a6a8e45ff25a0fea2137 /core/src/main/kotlin/Languages
parent54874733ff84998d26e21b57384ad3b2ca151fc2 (diff)
downloaddokka-f8c358a6a5b269a8dcd5240db8dd14a497c261c2.tar.gz
dokka-f8c358a6a5b269a8dcd5240db8dd14a497c261c2.tar.bz2
dokka-f8c358a6a5b269a8dcd5240db8dd14a497c261c2.zip
KT-24036: Don't show visibility modifiers in summary
Diffstat (limited to 'core/src/main/kotlin/Languages')
-rw-r--r--core/src/main/kotlin/Languages/CommonLanguageService.kt1
-rw-r--r--core/src/main/kotlin/Languages/NewJavaLanguageService.kt10
2 files changed, 7 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Languages/CommonLanguageService.kt b/core/src/main/kotlin/Languages/CommonLanguageService.kt
index f155192d..edefa1b5 100644
--- a/core/src/main/kotlin/Languages/CommonLanguageService.kt
+++ b/core/src/main/kotlin/Languages/CommonLanguageService.kt
@@ -19,6 +19,7 @@ abstract class CommonLanguageService : LanguageService {
open fun renderModifier(
block: ContentBlock,
node: DocumentationNode,
+ renderMode: LanguageService.RenderMode,
nowrap: Boolean = false
) = with(block) {
keyword(node.name)
diff --git a/core/src/main/kotlin/Languages/NewJavaLanguageService.kt b/core/src/main/kotlin/Languages/NewJavaLanguageService.kt
index 22ad62b2..0266c033 100644
--- a/core/src/main/kotlin/Languages/NewJavaLanguageService.kt
+++ b/core/src/main/kotlin/Languages/NewJavaLanguageService.kt
@@ -1,16 +1,18 @@
package org.jetbrains.dokka
+import org.jetbrains.dokka.LanguageService.RenderMode
+
/**
* Implements [LanguageService] and provides rendering of symbols in Java language
*/
class NewJavaLanguageService : CommonLanguageService() {
- override fun render(node: DocumentationNode, renderMode: LanguageService.RenderMode): ContentNode {
+ override fun render(node: DocumentationNode, renderMode: RenderMode): ContentNode {
return content {
(when (node.kind) {
NodeKind.Package -> renderPackage(node)
in NodeKind.classLike -> renderClass(node)
- NodeKind.Modifier -> renderModifier(this, node)
+ NodeKind.Modifier -> renderModifier(this, node, renderMode)
NodeKind.TypeParameter -> renderTypeParameter(node)
NodeKind.Type,
NodeKind.UpperBound -> renderType(node)
@@ -26,11 +28,11 @@ class NewJavaLanguageService : CommonLanguageService() {
override fun summarizeSignatures(nodes: List<DocumentationNode>): ContentNode? = null
- override fun renderModifier(block: ContentBlock, node: DocumentationNode, nowrap: Boolean) {
+ override fun renderModifier(block: ContentBlock, node: DocumentationNode, renderMode: RenderMode, nowrap: Boolean) {
when (node.name) {
"open", "internal" -> {
}
- else -> super.renderModifier(block, node, nowrap)
+ else -> super.renderModifier(block, node, renderMode, nowrap)
}
}