aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main/kotlin')
-rw-r--r--plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt12
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt3
-rw-r--r--plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilter.kt1
-rw-r--r--plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt1
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt1
5 files changed, 17 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
index 7b35c455..30ec38bb 100644
--- a/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
+++ b/plugins/base/src/main/kotlin/signatures/KotlinSignatureProvider.kt
@@ -89,6 +89,18 @@ class KotlinSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLog
private fun propertySignature(p: DProperty, platformData: Set<PlatformData> = p.platformData.toSet()) =
contentBuilder.contentFor(p, ContentKind.Symbol, setOf(TextStyle.Monospace), platformData = platformData) {
+ platformText(p.visibility) { (it.takeIf { it !in ignoredVisibilities }?.name ?: "") + " " }
+ platformText(p.modifier){ it.name + " "}
+ p.setter?.let { text("var ") } ?: text("val ")
+ list(p.generics, prefix = "<", suffix = "> ") {
+ +buildSignature(it)
+ }
+ p.receiver?.also {
+ signatureForProjection(it.type)
+ text(".")
+ }
+ link(p.name, p.dri)
+ text(": ")
signatureForProjection(p.type)
}
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
index 4daa4a50..f871cdec 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DefaultDocumentableMerger.kt
@@ -132,7 +132,8 @@ fun DProperty.mergeWith(other: DProperty): DProperty = copy(
modifier = modifier.mergeWith(other.modifier),
platformData = (platformData + other.platformData).distinct(),
getter = getter?.let { g -> other.getter?.let { g.mergeWith(it) } ?: g } ?: other.getter,
- setter = setter?.let { s -> other.setter?.let { s.mergeWith(it) } ?: s } ?: other.setter
+ setter = setter?.let { s -> other.setter?.let { s.mergeWith(it) } ?: s } ?: other.setter,
+ generics = merge(generics + other.generics, DTypeParameter::mergeWith)
).mergeExtras(this, other)
fun DClasslike.setPlatformData(platformData: List<PlatformData>): DClasslike = when (this) {
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilter.kt b/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilter.kt
index 36441426..c261d2dc 100644
--- a/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilter.kt
+++ b/plugins/base/src/main/kotlin/transformers/documentables/DocumentableVisibilityFilter.kt
@@ -163,6 +163,7 @@ internal object DocumentableVisibilityFilter : PreMergeDocumentableTransformer {
getter,
modifier,
filteredPlatforms,
+ generics.mapNotNull { it.filter(filteredPlatforms) },
extra
)
}
diff --git a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
index 757a84e1..be18c592 100644
--- a/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/descriptors/DefaultDescriptorToDocumentableTranslator.kt
@@ -275,6 +275,7 @@ private class DokkaDescriptorVisitor(
else PlatformDependent.from(platformData, descriptor.modifier()),
type = descriptor.returnType!!.toBound(),
platformData = listOf(platformData),
+ generics = descriptor.typeParameters.map { it.toTypeParameter() },
extra = PropertyContainer.withAll(descriptor.additionalExtras(), descriptor.getAnnotations())
)
}
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index c0e1b4af..e5fa4bfc 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -357,6 +357,7 @@ object DefaultPsiToDocumentableTranslator : SourceToDocumentableTranslator {
accessors.firstOrNull { it.returnType == psi.type }?.let { parseFunction(it) },
psi.getModifier().toPlatformDependant(),
listOf(platformData),
+ emptyList(),
PropertyContainer.empty<DProperty>() + psi.annotations.toList().toExtra()
)
}