aboutsummaryrefslogtreecommitdiff
path: root/plugins/kotlin-as-java/src
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-03-25 23:11:54 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-03-26 12:38:55 +0100
commitaad9a75c6ace63e883c8f737a9c4bd0933688adf (patch)
treeaa2926fd59e71419e930676754372ce130e23547 /plugins/kotlin-as-java/src
parent3f9dedbc9a0d559ab1320c395847ff88af7ad497 (diff)
downloaddokka-aad9a75c6ace63e883c8f737a9c4bd0933688adf.tar.gz
dokka-aad9a75c6ace63e883c8f737a9c4bd0933688adf.tar.bz2
dokka-aad9a75c6ace63e883c8f737a9c4bd0933688adf.zip
Fixing enum entries parsing for descriptors and presentation
Diffstat (limited to 'plugins/kotlin-as-java/src')
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
index 54bf663d..66328666 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -23,12 +23,15 @@ class JavaSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLogge
is DFunction -> signature(documentable)
is DProperty -> signature(documentable)
is DClasslike -> signature(documentable)
+ is DEnumEntry -> signature(documentable)
is DTypeParameter -> signature(documentable)
else -> throw NotImplementedError(
"Cannot generate signature for ${documentable::class.qualifiedName} ${documentable.name}"
)
}
+ private fun signature(e: DEnumEntry)= contentBuilder.contentFor(e, ContentKind.Symbol, setOf(TextStyle.Monospace))
+
private fun signature(c: DClasslike) = contentBuilder.contentFor(c, ContentKind.Symbol, setOf(TextStyle.Monospace)) {
platformText(c.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }