diff options
author | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 04:29:07 +0300 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2017-12-02 04:29:07 +0300 |
commit | c1abcaf32abd4e2d74b9246385b3541096cdb5b9 (patch) | |
tree | cdfa6753f5922186c7fd77824003e04ea1dd3d10 /core/src/main/kotlin/javadoc/dokka-adapters.kt | |
parent | f08f711a4290b47149ae3454d698e78c9f4c8e16 (diff) | |
download | dokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.tar.gz dokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.tar.bz2 dokka-c1abcaf32abd4e2d74b9246385b3541096cdb5b9.zip |
Extract Analysis components out of FormatDescriptor
Fight with statically injected HtmlTemplateService
Diffstat (limited to 'core/src/main/kotlin/javadoc/dokka-adapters.kt')
-rw-r--r-- | core/src/main/kotlin/javadoc/dokka-adapters.kt | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/core/src/main/kotlin/javadoc/dokka-adapters.kt b/core/src/main/kotlin/javadoc/dokka-adapters.kt index 84dff8f0..bed211f6 100644 --- a/core/src/main/kotlin/javadoc/dokka-adapters.kt +++ b/core/src/main/kotlin/javadoc/dokka-adapters.kt @@ -5,13 +5,10 @@ import com.google.inject.Inject import com.sun.tools.doclets.formats.html.HtmlDoclet import org.jetbrains.dokka.* import org.jetbrains.dokka.Formats.FormatDescriptor -import org.jetbrains.dokka.Formats.FormatDescriptorAnalysisComponentProvider -import org.jetbrains.dokka.Kotlin.KotlinAsJavaDescriptorSignatureProvider -import org.jetbrains.dokka.Model.DescriptorSignatureProvider -import org.jetbrains.dokka.Samples.DefaultSampleProcessingService +import org.jetbrains.dokka.Formats.FormatDescriptorAnalysisComponent +import org.jetbrains.dokka.Formats.KotlinAsJava import org.jetbrains.dokka.Utilities.bind import org.jetbrains.dokka.Utilities.toType -import kotlin.reflect.KClass class JavadocGenerator @Inject constructor(val options: DocumentationOptions, val logger: DokkaLogger) : Generator { @@ -34,11 +31,7 @@ class JavadocGenerator @Inject constructor(val options: DocumentationOptions, va } } -class JavadocFormatDescriptor : FormatDescriptor, FormatDescriptorAnalysisComponentProvider { - override val packageDocumentationBuilderClass = KotlinAsJavaDocumentationBuilder::class - override val javaDocumentationBuilderClass = JavaPsiDocumentationBuilder::class - override val sampleProcessingService = DefaultSampleProcessingService::class - override val descriptorSignatureProvider = KotlinAsJavaDescriptorSignatureProvider::class +class JavadocFormatDescriptor : FormatDescriptor, FormatDescriptorAnalysisComponent by KotlinAsJava { override fun configureOutput(binder: Binder): Unit = with(binder) { bind<Generator>() toType JavadocGenerator::class |