mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-218636 [psi] don't call getCachedPsiFiles unless necessary
GitOrigin-RevId: d34024b817337feba7a34d600a51d712e37121df
This commit is contained in:
committed by
intellij-monorepo-bot
parent
084affd277
commit
f64b595e60
@@ -243,9 +243,13 @@ private class PsiVFSListener(private val project: Project) {
|
||||
|
||||
val oldFileViewProvider = fileManager.findCachedViewProvider(vFile)
|
||||
val oldPsiFile = fileManager.getCachedPsiFile(vFile)
|
||||
|
||||
val parent = vFile.parent
|
||||
val parentDir = if (oldPsiFile != null && parent != null) fileManager.findDirectory(parent) else getCachedDirectory(parent)
|
||||
val parentDir = run {
|
||||
val parent = vFile.parent
|
||||
if (oldPsiFile != null && parent != null)
|
||||
fileManager.findDirectory(parent)
|
||||
else
|
||||
getCachedDirectory(parent)
|
||||
}
|
||||
|
||||
if (oldFileViewProvider != null && FileContentUtilCore.FORCE_RELOAD_REQUESTOR == event.requestor) {
|
||||
// there is no need to rebuild if there were no PSI in the first place
|
||||
|
||||
Reference in New Issue
Block a user