mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't compute expensive content roots for PSI event where nobody needs them (IDEA-204030)
GitOrigin-RevId: b723b6d57f2fb807ece7907695adc0b2e6212e42
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5726b5a26
commit
d97e6aeb2d
@@ -561,7 +561,6 @@ public class PsiVFSListener implements BulkFileListener {
|
||||
}
|
||||
|
||||
private class MyModuleRootListener implements ModuleRootListener {
|
||||
private VirtualFile[] myOldContentRoots;
|
||||
private int depthCounter; // accessed from within write action only
|
||||
@Override
|
||||
public void beforeRootsChange(@NotNull final ModuleRootEvent event) {
|
||||
@@ -573,10 +572,6 @@ public class PsiVFSListener implements BulkFileListener {
|
||||
|
||||
PsiTreeChangeEventImpl treeEvent = new PsiTreeChangeEventImpl(myManager);
|
||||
treeEvent.setPropertyName(PsiTreeChangeEvent.PROP_ROOTS);
|
||||
final VirtualFile[] contentRoots = myProjectRootManager.getContentRoots();
|
||||
LOG.assertTrue(myOldContentRoots == null);
|
||||
myOldContentRoots = contentRoots;
|
||||
treeEvent.setOldValue(contentRoots);
|
||||
myManager.beforePropertyChange(treeEvent);
|
||||
}
|
||||
);
|
||||
@@ -597,11 +592,6 @@ public class PsiVFSListener implements BulkFileListener {
|
||||
|
||||
PsiTreeChangeEventImpl treeEvent = new PsiTreeChangeEventImpl(myManager);
|
||||
treeEvent.setPropertyName(PsiTreeChangeEvent.PROP_ROOTS);
|
||||
final VirtualFile[] contentRoots = myProjectRootManager.getContentRoots();
|
||||
treeEvent.setNewValue(contentRoots);
|
||||
LOG.assertTrue(myOldContentRoots != null);
|
||||
treeEvent.setOldValue(myOldContentRoots);
|
||||
myOldContentRoots = null;
|
||||
myManager.propertyChanged(treeEvent);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user