diff options
Diffstat (limited to 'core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt')
-rw-r--r-- | core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 9 |
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 + |