From 1223420ead1d2f5d62f2f7a9ccb288614f3e399e Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Tue, 2 Feb 2016 18:18:21 +0100 Subject: restore handling of @suppress tags in javadoc comments --- core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/src/main/kotlin/Java') 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 DocumentationNode.appendMembers(elements: Array, 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 + -- cgit