diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-06-04 16:44:25 +0200 |
---|---|---|
committer | BarkingBad <32793002+BarkingBad@users.noreply.github.com> | 2020-06-09 10:43:38 +0200 |
commit | 23e0d26139a09c7e2e157d1e0099ceab58d9bb48 (patch) | |
tree | 6770e453866595b6e212c43a9f73bbe9e1b6c78c /plugins/base/src/main | |
parent | 435e34fe4d63b85ec8f93155153eda0ea2303d73 (diff) | |
download | dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.tar.gz dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.tar.bz2 dokka-23e0d26139a09c7e2e157d1e0099ceab58d9bb48.zip |
Make enum entry constructor sourceset dependent
Diffstat (limited to 'plugins/base/src/main')
3 files changed, 8 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt index 367a7a95..c05dab3c 100644 --- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt +++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt @@ -37,9 +37,9 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog group(styles = setOf(TextStyle.Block)){ annotationsBlock(e) link(e.name, e.dri, styles = emptySet()) - e.extra[ConstructorValues]?.let { - list(it.values, prefix = "(", suffix = ")"){ - text(it) + e.extra[ConstructorValues]?.let { constructorValues -> + platformText(constructorValues.values, constructorValues.values.keys){ + it.joinToString(prefix = "(", postfix = ")") } } } diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt index a56eb454..f3b047bc 100644 --- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt +++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt @@ -219,7 +219,7 @@ private class DokkaDescriptorVisitor( extra = PropertyContainer.withAll( descriptor.additionalExtras(), descriptor.getAnnotations(), - ConstructorValues(descriptor.getAppliedConstructorParameters()) + ConstructorValues(descriptor.getAppliedConstructorParameters().toSourceSetDependent()) ) ) } diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index 7f9a8074..1954cec9 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -141,8 +141,10 @@ open class DefaultPageCreator( protected open fun contentForEnumEntry(e: DEnumEntry) = contentBuilder.contentFor(e) { group(kind = ContentKind.Cover) { header(1, e.name) - +buildSignature(e) - +contentForDescription(e) + sourceSetDependentHint(e.dri, e.sourceSets.toSet()) { + +buildSignature(e) + +contentForDescription(e) + } } group(styles = setOf(ContentStyle.TabbedContent)){ +contentForComments(e) |