Do not check package validness for ones that we just checked already
This commit is contained in:
committed by
TeamCityServer
parent
f5da8957b4
commit
0d072de737
+8
-1
@@ -199,7 +199,14 @@ class KotlinCliJavaFileManagerImpl(private val myPsiManager: PsiManager) : CoreJ
|
||||
if (!found) {
|
||||
found = singleJavaFileRootsIndex.findJavaSourceClasses(packageFqName).isNotEmpty()
|
||||
}
|
||||
return if (found) PsiPackageImpl(myPsiManager, packageName) else null
|
||||
|
||||
if (!found) return null
|
||||
|
||||
return object : PsiPackageImpl(myPsiManager, packageName) {
|
||||
// Do not check validness for packages we just made sure are actually present
|
||||
// It might be important for source roots that have non-trivial package prefix
|
||||
override fun isValid() = true
|
||||
}
|
||||
}
|
||||
|
||||
private fun findVirtualFileGivenPackage(
|
||||
|
||||
Reference in New Issue
Block a user