avoid entering dumb mode to push properties to one file

This commit is contained in:
peter
2014-04-28 15:38:03 +02:00
parent 0ab0ec610f
commit 9d3c23d014
@@ -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