aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Model
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-02-16 21:28:16 +0300
committerDmitry Jemerov <yole@jetbrains.com>2017-02-23 11:20:13 +0100
commit7fa258873eab770577879e9721c0864449ba1114 (patch)
treefefbab3c102c00aa412dff4341c8160714f0c309 /core/src/main/kotlin/Model
parent2bd8bdf9dc0a8e48ce558b2eed0c8e8fd4883902 (diff)
downloaddokka-7fa258873eab770577879e9721c0864449ba1114.tar.gz
dokka-7fa258873eab770577879e9721c0864449ba1114.tar.bz2
dokka-7fa258873eab770577879e9721c0864449ba1114.zip
Dokka now can detect and recognize SinceKotlin
Diffstat (limited to 'core/src/main/kotlin/Model')
-rw-r--r--core/src/main/kotlin/Model/DocumentationNode.kt2
-rw-r--r--core/src/main/kotlin/Model/DocumentationReference.kt3
2 files changed, 4 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Model/DocumentationNode.kt b/core/src/main/kotlin/Model/DocumentationNode.kt
index def0f626..83897a3f 100644
--- a/core/src/main/kotlin/Model/DocumentationNode.kt
+++ b/core/src/main/kotlin/Model/DocumentationNode.kt
@@ -97,6 +97,8 @@ open class DocumentationNode(val name: String,
get() = references(RefKind.Annotation).map { it.to }
val deprecation: DocumentationNode?
get() = references(RefKind.Deprecation).singleOrNull()?.to
+ val sinceKotlin: DocumentationNode?
+ get() = references(RefKind.SinceKotlin).singleOrNull()?.to
// TODO: Should we allow node mutation? Model merge will copy by ref, so references are transparent, which could nice
fun addReferenceTo(to: DocumentationNode, kind: RefKind) {
diff --git a/core/src/main/kotlin/Model/DocumentationReference.kt b/core/src/main/kotlin/Model/DocumentationReference.kt
index 0165b567..8263cd6a 100644
--- a/core/src/main/kotlin/Model/DocumentationReference.kt
+++ b/core/src/main/kotlin/Model/DocumentationReference.kt
@@ -18,7 +18,8 @@ enum class RefKind {
Annotation,
HiddenAnnotation,
Deprecation,
- TopLevelPage
+ TopLevelPage,
+ SinceKotlin
}
data class DocumentationReference(val from: DocumentationNode, val to: DocumentationNode, val kind: RefKind) {