aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/pages
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-07-06 10:08:43 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-07-07 13:23:26 +0200
commit9e8455d8a5285bfbdd92cab1515270f695a9b5d3 (patch)
treeccd79e5b5cdb533dbb62e8de63930b5a6adbb851 /core/src/main/kotlin/pages
parent2da1f3b1612fd19be8082283c6d070759a42de12 (diff)
downloaddokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.tar.gz
dokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.tar.bz2
dokka-9e8455d8a5285bfbdd92cab1515270f695a9b5d3.zip
Make Location provider use anchor hints
Diffstat (limited to 'core/src/main/kotlin/pages')
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index 3843bb48..c8b767d3 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -2,6 +2,7 @@ package org.jetbrains.dokka.pages
import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
import org.jetbrains.dokka.links.DRI
+import org.jetbrains.dokka.model.WithChildren
import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.model.properties.WithExtraProperties
@@ -9,12 +10,15 @@ data class DCI(val dri: Set<DRI>, val kind: Kind) {
override fun toString() = "$dri[$kind]"
}
-interface ContentNode : WithExtraProperties<ContentNode> {
+interface ContentNode : WithExtraProperties<ContentNode>, WithChildren<ContentNode> {
val dci: DCI
val sourceSets: Set<DokkaSourceSet>
val style: Set<Style>
fun hasAnyContent(): Boolean
+
+ override val children: List<ContentNode>
+ get() = emptyList()
}
/** Simple text */
@@ -112,7 +116,7 @@ data class ContentEmbeddedResource(
/** Logical grouping of [ContentNode]s */
interface ContentComposite : ContentNode {
- val children: List<ContentNode>
+ override val children: List<ContentNode> // overwrite to make it abstract once again
override fun hasAnyContent(): Boolean = children.any { it.hasAnyContent() }
}