Convert to Kotlin KotlinLightClassForPackage: fixes for j2k converter
This commit is contained in:
+1
-1
@@ -282,7 +282,7 @@ public class IDELightClassGenerationSupport extends LightClassGenerationSupport
|
||||
IdeaModuleInfo moduleInfo = info.getModuleInfo();
|
||||
if (moduleInfo instanceof ModuleSourceInfo) {
|
||||
KotlinLightClassForPackage lightClass =
|
||||
KotlinLightClassForPackage.create(psiManager, packageFqName, moduleInfo.contentScope(), files);
|
||||
KotlinLightClassForPackage.OBJECT$.create(psiManager, packageFqName, moduleInfo.contentScope(), files);
|
||||
if (lightClass == null) continue;
|
||||
|
||||
result.add(lightClass);
|
||||
|
||||
@@ -113,7 +113,7 @@ private fun KotlinLightElement<*, *>.getModuleInfoForLightElement(): IdeaModuleI
|
||||
}
|
||||
val element = getOrigin() ?: when (this) {
|
||||
is FakeLightClassForFileOfPackage -> this.getContainingFile()!!
|
||||
is KotlinLightClassForPackage -> this.getFiles().first()
|
||||
is KotlinLightClassForPackage -> this.files.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