diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-10-06 04:54:31 +0200 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-12 11:44:32 +0100 |
commit | 7db15c357a417ccd9ff8ad1f90f5aff84eec132f (patch) | |
tree | 92e048e9986300eda0d1f2eeaef1aea424d79a30 /plugins/kotlin-as-java/src/main/kotlin | |
parent | 07e43676665bdc009e135b767e6d43c536b413fa (diff) | |
download | dokka-7db15c357a417ccd9ff8ad1f90f5aff84eec132f.tar.gz dokka-7db15c357a417ccd9ff8ad1f90f5aff84eec132f.tar.bz2 dokka-7db15c357a417ccd9ff8ad1f90f5aff84eec132f.zip |
Adding function division switch
Diffstat (limited to 'plugins/kotlin-as-java/src/main/kotlin')
3 files changed, 11 insertions, 2 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt index b390751c..2a9b857a 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt @@ -2,10 +2,12 @@ package org.jetbrains.dokka.kotlinAsJava import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration import org.jetbrains.dokka.kotlinAsJava.signatures.JavaSignatureProvider import org.jetbrains.dokka.kotlinAsJava.transformers.KotlinAsJavaDocumentableTransformer import org.jetbrains.dokka.kotlinAsJava.translators.KotlinAsJavaDocumentableToPageTranslator import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.configuration class KotlinAsJavaPlugin : DokkaPlugin() { val kotlinAsJavaDocumentableTransformer by extending { 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 ac526d57..0f7d74b6 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaDocumentableToPageTranslator.kt @@ -1,21 +1,25 @@ package org.jetbrains.dokka.kotlinAsJava.translators import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration import org.jetbrains.dokka.base.signatures.SignatureProvider import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter +import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator import org.jetbrains.dokka.model.DModule import org.jetbrains.dokka.pages.ModulePageNode +import org.jetbrains.dokka.plugability.configuration 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(context: DokkaContext) : DocumentableToPageTranslator { + private val configuration = configuration<DokkaBase, DokkaBaseConfiguration>(context) 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) + KotlinAsJavaPageCreator(configuration, commentsToContentConverter, signatureProvider, logger).pageForModule(module) }
\ No newline at end of file diff --git a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt b/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt index de998c55..b2cf6246 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/translators/KotlinAsJavaPageCreator.kt @@ -1,16 +1,19 @@ package org.jetbrains.dokka.kotlinAsJava.translators +import org.jetbrains.dokka.base.DokkaBaseConfiguration import org.jetbrains.dokka.base.signatures.SignatureProvider import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter import org.jetbrains.dokka.base.translators.documentables.DefaultPageCreator +import org.jetbrains.dokka.DokkaConfiguration import org.jetbrains.dokka.model.DProperty import org.jetbrains.dokka.pages.MemberPageNode import org.jetbrains.dokka.utilities.DokkaLogger class KotlinAsJavaPageCreator( + configuration: DokkaBaseConfiguration?, commentsToContentConverter: CommentsToContentConverter, signatureProvider: SignatureProvider, logger: DokkaLogger -) : DefaultPageCreator(commentsToContentConverter, signatureProvider, logger) { +) : DefaultPageCreator(configuration, commentsToContentConverter, signatureProvider, logger) { override fun pageForProperty(p: DProperty): MemberPageNode? = null }
\ No newline at end of file |