From 27ff92ac42a58844dd57340f7cada14cea8b5d7f Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Mon, 15 Jun 2020 08:32:41 +0200 Subject: Extract information about extensions --- core/src/main/kotlin/model/properties/PropertyContainer.kt | 3 +++ core/src/main/kotlin/pages/ContentNodes.kt | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'core/src/main') 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 internal constructor( } } +operator fun PropertyContainer.plus(prop: ExtraProperty?): PropertyContainer = + if (prop == null) this else PropertyContainer(map + (prop.key to prop)) + interface WithExtraProperties { val extra: PropertyContainer 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 } -- cgit