diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-08-20 15:57:32 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-08-20 16:56:21 +0200 |
commit | 3af779ff3377901d946a230f9900f5a508bf08e3 (patch) | |
tree | aebfa4994b49cd4efaad0443cb392da75ea22ac2 /plugins | |
parent | 0da70311b0535bbda18540d957570a46d19484f5 (diff) | |
download | dokka-3af779ff3377901d946a230f9900f5a508bf08e3.tar.gz dokka-3af779ff3377901d946a230f9900f5a508bf08e3.tar.bz2 dokka-3af779ff3377901d946a230f9900f5a508bf08e3.zip |
Revert unwanted changes
Diffstat (limited to 'plugins')
2 files changed, 22 insertions, 17 deletions
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<PageNode>, + override val name: String, + override val content: JavadocContentNode, + override val children: List<PageNode>, override val dri: Set<DRI> ) : - ModulePageNode(name, content, null, children, emptyList()), + RootPageNode(), JavadocPageNode { + override val documentable: Documentable? = null + override val embeddedResources: List<String> = emptyList() + override fun modified(name: String, children: List<PageNode>): RootPageNode = + JavadocModulePageNode(name, content, children, dri) + override fun modified( name: String, content: ContentNode, dri: Set<DRI>, embeddedResources: List<String>, children: List<PageNode> - ): ModulePageNode = JavadocModulePageNode(name, content as JavadocContentNode, children, dri) + ): ContentPage = JavadocModulePageNode(name, content as JavadocContentNode, children, dri) } class JavadocPackagePageNode( - name: String, - content: JavadocContentNode, - dri: Set<DRI>, + override val name: String, + override val content: JavadocContentNode, + override val dri: Set<DRI>, - documentable: Documentable? = null, - children: List<PageNode> = emptyList(), - embeddedResources: List<String> = listOf() -) : JavadocPageNode, WithIndexables, IndexableJavadocNode, PackagePageNode(name, content, dri, documentable, children, embeddedResources) { + override val documentable: Documentable? = null, + override val children: List<PageNode> = emptyList(), + override val embeddedResources: List<String> = listOf() +) : JavadocPageNode, WithIndexables, IndexableJavadocNode { override fun getAllIndexables(): List<IndexableJavadocNode> = children.filterIsInstance<IndexableJavadocNode>().flatMap { @@ -68,7 +73,7 @@ class JavadocPackagePageNode( override fun modified( name: String, children: List<PageNode> - ): PackagePageNode = JavadocPackagePageNode( + ): PageNode = JavadocPackagePageNode( name, content, dri, @@ -83,7 +88,7 @@ class JavadocPackagePageNode( dri: Set<DRI>, embeddedResources: List<String>, children: List<PageNode> - ): 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<JavadocPackagePageNode>() } @@ -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) |