diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-08-26 14:49:31 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-31 15:10:04 +0200 |
commit | 855718815ff58660a965b29247137355e67160c9 (patch) | |
tree | 82884ed2efc89adf3e44a22f3b24813238bb9e39 /kotlin-analysis/src | |
parent | 9bf535bf8c0b758fc0abf99b61208fa5430239d6 (diff) | |
download | dokka-855718815ff58660a965b29247137355e67160c9.tar.gz dokka-855718815ff58660a965b29247137355e67160c9.tar.bz2 dokka-855718815ff58660a965b29247137355e67160c9.zip |
WIP
Diffstat (limited to 'kotlin-analysis/src')
-rw-r--r-- | kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt index e74f9f6a..f47bf34b 100644 --- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt +++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt @@ -25,7 +25,8 @@ fun DRI.Companion.from(descriptor: DeclarationDescriptor) = descriptor.parentsWi fun DRI.Companion.from(psi: PsiElement) = psi.parentsWithSelf.run { val psiMethod = firstIsInstanceOrNull<PsiMethod>() val psiField = firstIsInstanceOrNull<PsiField>() - val classes = filterIsInstance<PsiClass>().filterNot { it is PsiTypeParameter }.toList() // We only want exact PsiClass types, not PsiTypeParameter subtype + val classes = filterIsInstance<PsiClass>().filterNot { it is PsiTypeParameter } + .toList() // We only want exact PsiClass types, not PsiTypeParameter subtype DRI( classes.lastOrNull()?.qualifiedName?.substringBeforeLast('.', "") ?: "", classes.toList().takeIf { it.isNotEmpty() }?.asReversed()?.mapNotNull { it.name }?.joinToString("."), |