diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-02-16 23:20:17 +0100 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-02-18 13:28:23 +0100 |
commit | 3b200cf10e0c50c2eee4b9da3f7039d678fa4aad (patch) | |
tree | 747f86e20cc866a82de74ea4c7f5eb0eeacfd771 /plugins/kotlin-as-java | |
parent | 705c6d45f95408633c71bc0bcd6bc93c9d79a381 (diff) | |
download | dokka-3b200cf10e0c50c2eee4b9da3f7039d678fa4aad.tar.gz dokka-3b200cf10e0c50c2eee4b9da3f7039d678fa4aad.tar.bz2 dokka-3b200cf10e0c50c2eee4b9da3f7039d678fa4aad.zip |
Renames DocumentationToPagesTranslatero and moves its implementation to base plugin
Diffstat (limited to 'plugins/kotlin-as-java')
3 files changed, 15 insertions, 10 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageBuilder.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageBuilder.kt index 6fe10ce1..d4dfdaea 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageBuilder.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageBuilder.kt @@ -1,5 +1,7 @@ package org.jetbrains.dokka.kotlinAsJava +import org.jetbrains.dokka.base.transformers.documentables.DefaultPageBuilder +import org.jetbrains.dokka.base.transformers.documentables.RootContentBuilder import org.jetbrains.dokka.kotlinAsJava.conversions.asJava import org.jetbrains.dokka.kotlinAsJava.conversions.asStatic import org.jetbrains.dokka.kotlinAsJava.conversions.withClass diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageContentBuilder.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageContentBuilder.kt index a5d0bd33..02e6ff82 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageContentBuilder.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPageContentBuilder.kt @@ -1,5 +1,8 @@ package org.jetbrains.dokka.kotlinAsJava +import org.jetbrains.dokka.base.transformers.documentables.DefaultPageContentBuilder +import org.jetbrains.dokka.base.transformers.documentables.PageContentBuilderFunction +import org.jetbrains.dokka.base.transformers.documentables.type import org.jetbrains.dokka.links.DRI import org.jetbrains.dokka.model.Function import org.jetbrains.dokka.model.JavaTypeWrapper @@ -7,13 +10,13 @@ import org.jetbrains.dokka.pages.* import org.jetbrains.dokka.utilities.DokkaLogger class KotlinAsJavaPageContentBuilder( - private val dri: Set<DRI>, - private val platformData: Set<PlatformData>, - private val kind: Kind, - private val commentsConverter: CommentsToContentConverter, - override val logger: DokkaLogger, - private val styles: Set<Style> = emptySet(), - private val extras: Set<Extra> = emptySet() + dri: Set<DRI>, + platformData: Set<PlatformData>, + kind: Kind, + commentsConverter: CommentsToContentConverter, + logger: DokkaLogger, + styles: Set<Style> = emptySet(), + extras: Set<Extra> = emptySet() ) : DefaultPageContentBuilder(dri, platformData, kind, commentsConverter, logger, styles, extras) { override fun signature(f: Function) = signature(f) { diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt index dd95f00e..f8a25aca 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt @@ -7,7 +7,7 @@ import org.jetbrains.dokka.model.Module import org.jetbrains.dokka.pages.ModulePageNode import org.jetbrains.dokka.plugability.DokkaContext import org.jetbrains.dokka.plugability.DokkaPlugin -import org.jetbrains.dokka.transformers.documentation.DocumentationToPageTranslator +import org.jetbrains.dokka.transformers.documentation.DocumentablesToPageTranslator import org.jetbrains.kotlin.descriptors.DeclarationDescriptor class KotlinAsJavaPlugin : DokkaPlugin() { @@ -15,7 +15,7 @@ class KotlinAsJavaPlugin : DokkaPlugin() { CoreExtensions.descriptorToDocumentationTranslator providing ::KotlinAsJavaDescriptorToDocumentationTranslator } val kotlinAsJavaDocumentableToPageTranslator by extending { - CoreExtensions.documentationToPageTranslator with KotlinAsJavaDocumentationToPageTranslator + CoreExtensions.documentablesToPageTranslator with KotlinAsJavaDocumentationToPageTranslator } } @@ -26,7 +26,7 @@ object DescriptorCache { operator fun get(dri: DRI): DeclarationDescriptor? = cache[dri] } -object KotlinAsJavaDocumentationToPageTranslator : DocumentationToPageTranslator { +object KotlinAsJavaDocumentationToPageTranslator : DocumentablesToPageTranslator { override fun invoke(module: Module, context: DokkaContext): ModulePageNode = KotlinAsJavaPageBuilder { node, kind, operation -> KotlinAsJavaPageContentBuilder.group( |