[instant shutdown] check progress manager

GitOrigin-RevId: ffafe6916f09ee51ad138418e18ca70a3d626a9a
This commit is contained in:
Konstantin Bulenkov
2020-08-18 18:59:54 +00:00
committed by intellij-monorepo-bot
parent d2b4f4abbc
commit 2379ff4bc7
@@ -606,7 +606,7 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
stopServicePreloading();
if (Registry.is("ide.instant.shutdown")) {
if (isInstantShutdownPossible()) {
for (Frame frame : Frame.getFrames()) {
frame.setVisible(false);
}
@@ -647,6 +647,14 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
}
}
private static boolean isInstantShutdownPossible() {
if (!Registry.is("ide.instant.shutdown")) {
return false;
}
return !ProgressManager.getInstance().hasProgressIndicator();
}
private @NotNull CompletableFuture<ProgressWindow> createProgressWindowAsyncIfNeeded(@NotNull String progressTitle,
boolean canBeCanceled,
boolean shouldShowModalWindow,