From 855718815ff58660a965b29247137355e67160c9 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 26 Aug 2020 14:49:31 +0200 Subject: WIP --- .../src/main/kotlin/org/jetbrains/dokka/analysis/DRIFactory.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kotlin-analysis/src') 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() val psiField = firstIsInstanceOrNull() - val classes = filterIsInstance().filterNot { it is PsiTypeParameter }.toList() // We only want exact PsiClass types, not PsiTypeParameter subtype + val classes = filterIsInstance().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("."), -- cgit