aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt3
-rw-r--r--plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt7
2 files changed, 5 insertions, 5 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
index 34b570a9..ba4523a1 100644
--- a/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
+++ b/plugins/base/src/main/kotlin/resolvers/local/DefaultLocationProvider.kt
@@ -4,6 +4,7 @@ import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.DokkaConfiguration.DokkaSourceSet
import org.jetbrains.dokka.base.resolvers.external.ExternalLocationProvider
import org.jetbrains.dokka.links.DRI
+import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.plugability.DokkaContext
import java.net.HttpURLConnection
@@ -19,7 +20,7 @@ open class DefaultLocationProvider(
) : BaseLocationProvider(dokkaContext) {
protected open val extension = ".html"
- protected val pagesIndex: Map<DRI, ContentPage> = pageGraphRoot.asSequence().filterIsInstance<ContentPage>()
+ protected val pagesIndex: Map<DRI, ContentPage> = pageGraphRoot.withDescendants().filterIsInstance<ContentPage>()
.map { it.dri.map { dri -> dri to it } }.flatten()
.groupingBy { it.first }
.aggregate { dri, _, (_, page), first ->
diff --git a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
index 7c797233..76f8319d 100644
--- a/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
+++ b/plugins/base/src/main/kotlin/translators/psi/DefaultPsiToDocumentableTranslator.kt
@@ -33,7 +33,6 @@ import org.jetbrains.kotlin.load.java.propertyNamesBySetMethodName
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.psi.psiUtil.getChildOfType
import org.jetbrains.kotlin.resolve.DescriptorUtils
-import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
import java.io.File
@@ -266,9 +265,9 @@ class DefaultPsiToDocumentableTranslator(
dri.copy(target = dri.target.nextTarget()),
psiParameter.name,
DocumentationNode(
- listOfNotNull(docs.firstChildOfType<Param> {
- it.firstChildOfType<DocumentationLink>()
- ?.firstChildOfType<Text>()?.body == psiParameter.name
+ listOfNotNull(docs.firstChildOfTypeOrNull<Param> {
+ it.firstChildOfTypeOrNull<DocumentationLink>()
+ ?.firstChildOfTypeOrNull<Text>()?.body == psiParameter.name
})).toSourceSetDependent(),
null,
getBound(psiParameter.type),