From bee52be815bebd7012193728521636b5fbed2829 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 18 Feb 2020 17:47:14 +0100 Subject: Rename extensions to make them more uniform --- .../descriptors/DescriptorToDocumentableTranslator.kt | 13 +++++++++++++ .../descriptors/DescriptorToDocumentationTranslator.kt | 14 -------------- .../documentation/DocumentableToPageTranslator.kt | 8 ++++++++ .../transformers/documentation/DocumentableTransformer.kt | 8 ++++++++ .../documentation/DocumentablesToPageTranslator.kt | 9 --------- .../documentation/DocumentationNodeTransformer.kt | 8 -------- .../main/kotlin/transformers/pages/PageNodeTransformer.kt | 9 --------- .../src/main/kotlin/transformers/pages/PageTransformer.kt | 7 +++++++ .../transformers/psi/PsiToDocumentableTranslator.kt | 15 +++++++++++++++ .../transformers/psi/PsiToDocumentationTranslator.kt | 15 --------------- 10 files changed, 51 insertions(+), 55 deletions(-) create mode 100644 core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt delete mode 100644 core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt create mode 100644 core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt create mode 100644 core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt delete mode 100644 core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt delete mode 100644 core/src/main/kotlin/transformers/documentation/DocumentationNodeTransformer.kt delete mode 100644 core/src/main/kotlin/transformers/pages/PageNodeTransformer.kt create mode 100644 core/src/main/kotlin/transformers/pages/PageTransformer.kt create mode 100644 core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt delete mode 100644 core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt (limited to 'core/src/main/kotlin/transformers') diff --git a/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt b/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt new file mode 100644 index 00000000..d72eeafd --- /dev/null +++ b/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentableTranslator.kt @@ -0,0 +1,13 @@ +package org.jetbrains.dokka.transformers.descriptors + +import org.jetbrains.dokka.model.Module +import org.jetbrains.dokka.pages.PlatformData +import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor + +interface DescriptorToDocumentableTranslator { + fun invoke( + moduleName: String, + packageFragments: Iterable, + platformData: PlatformData + ): Module +} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt deleted file mode 100644 index 5074833e..00000000 --- a/core/src/main/kotlin/transformers/descriptors/DescriptorToDocumentationTranslator.kt +++ /dev/null @@ -1,14 +0,0 @@ -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 { - fun invoke( - moduleName: String, - packageFragments: Iterable, - platformData: PlatformData - ): Module -} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt new file mode 100644 index 00000000..e41e0c84 --- /dev/null +++ b/core/src/main/kotlin/transformers/documentation/DocumentableToPageTranslator.kt @@ -0,0 +1,8 @@ +package org.jetbrains.dokka.transformers.documentation + +import org.jetbrains.dokka.model.Module +import org.jetbrains.dokka.pages.ModulePageNode + +interface DocumentableToPageTranslator { + operator fun invoke(module: Module): ModulePageNode +} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt new file mode 100644 index 00000000..88a1514d --- /dev/null +++ b/core/src/main/kotlin/transformers/documentation/DocumentableTransformer.kt @@ -0,0 +1,8 @@ +package org.jetbrains.dokka.transformers.documentation + +import org.jetbrains.dokka.model.Module +import org.jetbrains.dokka.plugability.DokkaContext + +interface DocumentableTransformer { + operator fun invoke(original: Module, context: DokkaContext): Module +} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt b/core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt deleted file mode 100644 index 19698fa0..00000000 --- a/core/src/main/kotlin/transformers/documentation/DocumentablesToPageTranslator.kt +++ /dev/null @@ -1,9 +0,0 @@ -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 { - 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/DocumentationNodeTransformer.kt deleted file mode 100644 index d6358f07..00000000 --- a/core/src/main/kotlin/transformers/documentation/DocumentationNodeTransformer.kt +++ /dev/null @@ -1,8 +0,0 @@ -package org.jetbrains.dokka.transformers.documentation - -import org.jetbrains.dokka.model.Module -import org.jetbrains.dokka.plugability.DokkaContext - -interface DocumentationNodeTransformer { - 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/PageNodeTransformer.kt deleted file mode 100644 index 45357060..00000000 --- a/core/src/main/kotlin/transformers/pages/PageNodeTransformer.kt +++ /dev/null @@ -1,9 +0,0 @@ -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 { - operator fun invoke(input: RootPageNode): RootPageNode -} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/pages/PageTransformer.kt b/core/src/main/kotlin/transformers/pages/PageTransformer.kt new file mode 100644 index 00000000..218d9821 --- /dev/null +++ b/core/src/main/kotlin/transformers/pages/PageTransformer.kt @@ -0,0 +1,7 @@ +package org.jetbrains.dokka.transformers.pages + +import org.jetbrains.dokka.pages.RootPageNode + +interface PageTransformer { + operator fun invoke(input: RootPageNode): RootPageNode +} \ No newline at end of file diff --git a/core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt b/core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt new file mode 100644 index 00000000..1ea07ff3 --- /dev/null +++ b/core/src/main/kotlin/transformers/psi/PsiToDocumentableTranslator.kt @@ -0,0 +1,15 @@ +package org.jetbrains.dokka.transformers.psi + +import com.intellij.psi.PsiJavaFile +import org.jetbrains.dokka.model.Module +import org.jetbrains.dokka.pages.PlatformData +import org.jetbrains.dokka.plugability.DokkaContext + +interface PsiToDocumentableTranslator { + fun invoke( + moduleName: String, + psiFiles: List, + platformData: PlatformData, + context: DokkaContext + ): Module +} diff --git a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt b/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt deleted file mode 100644 index 41290ef8..00000000 --- a/core/src/main/kotlin/transformers/psi/PsiToDocumentationTranslator.kt +++ /dev/null @@ -1,15 +0,0 @@ -package org.jetbrains.dokka.transformers.psi - -import com.intellij.psi.PsiJavaFile -import org.jetbrains.dokka.model.Module -import org.jetbrains.dokka.pages.PlatformData -import org.jetbrains.dokka.plugability.DokkaContext - -interface PsiToDocumentationTranslator { - fun invoke( - moduleName: String, - psiFiles: List, - platformData: PlatformData, - context: DokkaContext - ): Module -} -- cgit