transfer to EDT (e.g. for vfs refresh) in a correct modalilty state during project loading

This commit is contained in:
peter
2016-05-27 13:18:20 +02:00
parent 5587eb00ec
commit b7849f80c3
2 changed files with 2 additions and 2 deletions
@@ -44,6 +44,6 @@ fun invokeAndWaitIfNeed(runnable: () -> Unit) {
if (SwingUtilities.isEventDispatchThread()) runnable() else SwingUtilities.invokeAndWait(runnable)
}
else {
app.invokeAndWait(runnable, ModalityState.any())
app.invokeAndWait(runnable, ModalityState.defaultModalityState())
}
}
@@ -744,7 +744,7 @@ public abstract class ModuleManagerImpl extends ModuleManager implements Project
String path = moduleFile.getPath();
ModuleEx module = getModuleByFilePath(path);
if (module == null) {
ApplicationManager.getApplication().invokeAndWait(() -> moduleFile.refresh(false, false), ModalityState.any());
ApplicationManager.getApplication().invokeAndWait(() -> moduleFile.refresh(false, false), ModalityState.defaultModalityState());
module = createAndLoadModule(path);
initModule(module, path, null);
}