aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Java
diff options
context:
space:
mode:
authorChris Rankin <chris.rankin@r3.com>2017-10-06 14:14:09 +0100
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-11-22 21:54:14 +0300
commitf941d6adefa71d2b3b1cc69120edf7eae70187ba (patch)
tree0b943db512486c5cb39e0d3d59c3984090cf5c33 /core/src/main/kotlin/Java
parent2a62816f1a50f03927dad34eb0ee80a889cb9e7e (diff)
downloaddokka-f941d6adefa71d2b3b1cc69120edf7eae70187ba.tar.gz
dokka-f941d6adefa71d2b3b1cc69120edf7eae70187ba.tar.bz2
dokka-f941d6adefa71d2b3b1cc69120edf7eae70187ba.zip
Add new "suppress" per-package option.
Diffstat (limited to 'core/src/main/kotlin/Java')
-rw-r--r--core/src/main/kotlin/Java/JavaPsiDocumentationBuilder.kt4
1 files changed, 3 insertions, 1 deletions
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<String, Content>) {
- 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) ||