diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/CoreExtensions.kt | 20 | ||||
-rw-r--r-- | core/src/main/kotlin/DokkaGenerator.kt | 8 | ||||
-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 |
7 files changed, 19 insertions, 23 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>, |