diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-10-18 23:04:26 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-09 14:56:24 +0100 |
commit | be80016c77e9b98a75d8e832dd5723737f0e1d72 (patch) | |
tree | d4a1124e9278fcfb3a1c1b00cf743d8553ded011 /plugins/base/src/main/kotlin/translators/descriptors | |
parent | 1aba0ec4973d7915caa93f1e9b3146ad82111903 (diff) | |
download | dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.gz dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.tar.bz2 dokka-be80016c77e9b98a75d8e832dd5723737f0e1d72.zip |
Cleaning querying from plugins where possible
Diffstat (limited to 'plugins/base/src/main/kotlin/translators/descriptors')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 8db3aa43..f388ee44 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -7,6 +7,7 @@ import org.jetbrains.dokka.analysis.DescriptorDocumentableSource import org.jetbrains.dokka.analysis.DokkaResolutionFacade import org.jetbrains.dokka.analysis.KotlinAnalysis import org.jetbrains.dokka.analysis.from +import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.parsers.MarkdownParser import org.jetbrains.dokka.base.translators.isDirectlyAnException import org.jetbrains.dokka.links.* @@ -17,6 +18,9 @@ import org.jetbrains.dokka.model.TypeConstructor import org.jetbrains.dokka.model.doc.* import org.jetbrains.dokka.model.properties.PropertyContainer import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.plugability.plugin +import org.jetbrains.dokka.plugability.query +import org.jetbrains.dokka.plugability.querySingle import org.jetbrains.dokka.transformers.sources.SourceToDocumentableTranslator import org.jetbrains.dokka.utilities.DokkaLogger import org.jetbrains.kotlin.builtins.functions.FunctionClassDescriptor @@ -60,9 +64,11 @@ import org.jetbrains.kotlin.resolve.constants.EnumValue as ConstantsEnumValue import org.jetbrains.kotlin.resolve.constants.KClassValue as ConstantsKtClassValue class DefaultDescriptorToDocumentableTranslator( - private val kotlinAnalysis: KotlinAnalysis + context: DokkaContext ) : SourceToDocumentableTranslator { + private val kotlinAnalysis: KotlinAnalysis = context.plugin<DokkaBase>().querySingle { kotlinAnalysis } + override suspend fun invoke(sourceSet: DokkaSourceSet, context: DokkaContext): DModule { val (environment, facade) = kotlinAnalysis[sourceSet] val packageFragments = environment.getSourceFiles().asSequence() |