aboutsummaryrefslogtreecommitdiff
path: root/plugins/javadoc
diff options
context:
space:
mode:
authorMarcin Aman <maman@virtuslab.com>2020-08-20 16:19:42 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-08-20 16:56:21 +0200
commit69d16856abcc68b31d298e6a62a7a58106de69c9 (patch)
treed2ec056c46382f0e1807ab4b410431c4fde957ec /plugins/javadoc
parent3af779ff3377901d946a230f9900f5a508bf08e3 (diff)
downloaddokka-69d16856abcc68b31d298e6a62a7a58106de69c9.tar.gz
dokka-69d16856abcc68b31d298e6a62a7a58106de69c9.tar.bz2
dokka-69d16856abcc68b31d298e6a62a7a58106de69c9.zip
Include interfaces to abstract model
Diffstat (limited to 'plugins/javadoc')
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/JavadocPlugin.kt10
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/pages/JavadocPageNodes.kt6
-rw-r--r--plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt8
3 files changed, 15 insertions, 9 deletions
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<DRI>
) :
RootPageNode(),
- JavadocPageNode {
+ JavadocPageNode, ModulePage {
override val documentable: Documentable? = null
override val embeddedResources: List<String> = emptyList()
@@ -62,7 +62,7 @@ class JavadocPackagePageNode(
override val documentable: Documentable? = null,
override val children: List<PageNode> = emptyList(),
override val embeddedResources: List<String> = listOf()
-) : JavadocPageNode, WithIndexables, IndexableJavadocNode {
+) : JavadocPageNode, WithIndexables, IndexableJavadocNode, PackagePage {
override fun getAllIndexables(): List<IndexableJavadocNode> =
children.filterIsInstance<IndexableJavadocNode>().flatMap {
@@ -172,7 +172,7 @@ class JavadocClasslikePageNode(
override val children: List<PageNode> = emptyList(),
override val embeddedResources: List<String> = listOf(),
override val extra: PropertyContainer<DClasslike> = PropertyContainer.empty(),
-) : JavadocPageNode, WithJavadocExtra<DClasslike>, IndexableJavadocNode, WithIndexables, WithBrief {
+) : JavadocPageNode, WithJavadocExtra<DClasslike>, IndexableJavadocNode, WithIndexables, WithBrief, ClasslikePage {
override fun getAllIndexables(): List<IndexableJavadocNode> =
methods + entries + classlikes.map { it.getAllIndexables() }.flatten() + this
diff --git a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
index f31b5793..b3b21909 100644
--- a/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
+++ b/plugins/javadoc/src/test/kotlin/org/jetbrains/dokka/javadoc/packagelist/JavadocPackageListTest.kt
@@ -26,13 +26,13 @@ internal class JavadocPackageListTest : AbstractJavadocTemplateMapTest() {
){
val contents = writerPlugin.writer.contents
val expected = """
- ${'$'}dokka.format:dokkaJavadoc
+ ${'$'}dokka.format:javadoc-v1
${'$'}dokka.linkExtension:html
package0
package1
""".trimIndent()
- assertEquals(expected, contents["/package-list"]?.trimIndent())
+ assertEquals(expected, contents["/element-list"]?.trimIndent())
}
}
@@ -61,14 +61,14 @@ internal class JavadocPackageListTest : AbstractJavadocTemplateMapTest() {
){
val contents = writerPlugin.writer.contents
val expected = """
- ${'$'}dokka.format:dokkaJavadoc
+ ${'$'}dokka.format:javadoc-v1
${'$'}dokka.linkExtension:html
package0
package0.package0Inner
package1.package1Inner.package1InnerInner
""".trimIndent()
- assertEquals(expected, contents["/package-list"]?.trimIndent())
+ assertEquals(expected, contents["/element-list"]?.trimIndent())
}
}
} \ No newline at end of file