From aad9a75c6ace63e883c8f737a9c4bd0933688adf Mon Sep 17 00:00:00 2001 From: Błażej Kardyś Date: Wed, 25 Mar 2020 23:11:54 +0100 Subject: Fixing enum entries parsing for descriptors and presentation --- .../kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins/kotlin-as-java') 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 ?: "") + " " } -- cgit