aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt2
-rw-r--r--plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt8
-rw-r--r--plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt3
3 files changed, 7 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt
index c099644f..5babc289 100644
--- a/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt
+++ b/plugins/base/src/main/kotlin/transformers/pages/samples/KotlinWebsiteSamplesTransformer.kt
@@ -178,7 +178,7 @@ class KotlinWebsiteSamplesTransformer(context: DokkaContext): SamplesTransformer
override fun processBody(psiElement: PsiElement): String {
val text = processSampleBody(psiElement).trim { it == '\n' || it == '\r' }.trimEnd()
val lines = text.split("\n")
- val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.min() ?: 0
+ val indent = lines.filter(String::isNotBlank).map { it.takeWhile(Char::isWhitespace).count() }.minOrNull() ?: 0
return lines.joinToString("\n") { it.drop(indent) }
}
diff --git a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt
index e8ec0933..4d40b347 100644
--- a/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt
+++ b/plugins/javadoc/src/main/kotlin/org/jetbrains/dokka/javadoc/signatures/JavadocSignatureProvider.kt
@@ -95,13 +95,13 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo
}
private fun signature(f: DFunction): List<ContentNode> =
- javadocSignature(f) {
+ javadocSignature(f) { sourceSet ->
annotations {
annotationsBlock(f)
}
modifiers {
- text(f.modifier[it]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ") ?: "")
- text(f.modifiers()[it]?.toSignatureString() ?: "")
+ text(f.modifier[sourceSet]?.takeIf { it !in ignoredModifiers }?.name?.plus(" ") ?: "")
+ text(f.modifiers()[sourceSet]?.toSignatureString() ?: "")
val usedGenerics = if (f.isConstructor) f.generics.filter { f uses it } else f.generics
list(usedGenerics, prefix = "<", suffix = "> ") {
+buildSignature(it)
@@ -113,7 +113,7 @@ class JavadocSignatureProvider(ctcc: CommentsToContentConverter, logger: DokkaLo
text("(")
list(f.parameters) {
annotationsInline(it)
- text(it.modifiers()[it]?.toSignatureString().orEmpty())
+ text(it.modifiers()[sourceSet]?.toSignatureString().orEmpty())
signatureForProjection(it.type)
text(Typography.nbsp.toString())
text(it.name.orEmpty())
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 f51a9edd..58a3043c 100644
--- a/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
+++ b/plugins/kotlin-as-java/src/main/kotlin/signatures/JavaSignatureProvider.kt
@@ -1,5 +1,6 @@
package org.jetbrains.dokka.kotlinAsJava.signatures
+import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.signatures.JvmSignatureUtils
import org.jetbrains.dokka.base.signatures.SignatureProvider
@@ -137,7 +138,7 @@ class JavaSignatureProvider internal constructor(ctcc: CommentsToContentConverte
text("(")
list(f.parameters) {
annotationsInline(it)
- text(it.modifiers()[it]?.toSignatureString() ?: "")
+ text(it.modifiers()[sourceSet]?.toSignatureString() ?: "")
signatureForProjection(it.type)
text(nbsp.toString())
text(it.name!!)