mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-218636 [psi] don't infer parentDir unless necessary
GitOrigin-RevId: af0f44a5e4bdc81c3eb3a7ad0152b86c6b5c8e8d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f64b595e60
commit
c795fcbeae
@@ -242,6 +242,12 @@ private class PsiVFSListener(private val project: Project) {
|
||||
val vFile = event.file
|
||||
|
||||
val oldFileViewProvider = fileManager.findCachedViewProvider(vFile)
|
||||
if (oldFileViewProvider != null && FileContentUtilCore.FORCE_RELOAD_REQUESTOR == event.requestor) {
|
||||
// there is no need to rebuild if there were no PSI in the first place
|
||||
fileManager.forceReload(vFile)
|
||||
return
|
||||
}
|
||||
|
||||
val oldPsiFile = fileManager.getCachedPsiFile(vFile)
|
||||
val parentDir = run {
|
||||
val parent = vFile.parent
|
||||
@@ -251,12 +257,6 @@ private class PsiVFSListener(private val project: Project) {
|
||||
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
|
||||
fileManager.forceReload(vFile)
|
||||
return
|
||||
}
|
||||
|
||||
// do not suppress reparse request for light files
|
||||
if (parentDir == null) {
|
||||
var fire = VirtualFile.PROP_NAME == propertyName && vFile.isDirectory
|
||||
|
||||
Reference in New Issue
Block a user