aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/CoreExtensions.kt20
-rw-r--r--core/src/main/kotlin/DokkaGenerator.kt8
-rw-r--r--core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt (renamed from core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt)3
-rw-r--r--core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt (renamed from core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt)3
-rw-r--r--core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt (renamed from core/src/main/kotlin/transformers/documentation/DocumentationNodeTransformer.kt)2
-rw-r--r--core/src/main/kotlin/transformers/pages/PageTransformer.kt (renamed from core/src/main/kotlin/transformers/pages/PageNodeTransformer.kt)4
-rw-r--r--core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt (renamed from core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt)2
-rw-r--r--plugins/base/src/main/kotlin/DokkaBase.kt24
-rw-r--r--plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt4
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt12
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/merger/PageMerger.kt (renamed from plugins/base/src/main/kotlin/transformers/pages/merger/PageNodeMerger.kt)4
-rw-r--r--plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentableTranslator.kt (renamed from plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt)4
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt (renamed from plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentationTranslator.kt)6
-rw-r--r--plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt (renamed from plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentablesToPageTranslator.kt)6
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentableTranslator.kt (renamed from plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentationTranslator.kt)6
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt15
-rw-r--r--plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt7
17 files changed, 63 insertions, 67 deletions
diff --git a/core/src/main/kotlin/CoreExtensions.kt b/core/src/main/kotlin/CoreExtensions.kt
index 82a1c367..dd6eab1b 100644
--- a/core/src/main/kotlin/CoreExtensions.kt
+++ b/core/src/main/kotlin/CoreExtensions.kt
@@ -2,21 +2,21 @@ package org.jetbrains.dokka
import org.jetbrains.dokka.plugability.ExtensionPoint
import org.jetbrains.dokka.renderers.Renderer
-import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentationTranslator
+import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentableTranslator
import org.jetbrains.dokka.transformers.documentation.DocumentableMerger
-import org.jetbrains.dokka.transformers.documentation.DocumentationNodeTransformer
-import org.jetbrains.dokka.transformers.documentation.DocumentablesToPageTranslator
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
-import org.jetbrains.dokka.transformers.psi.PsiToDocumentationTranslator
+import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator
+import org.jetbrains.dokka.transformers.documentation.DocumentableTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
+import org.jetbrains.dokka.transformers.psi.PsiToDocumentableTranslator
import kotlin.reflect.KProperty
object CoreExtensions {
- val descriptorToDocumentationTranslator by coreExtension<DescriptorToDocumentationTranslator>()
- val psiToDocumentationTranslator by coreExtension<PsiToDocumentationTranslator>()
+ val descriptorToDocumentableTranslator by coreExtension<DescriptorToDocumentableTranslator>()
+ val psiToDocumentableTranslator by coreExtension<PsiToDocumentableTranslator>()
val documentableMerger by coreExtension<DocumentableMerger>()
- val documentationTransformer by coreExtension<DocumentationNodeTransformer>()
- val documentablesToPageTranslator by coreExtension<DocumentablesToPageTranslator>()
- val pageTransformer by coreExtension<PageNodeTransformer>()
+ val documentableTransformer by coreExtension<DocumentableTransformer>()
+ val documentableToPageTranslator by coreExtension<DocumentableToPageTranslator>()
+ val pageTransformer by coreExtension<PageTransformer>()
val renderer by coreExtension<Renderer>()
private fun <T: Any> coreExtension() = object {
diff --git a/core/src/main/kotlin/DokkaGenerator.kt b/core/src/main/kotlin/DokkaGenerator.kt
index 8897e68d..e318e969 100644
--- a/core/src/main/kotlin/DokkaGenerator.kt
+++ b/core/src/main/kotlin/DokkaGenerator.kt
@@ -83,12 +83,12 @@ class DokkaGenerator(
fun transformDocumentationModel(
documentationModel: Module,
context: DokkaContext
- ) = context[CoreExtensions.documentationTransformer].fold(documentationModel) { acc, t -> t(acc, context) }
+ ) = context[CoreExtensions.documentableTransformer].fold(documentationModel) { acc, t -> t(acc, context) }
fun createPages(
transformedDocumentation: Module,
context: DokkaContext
- ) = context.single(CoreExtensions.documentablesToPageTranslator).invoke(transformedDocumentation)
+ ) = context.single(CoreExtensions.documentableToPageTranslator).invoke(transformedDocumentation)
fun transformPages(
pages: RootPageNode,
@@ -128,7 +128,7 @@ class DokkaGenerator(
.mapNotNull { facade.resolveSession.getPackageFragment(it) }
.toList()
- return context.single(CoreExtensions.descriptorToDocumentationTranslator)
+ return context.single(CoreExtensions.descriptorToDocumentableTranslator)
.invoke(platformData.name, packageFragments, platformData)
}
@@ -149,7 +149,7 @@ class DokkaGenerator(
}.toList()
}.flatten()
- return context.single(CoreExtensions.psiToDocumentationTranslator)
+ return context.single(CoreExtensions.psiToDocumentableTranslator)
.invoke(platformData.name, psiFiles, platformData, context)
}
diff --git a/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt
index 5074833e..d72eeafd 100644
--- a/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt
+++ b/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt
@@ -2,10 +2,9 @@ package org.jetbrains.dokka.transformers.descriptors
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.PlatformData
-import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
-interface DescriptorToDocumentationTranslator {
+interface DescriptorToDocumentableTranslator {
fun invoke(
moduleName: String,
packageFragments: Iterable<PackageFragmentDescriptor>,
diff --git a/core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt
index 19698fa0..e41e0c84 100644
--- a/core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt
+++ b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt
@@ -2,8 +2,7 @@ package org.jetbrains.dokka.transformers.documentation
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.ModulePageNode
-import org.jetbrains.dokka.plugability.DokkaContext
-interface DocumentablesToPageTranslator {
+interface DocumentableToPageTranslator {
operator fun invoke(module: Module): ModulePageNode
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/documentation/DocumentationNodeTransformer.kt b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt
index d6358f07..88a1514d 100644
--- a/core/src/main/kotlin/transformers/documentation/DocumentationNodeTransformer.kt
+++ b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt
@@ -3,6 +3,6 @@ package org.jetbrains.dokka.transformers.documentation
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.plugability.DokkaContext
-interface DocumentationNodeTransformer {
+interface DocumentableTransformer {
operator fun invoke(original: Module, context: DokkaContext): Module
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/pages/PageNodeTransformer.kt b/core/src/main/kotlin/transformers/pages/PageTransformer.kt
index 45357060..218d9821 100644
--- a/core/src/main/kotlin/transformers/pages/PageNodeTransformer.kt
+++ b/core/src/main/kotlin/transformers/pages/PageTransformer.kt
@@ -1,9 +1,7 @@
package org.jetbrains.dokka.transformers.pages
-import org.jetbrains.dokka.pages.ModulePageNode
import org.jetbrains.dokka.pages.RootPageNode
-import org.jetbrains.dokka.plugability.DokkaContext
-interface PageNodeTransformer {
+interface PageTransformer {
operator fun invoke(input: RootPageNode): RootPageNode
} \ No newline at end of file
diff --git a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt
index 41290ef8..1ea07ff3 100644
--- a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt
+++ b/core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt
@@ -5,7 +5,7 @@ import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.plugability.DokkaContext
-interface PsiToDocumentationTranslator {
+interface PsiToDocumentableTranslator {
fun invoke(
moduleName: String,
psiFiles: List<PsiJavaFile>,
diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt
index e7cd61a8..489da3ef 100644
--- a/plugins/base/src/main/kotlin/DokkaBase.kt
+++ b/plugins/base/src/main/kotlin/DokkaBase.kt
@@ -7,15 +7,15 @@ import org.jetbrains.dokka.base.renderers.html.HtmlRenderer
import org.jetbrains.dokka.base.resolvers.DefaultLocationProviderFactory
import org.jetbrains.dokka.base.resolvers.LocationProviderFactory
import org.jetbrains.dokka.base.transformers.documentables.DefaultDocumentableMerger
-import org.jetbrains.dokka.base.translators.documentables.DefaultDocumentablesToPageTranslator
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.base.transformers.pages.comments.DocTagToContentConverter
import org.jetbrains.dokka.base.transformers.pages.merger.FallbackPageMergerStrategy
+import org.jetbrains.dokka.base.transformers.pages.merger.PageMerger
import org.jetbrains.dokka.base.transformers.pages.merger.PageMergerStrategy
-import org.jetbrains.dokka.base.transformers.pages.merger.PageNodeMerger
import org.jetbrains.dokka.base.transformers.pages.merger.SameMethodNamePageMergerStrategy
-import org.jetbrains.dokka.base.transformers.psi.DefaultPsiToDocumentationTranslator
-import org.jetbrains.dokka.base.translators.descriptors.DefaultDescriptorToDocumentationTranslator
+import org.jetbrains.dokka.base.transformers.psi.DefaultPsiToDocumentableTranslator
+import org.jetbrains.dokka.base.translators.descriptors.DefaultDescriptorToDocumentableTranslator
+import org.jetbrains.dokka.base.translators.documentables.DefaultDocumentableToPageTranslator
import org.jetbrains.dokka.plugability.DokkaPlugin
class DokkaBase : DokkaPlugin() {
@@ -24,21 +24,21 @@ class DokkaBase : DokkaPlugin() {
val locationProviderFactory by extensionPoint<LocationProviderFactory>()
val outputWriter by extensionPoint<OutputWriter>()
- val descriptorToDocumentationTranslator by extending(isFallback = true) {
- CoreExtensions.descriptorToDocumentationTranslator providing ::DefaultDescriptorToDocumentationTranslator
+ val descriptorToDocumentableTranslator by extending(isFallback = true) {
+ CoreExtensions.descriptorToDocumentableTranslator providing ::DefaultDescriptorToDocumentableTranslator
}
- val psiToDocumentationTranslator by extending(isFallback = true) {
- CoreExtensions.psiToDocumentationTranslator with DefaultPsiToDocumentationTranslator
+ val psiToDocumentableTranslator by extending(isFallback = true) {
+ CoreExtensions.psiToDocumentableTranslator with DefaultPsiToDocumentableTranslator
}
val documentableMerger by extending(isFallback = true) {
CoreExtensions.documentableMerger with DefaultDocumentableMerger
}
- val documentablesToPageTranslator by extending(isFallback = true) {
- CoreExtensions.documentablesToPageTranslator providing { ctx ->
- DefaultDocumentablesToPageTranslator(ctx.single(commentsToContentConverter), ctx.logger)
+ val documentableToPageTranslator by extending(isFallback = true) {
+ CoreExtensions.documentableToPageTranslator providing { ctx ->
+ DefaultDocumentableToPageTranslator(ctx.single(commentsToContentConverter), ctx.logger)
}
}
@@ -47,7 +47,7 @@ class DokkaBase : DokkaPlugin() {
}
val pageMerger by extending {
- CoreExtensions.pageTransformer providing { ctx -> PageNodeMerger(ctx[pageMergerStrategy]) }
+ CoreExtensions.pageTransformer providing { ctx -> PageMerger(ctx[pageMergerStrategy]) }
}
val fallbackMerger by extending {
diff --git a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
index 75034bda..9c22c879 100644
--- a/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/DefaultRenderer.kt
@@ -7,7 +7,7 @@ import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.plugin
import org.jetbrains.dokka.plugability.querySingle
import org.jetbrains.dokka.renderers.Renderer
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
abstract class DefaultRenderer<T>(
protected val context: DokkaContext
@@ -18,7 +18,7 @@ abstract class DefaultRenderer<T>(
protected lateinit var locationProvider: LocationProvider
private set
- protected open val preprocessors: Iterable<PageNodeTransformer> = emptyList()
+ protected open val preprocessors: Iterable<PageTransformer> = emptyList()
abstract fun T.buildHeader(level: Int, content: T.() -> Unit)
abstract fun T.buildLink(address: String, content: T.() -> Unit)
diff --git a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt
index ecd2e89a..9db0f2a8 100644
--- a/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/htmlPreprocessors.kt
@@ -6,14 +6,14 @@ import kotlinx.html.table
import kotlinx.html.tbody
import org.jetbrains.dokka.base.renderers.platforms
import org.jetbrains.dokka.pages.*
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
-object RootCreator : PageNodeTransformer {
+object RootCreator : PageTransformer {
override fun invoke(input: RootPageNode) =
RendererSpecificRootPage("", listOf(input), RenderingStrategy.DoNothing)
}
-object SearchPageInstaller : PageNodeTransformer {
+object SearchPageInstaller : PageTransformer {
override fun invoke(input: RootPageNode) = input.modified(children = input.children + searchPage)
private val searchPage = RendererSpecificResourcePage(
@@ -34,7 +34,7 @@ object SearchPageInstaller : PageNodeTransformer {
})
}
-object NavigationPageInstaller : PageNodeTransformer {
+object NavigationPageInstaller : PageTransformer {
override fun invoke(input: RootPageNode) = input.modified(
children = input.children + NavigationPage(
input.children.filterIsInstance<ContentPage>().single().let(::visit)
@@ -48,7 +48,7 @@ object NavigationPageInstaller : PageNodeTransformer {
page.children.filterIsInstance<ContentPage>().map { visit(it) })
}
-object ResourceInstaller : PageNodeTransformer {
+object ResourceInstaller : PageTransformer {
override fun invoke(input: RootPageNode) = input.modified(children = input.children + resourcePages)
private val resourcePages = listOf("styles", "scripts", "images").map {
@@ -56,7 +56,7 @@ object ResourceInstaller : PageNodeTransformer {
}
}
-object StyleAndScriptsAppender : PageNodeTransformer {
+object StyleAndScriptsAppender : PageTransformer {
override fun invoke(input: RootPageNode) = input.transformContentPagesTree {
it.modified(
embeddedResources = it.embeddedResources + listOf(
diff --git a/plugins/base/src/main/kotlin/transformers/pages/merger/PageNodeMerger.kt b/plugins/base/src/main/kotlin/transformers/pages/merger/PageMerger.kt
index 96cd126c..93d42e7e 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/merger/PageNodeMerger.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/merger/PageMerger.kt
@@ -2,9 +2,9 @@ package org.jetbrains.dokka.base.transformers.pages.merger
import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
-class PageNodeMerger(private val strategies: Iterable<PageMergerStrategy>) : PageNodeTransformer {
+class PageMerger(private val strategies: Iterable<PageMergerStrategy>) : PageTransformer {
override fun invoke(input: RootPageNode): RootPageNode =
input.modified(children = input.children.map { it.mergeChildren(emptyList()) })
diff --git a/plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt b/plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentableTranslator.kt
index b913ae88..364cb34b 100644
--- a/plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentationTranslator.kt
+++ b/plugins/base/src/main/kotlin/transformers/psi/DefaultPsiToDocumentableTranslator.kt
@@ -10,11 +10,11 @@ import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.Function
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.dokka.transformers.psi.PsiToDocumentationTranslator
+import org.jetbrains.dokka.transformers.psi.PsiToDocumentableTranslator
import org.jetbrains.dokka.utilities.DokkaLogger
import org.jetbrains.kotlin.descriptors.Visibilities
-object DefaultPsiToDocumentationTranslator : PsiToDocumentationTranslator {
+object DefaultPsiToDocumentableTranslator : PsiToDocumentableTranslator {
override fun invoke(
moduleName: String,
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentationTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index bb572034..95795ece 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentationTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -12,7 +12,7 @@ import org.jetbrains.dokka.model.doc.*
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.parsers.MarkdownParser
import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentationTranslator
+import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentableTranslator
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies
import org.jetbrains.kotlin.idea.kdoc.findKDoc
@@ -22,9 +22,9 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
import org.jetbrains.kotlin.resolve.scopes.MemberScope
import kotlin.reflect.KClass
-class DefaultDescriptorToDocumentationTranslator(
+class DefaultDescriptorToDocumentableTranslator(
private val context: DokkaContext
-) : DescriptorToDocumentationTranslator {
+) : DescriptorToDocumentableTranslator {
override fun invoke(
moduleName: String,
packageFragments: Iterable<PackageFragmentDescriptor>,
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentablesToPageTranslator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt
index ee3ae995..f577c8f4 100644
--- a/plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentablesToPageTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultDocumentableToPageTranslator.kt
@@ -3,14 +3,14 @@ package org.jetbrains.dokka.base.translators.documentables
import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.ModulePageNode
-import org.jetbrains.dokka.transformers.documentation.DocumentablesToPageTranslator
+import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator
import org.jetbrains.dokka.utilities.DokkaLogger
-class DefaultDocumentablesToPageTranslator(
+class DefaultDocumentableToPageTranslator(
private val commentsToContentConverter: CommentsToContentConverter,
private val logger: DokkaLogger
-) : DocumentablesToPageTranslator {
+) : DocumentableToPageTranslator {
override fun invoke(module: Module): ModulePageNode =
DefaultPageBuilder { node, kind, operation ->
DefaultPageContentBuilder.group(
diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentationTranslator.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentableTranslator.kt
index 618ecfcc..3b615dcb 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentationTranslator.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaDescriptorToDocumentableTranslator.kt
@@ -11,12 +11,12 @@ import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.Function
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.plugability.DokkaContext
-import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentationTranslator
+import org.jetbrains.dokka.transformers.descriptors.DescriptorToDocumentableTranslator
import org.jetbrains.kotlin.descriptors.*
-class KotlinAsJavaDescriptorToDocumentationTranslator(
+class KotlinAsJavaDescriptorToDocumentableTranslator(
private val context: DokkaContext
-) : DescriptorToDocumentationTranslator {
+) : DescriptorToDocumentableTranslator {
override fun invoke(
moduleName: String,
packageFragments: Iterable<PackageFragmentDescriptor>,
diff --git a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt
index f9389ebd..1a6bc0db 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/KotlinAsJavaPlugin.kt
@@ -3,21 +3,22 @@ package org.jetbrains.dokka.kotlinAsJava
import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.base.DokkaBase
-import org.jetbrains.dokka.base.transformers.pages.comments.CommentsToContentConverter
import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.Module
import org.jetbrains.dokka.pages.ModulePageNode
-import org.jetbrains.dokka.plugability.*
-import org.jetbrains.dokka.transformers.documentation.DocumentablesToPageTranslator
-import org.jetbrains.dokka.utilities.DokkaLogger
+import org.jetbrains.dokka.plugability.DokkaContext
+import org.jetbrains.dokka.plugability.DokkaPlugin
+import org.jetbrains.dokka.plugability.plugin
+import org.jetbrains.dokka.plugability.querySingle
+import org.jetbrains.dokka.transformers.documentation.DocumentableToPageTranslator
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
class KotlinAsJavaPlugin : DokkaPlugin() {
val kotlinAsJavaDescriptorToDocumentableTranslator by extending {
- CoreExtensions.descriptorToDocumentationTranslator providing ::KotlinAsJavaDescriptorToDocumentationTranslator
+ CoreExtensions.descriptorToDocumentableTranslator providing ::KotlinAsJavaDescriptorToDocumentableTranslator
}
val kotlinAsJavaDocumentableToPageTranslator by extending {
- CoreExtensions.documentablesToPageTranslator providing ::KotlinAsJavaDocumentationToPageTranslator
+ CoreExtensions.documentableToPageTranslator providing ::KotlinAsJavaDocumentationToPageTranslator
}
}
@@ -30,7 +31,7 @@ object DescriptorCache {
class KotlinAsJavaDocumentationToPageTranslator(
private val context: DokkaContext
-) : DocumentablesToPageTranslator {
+) : DocumentableToPageTranslator {
override fun invoke(module: Module): ModulePageNode =
KotlinAsJavaPageBuilder { node, kind, operation ->
KotlinAsJavaPageContentBuilder.group(
diff --git a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
index 52723157..cded0929 100644
--- a/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
+++ b/plugins/mathjax/src/main/kotlin/MathjaxPlugin.kt
@@ -1,13 +1,12 @@
package org.jetbrains.dokka.mathjax
-import org.jetbrains.dokka.model.doc.CustomWrapperTag
import org.jetbrains.dokka.CoreExtensions
+import org.jetbrains.dokka.model.doc.CustomWrapperTag
import org.jetbrains.dokka.pages.ContentPage
-import org.jetbrains.dokka.pages.PageNode
import org.jetbrains.dokka.pages.RootPageNode
import org.jetbrains.dokka.plugability.DokkaPlugin
-import org.jetbrains.dokka.transformers.pages.PageNodeTransformer
+import org.jetbrains.dokka.transformers.pages.PageTransformer
class MathjaxPlugin : DokkaPlugin() {
val transformer by extending {
@@ -18,7 +17,7 @@ class MathjaxPlugin : DokkaPlugin() {
private const val ANNOTATION = "usesMathJax"
private const val LIB_PATH = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS_SVG&latest"
-object MathjaxTransformer : PageNodeTransformer {
+object MathjaxTransformer : PageTransformer {
override fun invoke(input: RootPageNode) = input.transformContentPagesTree {
it.modified(
embeddedResources = it.embeddedResources + if (it.isNeedingMathjax) listOf(LIB_PATH) else emptyList()