From 69d16856abcc68b31d298e6a62a7a58106de69c9 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Thu, 20 Aug 2020 16:19:42 +0200 Subject: Include interfaces to abstract model --- .../main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt | 10 ++++++++-- .../org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'plugins/javadoc/src/main/kotlin') diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt index cf45ef75..eb0b7b97 100644 --- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt +++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt @@ -9,6 +9,7 @@ import org.jetbrains.dokka.base.renderers.PackageListCreator import org.jetbrains.dokka.base.renderers.RootCreator import org.jetbrains.dokka.base.resolvers.shared.RecognizedLinkFormat import org.jetbrains.dokka.javadoc.pages.AllClassesPageInstaller +import org.jetbrains.dokka.javadoc.pages.IndexGenerator import org.jetbrains.dokka.javadoc.pages.ResourcesInstaller import org.jetbrains.dokka.javadoc.pages.TreeViewInstaller import org.jetbrains.dokka.kotlinAsJava.KotlinAsJavaPlugin @@ -63,8 +64,9 @@ class JavadocPlugin : DokkaPlugin() { val packageListCreator by extending { javadocPreprocessors providing { PackageListCreator( - it, - RecognizedLinkFormat.DokkaJavadoc + context = it, + format = RecognizedLinkFormat.DokkaJavadoc, + fileName = "element-list" ) } order { after(rootCreator) } } @@ -80,5 +82,9 @@ class JavadocPlugin : DokkaPlugin() { val allClassessPageInstaller by extending { javadocPreprocessors with AllClassesPageInstaller order { before(rootCreator) } } + + val indexGenerator by extending { + javadocPreprocessors with IndexGenerator order { before(rootCreator) } + } } 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 7bc6d6d8..31d879a2 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 @@ -38,7 +38,7 @@ class JavadocModulePageNode( override val dri: Set ) : RootPageNode(), - JavadocPageNode { + JavadocPageNode, ModulePage { override val documentable: Documentable? = null override val embeddedResources: List = emptyList() @@ -62,7 +62,7 @@ class JavadocPackagePageNode( override val documentable: Documentable? = null, override val children: List = emptyList(), override val embeddedResources: List = listOf() -) : JavadocPageNode, WithIndexables, IndexableJavadocNode { +) : JavadocPageNode, WithIndexables, IndexableJavadocNode, PackagePage { override fun getAllIndexables(): List = children.filterIsInstance().flatMap { @@ -172,7 +172,7 @@ class JavadocClasslikePageNode( override val children: List = emptyList(), override val embeddedResources: List = listOf(), override val extra: PropertyContainer = PropertyContainer.empty(), -) : JavadocPageNode, WithJavadocExtra, IndexableJavadocNode, WithIndexables, WithBrief { +) : JavadocPageNode, WithJavadocExtra, IndexableJavadocNode, WithIndexables, WithBrief, ClasslikePage { override fun getAllIndexables(): List = methods + entries + classlikes.map { it.getAllIndexables() }.flatten() + this -- cgit