getModuleInfo for KotlinLightClassForDecompiledDeclaration

This commit is contained in:
Pavel V. Talanov
2014-12-17 20:56:41 +03:00
parent f72f67ed97
commit 571e71606c
@@ -100,6 +100,9 @@ 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()