From 3af779ff3377901d946a230f9900f5a508bf08e3 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 20 Aug 2020 15:57:32 +0200 Subject: Revert unwanted changes --- .../dokka/javadoc/pages/JavadocPageNodes.kt | 33 +++++++++++++--------- .../dokka/javadoc/renderer/SearchScriptsCreator.kt | 6 ++-- 2 files changed, 22 insertions(+), 17 deletions(-) (limited to 'plugins/javadoc/src/main/kotlin/org') diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt index 24719ebf..7bc6d6d8 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt @@ -32,32 +32,37 @@ interface WithBrief { } class JavadocModulePageNode( - name: String, - content: JavadocContentNode, - children: List, + override val name: String, + override val content: JavadocContentNode, + override val children: List, override val dri: Set ) : - ModulePageNode(name, content, null, children, emptyList()), + RootPageNode(), JavadocPageNode { + override val documentable: Documentable? = null + override val embeddedResources: List = emptyList() + override fun modified(name: String, children: List): RootPageNode = + JavadocModulePageNode(name, content, children, dri) + override fun modified( name: String, content: ContentNode, dri: Set, embeddedResources: List, children: List - ): ModulePageNode = JavadocModulePageNode(name, content as JavadocContentNode, children, dri) + ): ContentPage = JavadocModulePageNode(name, content as JavadocContentNode, children, dri) } class JavadocPackagePageNode( - name: String, - content: JavadocContentNode, - dri: Set, + override val name: String, + override val content: JavadocContentNode, + override val dri: Set, - documentable: Documentable? = null, - children: List = emptyList(), - embeddedResources: List = listOf() -) : JavadocPageNode, WithIndexables, IndexableJavadocNode, PackagePageNode(name, content, dri, documentable, children, embeddedResources) { + override val documentable: Documentable? = null, + override val children: List = emptyList(), + override val embeddedResources: List = listOf() +) : JavadocPageNode, WithIndexables, IndexableJavadocNode { override fun getAllIndexables(): List = children.filterIsInstance().flatMap { @@ -68,7 +73,7 @@ class JavadocPackagePageNode( override fun modified( name: String, children: List - ): PackagePageNode = JavadocPackagePageNode( + ): PageNode = JavadocPackagePageNode( name, content, dri, @@ -83,7 +88,7 @@ class JavadocPackagePageNode( dri: Set, embeddedResources: List, children: List - ): PackagePageNode = + ): ContentPage = JavadocPackagePageNode( name, content as JavadocContentNode, diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt index 0c2d8e07..9e599285 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/renderer/SearchScriptsCreator.kt @@ -58,7 +58,7 @@ class SearchScriptsCreator(private val locationProvider: LocationProvider) { val modules = SearchData(moduleRecords = input.map { SearchRecord( l = it.name, - url = locationProvider.resolve(it).formatToEndWithHtml() + url = locationProvider.resolveOrThrow(it).formatToEndWithHtml() ) }) val processablePackages = input.flatMap { it.children.filterIsInstance() } @@ -69,7 +69,7 @@ class SearchScriptsCreator(private val locationProvider: LocationProvider) { val packages = input.map { SearchRecord( l = it.name, - url = locationProvider.resolve(it).formatToEndWithHtml() + url = locationProvider.resolveOrThrow(it).formatToEndWithHtml() ) } + SearchRecord.allPackages val types = input.flatMap { @@ -87,7 +87,7 @@ class SearchScriptsCreator(private val locationProvider: LocationProvider) { SearchRecord( p = it.first.name, l = it.second.name, - url = locationProvider.resolve(it.second).formatToEndWithHtml() + url = locationProvider.resolveOrThrow(it.second).formatToEndWithHtml() ) } + allTypes val updated = accumulator.copy(typeRecords = types) -- cgit