From 35851c4f00bde0b66ce1d9ae8ca02bab761df819 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 10 Mar 2020 14:18:11 +0100 Subject: Remove nested packages from packages --- .../kotlin/transformers/documentables/DefaultDocumentableMerger.kt | 1 - .../descriptors/DefaultDescriptorToDocumentableTranslator.kt | 1 - .../src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 3 +-- .../main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt | 1 - 4 files changed, 1 insertion(+), 5 deletions(-) (limited to 'plugins/base/src') diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt index 8ae2065b..654238a8 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt @@ -97,7 +97,6 @@ fun Package.mergeWith(other: Package): Package = copy( functions = mergeExpectActual(functions + other.functions, Function::mergeWith) { copy(platformData = it) }, properties = mergeExpectActual(properties + other.properties, Property::mergeWith) { copy(platformData = it) }, classlikes = mergeExpectActual(classlikes + other.classlikes, Classlike::mergeWith, Classlike::setPlatformData), - packages = merge(packages + other.packages, Package::mergeWith), documentation = documentation.mergeWith(other.documentation), platformData = (platformData + other.platformData).distinct() ).mergeExtras(this, other) diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index 72ce296d..a1fda688 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -78,7 +78,6 @@ private class DokkaDescriptorVisitor( // TODO: close this class and make it priv functions = scope.functions(driWithPlatform), properties = scope.properties(driWithPlatform), classlikes = scope.classlikes(driWithPlatform), - packages = scope.packages(driWithPlatform), documentation = descriptor.resolveDescriptorData(platformData), platformData = listOf(platformData) ) diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index d92bec19..c82af936 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -24,8 +24,7 @@ open class DefaultPageCreator( open fun pageForPackage(p: Package): PackagePageNode = PackagePageNode( p.name, contentForPackage(p), setOf(p.dri), p, p.classlikes.map(::pageForClasslike) + - p.functions.map(::pageForFunction) + - p.packages.map(::pageForPackage) + p.functions.map(::pageForFunction) ) open fun pageForClasslike(c: Classlike): ClasslikePageNode { diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt index 28391741..b07d248d 100644 --- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt @@ -47,7 +47,6 @@ object DefaultPsiToDocumentableTranslator : PsiToDocumentableTranslator { psiFiles.flatMap { psFile -> psFile.classes.map { docParser.parseClasslike(it, dri) } }, - emptyList(), PlatformDependent.empty(), listOf(platformData) ) -- cgit