aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Java
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2016-02-02 18:18:21 +0100
committerDmitry Jemerov <yole@jetbrains.com>2016-02-02 18:18:21 +0100
commit1223420ead1d2f5d62f2f7a9ccb288614f3e399e (patch)
tree37cbf35888d43a5fa01f38b86d0ef1879c26553e /core/src/main/kotlin/Java
parent383f0f87c60ab9cfcf3ecca45f9c613544894132 (diff)
downloaddokka-1223420ead1d2f5d62f2f7a9ccb288614f3e399e.tar.gz
dokka-1223420ead1d2f5d62f2f7a9ccb288614f3e399e.tar.bz2
dokka-1223420ead1d2f5d62f2f7a9ccb288614f3e399e.zip
restore handling of @suppress tags in javadoc comments
Diffstat (limited to 'core/src/main/kotlin/Java')
-rw-r--r--core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
index 9d75792c..5da41f29 100644
--- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
+++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt
@@ -122,15 +122,12 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder {
}
}
- private fun skipElement(element: Any) = skipElementByVisibility(element) || hasSuppressTag(element)
+ private fun skipElement(element: Any) = skipElementByVisibility(element) || hasSuppressDocTag(element)
private fun skipElementByVisibility(element: Any): Boolean =
!options.includeNonPublic && element is PsiModifierListOwner &&
(element.hasModifierProperty(PsiModifier.PRIVATE) || element.hasModifierProperty(PsiModifier.PACKAGE_LOCAL))
- private fun hasSuppressTag(element: Any) =
- element is PsiDocCommentOwner && element.docComment?.let { it.findTagByName("suppress") != null } ?: false
-
fun <T : Any> DocumentationNode.appendMembers(elements: Array<T>, buildFn: T.() -> DocumentationNode) =
appendChildren(elements, RefKind.Member, buildFn)
@@ -267,3 +264,7 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder {
return node
}
}
+
+fun hasSuppressDocTag(element: Any?) =
+ element is PsiDocCommentOwner && element.docComment?.let { it.findTagByName("suppress") != null } ?: false
+