aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/DokkaBase.kt11
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt13
2 files changed, 20 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt
index d84207a5..0a18c3b1 100644
--- a/plugins/base/src/main/kotlin/DokkaBase.kt
+++ b/plugins/base/src/main/kotlin/DokkaBase.kt
@@ -82,6 +82,10 @@ class DokkaBase : DokkaPlugin() {
preMergeDocumentableTransformer providing ::ObviousFunctionsDocumentableFilterTransformer
}
+ val inheritedEntriesVisbilityFilter by extending {
+ preMergeDocumentableTransformer providing ::InheritedEntriesDocumentableFilterTransformer
+ }
+
val emptyPackagesFilter by extending {
preMergeDocumentableTransformer providing ::EmptyPackagesFilterTransformer order {
after(
@@ -89,7 +93,8 @@ class DokkaBase : DokkaPlugin() {
suppressedDocumentableFilter,
documentableVisibilityFilter,
suppressedBySuppressTagDocumentableFilter,
- obviousFunctionsVisbilityFilter
+ obviousFunctionsVisbilityFilter,
+ inheritedEntriesVisbilityFilter,
)
}
}
@@ -120,7 +125,6 @@ class DokkaBase : DokkaPlugin() {
CoreExtensions.documentableTransformer with InheritorsExtractorTransformer()
}
-
val undocumentedCodeReporter by extending {
CoreExtensions.documentableTransformer with ReportUndocumentedTransformer()
}
@@ -163,7 +167,6 @@ class DokkaBase : DokkaPlugin() {
CoreExtensions.renderer providing ::HtmlRenderer
}
-
val defaultKotlinAnalysis by extending {
kotlinAnalysis providing { ctx -> KotlinAnalysis(ctx.configuration.sourceSets, ctx.logger) }
}
@@ -246,4 +249,4 @@ class DokkaBase : DokkaPlugin() {
val baseSearchbarDataInstaller by extending {
htmlPreprocessors providing ::SearchbarDataInstaller order { after(sourceLinksTransformer) }
}
-} \ No newline at end of file
+}
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt
new file mode 100644
index 00000000..a1b5052d
--- /dev/null
+++ b/plugins/base/src/main/kotlin/transformers/documentables/InheritedEntriesDocumentableFilterTransformer.kt
@@ -0,0 +1,13 @@
+package org.jetbrains.dokka.base.transformers.documentables
+
+import org.jetbrains.dokka.model.*
+import org.jetbrains.dokka.model.properties.WithExtraProperties
+import org.jetbrains.dokka.plugability.DokkaContext
+
+class InheritedEntriesDocumentableFilterTransformer(context: DokkaContext) :
+ SuppressedByConditionDocumentableFilterTransformer(context) {
+ override fun shouldBeSuppressed(d: Documentable): Boolean =
+ context.configuration.suppressInheritedMembers && (d as? WithExtraProperties<Documentable>)?.extra?.get(
+ InheritedMember
+ )?.inheritedFrom?.any { entry -> entry.value != null } ?: false
+} \ No newline at end of file