aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPaweł Marks <pmarks@virtuslab.com>2020-06-15 08:32:41 +0200
committerPaweł Marks <pmarks@virtuslab.com>2020-06-25 20:31:42 +0200
commit27ff92ac42a58844dd57340f7cada14cea8b5d7f (patch)
tree0136c7cc0f71dc8f8958005c0937f8ef867bcfcf /core
parenta4ada10ddc48605dbd13e731c95f0375ad7af9b4 (diff)
downloaddokka-27ff92ac42a58844dd57340f7cada14cea8b5d7f.tar.gz
dokka-27ff92ac42a58844dd57340f7cada14cea8b5d7f.tar.bz2
dokka-27ff92ac42a58844dd57340f7cada14cea8b5d7f.zip
Extract information about extensions
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/model/properties/PropertyContainer.kt3
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/main/kotlin/model/properties/PropertyContainer.kt b/core/src/main/kotlin/model/properties/PropertyContainer.kt
index e1e0250e..6009bfe0 100644
--- a/core/src/main/kotlin/model/properties/PropertyContainer.kt
+++ b/core/src/main/kotlin/model/properties/PropertyContainer.kt
@@ -23,6 +23,9 @@ class PropertyContainer<C : Any> internal constructor(
}
}
+operator fun <D: Any> PropertyContainer<D>.plus(prop: ExtraProperty<D>?): PropertyContainer<D> =
+ if (prop == null) this else PropertyContainer(map + (prop.key to prop))
+
interface WithExtraProperties<C : Any> {
val extra: PropertyContainer<C>
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index dc23a082..4e4c0fca 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -214,11 +214,11 @@ interface Kind
enum class ContentKind : Kind {
Comment, Constructors, Functions, Parameters, Properties, Classlikes, Packages, Symbol, Sample, Main, BriefComment,
- Empty, Source, TypeAliases, Cover, Inheritors, SourceSetDependantHint, Annotations;
+ Empty, Source, TypeAliases, Cover, Inheritors, SourceSetDependantHint, Extensions, Annotations;
companion object {
private val platformTagged =
- setOf(Constructors, Functions, Properties, Classlikes, Packages, Source, TypeAliases, Inheritors)
+ setOf(Constructors, Functions, Properties, Classlikes, Packages, Source, TypeAliases, Inheritors, Extensions)
fun shouldBePlatformTagged(kind: Kind): Boolean = kind in platformTagged
}