aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/signatures
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-10-18 23:04:26 +0200
committerBłażej Kardyś <bkardys@virtuslab.com>2020-11-09 14:56:24 +0100
commitbe80016c77e9b98a75d8e832dd5723737f0e1d72 (patch)
treed4a1124e9278fcfb3a1c1b00cf743d8553ded011 /plugins/base/src/main/kotlin/signatures
parent1aba0ec4973d7915caa93f1e9b3146ad82111903 (diff)
downloaddokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.gz
dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.bz2
dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.zip
Cleaning querying from plugins where possible
Diffstat (limited to 'plugins/base/src/main/kotlin/signatures')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 6273e789..7f29e032 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -2,6 +2,7 @@ package org.jetbrains.dokka.base.signatures
import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
import org.jetbrains.dokka.Platform
+import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.signatures.KotlinSignatureUtils.dri
import org.jetbrains.dokka.base.signatures.KotlinSignatureUtils.driOrNull
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
@@ -14,11 +15,18 @@ import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.ContentKind
import org.jetbrains.dokka.pages.ContentNode
import org.jetbrains.dokka.pages.TextStyle
+import org.jetbrains.dokka.plugability.DokkaContext
+import org.jetbrains.dokka.plugability.plugin
+import org.jetbrains.dokka.plugability.querySingle
import org.jetbrains.dokka.utilities.DokkaLogger
import kotlin.text.Typography.nbsp
-class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogger) : SignatureProvider,
- JvmSignatureUtils by KotlinSignatureUtils {
+class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogger)
+ : SignatureProvider, JvmSignatureUtils by KotlinSignatureUtils {
+ constructor(context: DokkaContext) : this(
+ context.plugin<DokkaBase>().querySingle { commentsToContentConverter },
+ context.logger
+ )
private val contentBuilder = PageContentBuilder(ctcc, this, logger)
private val ignoredVisibilities = setOf(JavaVisibility.Public, KotlinVisibility.Public)