From f941d6adefa71d2b3b1cc69120edf7eae70187ba Mon Sep 17 00:00:00 2001 From: Chris Rankin Date: Fri, 6 Oct 2017 14:14:09 +0100 Subject: Add new "suppress" per-package option. --- core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 6b1f8cb4..cf2b0514 100644 --- a/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt +++ b/core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt @@ -58,7 +58,7 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder { } override fun appendFile(file: PsiJavaFile, module: DocumentationModule, packageContent: Map) { - if (file.classes.all { skipElement(it) }) { + if (skipFile(file) || file.classes.all { skipElement(it) }) { return } val packageNode = module.findOrCreatePackageNode(file.packageName, emptyMap(), refGraph) @@ -132,6 +132,8 @@ class JavaPsiDocumentationBuilder : JavaDocumentationBuilder { } } + private fun skipFile(javaFile: PsiJavaFile): Boolean = options.effectivePackageOptions(javaFile.packageName).suppress + private fun skipElement(element: Any) = skipElementByVisibility(element) || hasSuppressDocTag(element) || -- cgit