aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-06-15 13:47:30 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-06-25 14:56:46 +0200
commitfa8b850977788339d1ce62cd0e3e87e681071584 (patch)
tree904971df1033f285d254048bf5d31ea0ef0cd527 /plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt
parent44650369a1f151ddbf890a1d370daea0b7982124 (diff)
downloaddokka-fa8b850977788339d1ce62cd0e3e87e681071584.tar.gz
dokka-fa8b850977788339d1ce62cd0e3e87e681071584.tar.bz2
dokka-fa8b850977788339d1ce62cd0e3e87e681071584.zip
Make signatures groups be unique per sourceSet data
Diffstat (limited to 'plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt')
-rw-r--r--plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt
index a551efdc..40f7dfda 100644
--- a/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt
+++ b/plugins/base/src/main/kotlin/signatures/JvmSignatureUtils.kt
@@ -1,6 +1,7 @@
package org.jetbrains.dokka.base.signatures
import org.jetbrains.dokka.base.translators.documentables.PageContentBuilder
+import org.jetbrains.dokka.links.DRI
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.*
@@ -128,6 +129,12 @@ interface JvmSignatureUtils {
text(Typography.nbsp.toString())
}
}
+
+ fun <T : Documentable> WithExtraProperties<T>.stylesForDeprecated(sourceSetData: SourceSetData): Set<TextStyle> =
+ if (extra[Annotations]?.content?.get(sourceSetData)?.any {
+ it.dri == DRI("kotlin", "Deprecated")
+ || it.dri == DRI("java.lang", "Deprecated")
+ } == true) setOf(TextStyle.Strikethrough) else emptySet()
}
sealed class AtStrategy