mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid entering dumb mode to push properties to one file
This commit is contained in:
+5
-3
@@ -92,12 +92,14 @@ public class PushedFilePropertiesUpdater {
|
||||
public void fileCreated(@NotNull final VirtualFileEvent event) {
|
||||
final VirtualFile file = event.getFile();
|
||||
final FilePropertyPusher[] pushers = file.isDirectory() ? myPushers : myFilePushers;
|
||||
if (event.isFromRefresh()) {
|
||||
schedulePushRecursively(file, pushers);
|
||||
} else {
|
||||
if (!event.isFromRefresh() || !file.isDirectory()) {
|
||||
// push synchronously to avoid entering dumb mode in the middle of a meaningful write action
|
||||
// avoid dumb mode for just one file
|
||||
doPushRecursively(file, pushers, ProjectRootManager.getInstance(myProject).getFileIndex());
|
||||
}
|
||||
else {
|
||||
schedulePushRecursively(file, pushers);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user