diff options
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin/translators')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt b/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt index cfb4daa3..ac526d57 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt @@ -1,17 +1,21 @@ package org.jetbrains.dokka.kotlinAsJava.translators +import org.jetbrains.dokka.base.DokkaBase import org.jetbrains.dokka.base.signatures.SignatureProvider import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator import org.jetbrains.dokka.model.DModule import org.jetbrains.dokka.pages.ModulePageNode +import org.jetbrains.dokka.plugability.DokkaContext +import org.jetbrains.dokka.plugability.plugin +import org.jetbrains.dokka.plugability.querySingle import org.jetbrains.dokka.utilities.DokkaLogger -class KotlinAsJavaDocumentableToPageTranslator( - private val commentsToContentConverter: CommentsToContentConverter, - private val signatureProvider: SignatureProvider, - private val logger: DokkaLogger -) : DocumentableToPageTranslator { +class KotlinAsJavaDocumentableToPageTranslator(context: DokkaContext) : DocumentableToPageTranslator { + private val commentsToContentConverter = context.plugin<DokkaBase>().querySingle { commentsToContentConverter } + private val signatureProvider = context.plugin<DokkaBase>().querySingle { signatureProvider } + private val logger: DokkaLogger = context.logger + override fun invoke(module: DModule): ModulePageNode = KotlinAsJavaPageCreator(commentsToContentConverter, signatureProvider, logger).pageForModule(module) }
\ No newline at end of file |