aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-05-03 18:18:53 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-14 23:57:11 +0300
commitee0b640ad5c4a8cc1b65403dc2c48e7723b8f53a (patch)
treee08ccf0e77ec1582ceb4986586b97c05533f64c6 /core
parenta16ae6c02e1ec7270fb161c63908b5b3831bce8e (diff)
downloaddokka-ee0b640ad5c4a8cc1b65403dc2c48e7723b8f53a.tar.gz
dokka-ee0b640ad5c4a8cc1b65403dc2c48e7723b8f53a.tar.bz2
dokka-ee0b640ad5c4a8cc1b65403dc2c48e7723b8f53a.zip
Fix resolution of package links
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Kotlin/KotlinElementSignatureProvider.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Kotlin/KotlinElementSignatureProvider.kt b/core/src/main/kotlin/Kotlin/KotlinElementSignatureProvider.kt
index 4f788634..0a377dc1 100644
--- a/core/src/main/kotlin/Kotlin/KotlinElementSignatureProvider.kt
+++ b/core/src/main/kotlin/Kotlin/KotlinElementSignatureProvider.kt
@@ -3,8 +3,10 @@ package org.jetbrains.dokka
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiMember
import com.intellij.psi.PsiNameIdentifierOwner
+import com.intellij.psi.PsiPackage
import org.jetbrains.kotlin.asJava.elements.KtLightElement
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
+import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.resolve.BindingContext
import javax.inject.Inject
@@ -15,6 +17,7 @@ class KotlinElementSignatureProvider @Inject constructor(
val desc = when (forPsi) {
is KtLightElement<*, *> -> return signature(forPsi.kotlinOrigin!!)
+ is PsiPackage -> resolutionFacade.moduleDescriptor.getPackage(FqName(forPsi.qualifiedName))
is PsiMember -> forPsi.getJavaOrKotlinMemberDescriptor(resolutionFacade)
else -> resolutionFacade.resolveSession.bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, forPsi]
}