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