getModuleInfo for KotlinLightClassForDecompiledDeclaration
This commit is contained in:
@@ -100,10 +100,13 @@ private fun getModuleInfoByVirtualFile(project: Project, virtualFile: VirtualFil
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun KotlinLightElement<*, *>.getModuleInfoForLightElement(): IdeaModuleInfo {
|
private fun KotlinLightElement<*, *>.getModuleInfoForLightElement(): IdeaModuleInfo {
|
||||||
|
if (this is KotlinLightClassForDecompiledDeclaration) {
|
||||||
|
return getModuleInfoByVirtualFile(getProject(), getContainingFile().getVirtualFile(), false)
|
||||||
|
}
|
||||||
val element = origin ?: when (this) {
|
val element = origin ?: when (this) {
|
||||||
is FakeLightClassForFileOfPackage -> this.getContainingFile()!!
|
is FakeLightClassForFileOfPackage -> this.getContainingFile()!!
|
||||||
is KotlinLightClassForPackage -> this.getFiles().first()
|
is KotlinLightClassForPackage -> this.getFiles().first()
|
||||||
else -> throw IllegalStateException("Unknown light class without origin is referenced by IDE lazy resolve: $javaClass")
|
else -> throw IllegalStateException("Unknown light class without origin is referenced by IDE lazy resolve: $javaClass")
|
||||||
}
|
}
|
||||||
return element.getModuleInfo()
|
return element.getModuleInfo()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user