Skip to content

Commit 51bf991

Browse files
committed
Show ProgressMonitorJobsDialog after delay in ProgressManager.run
Even for the backwards compatible mode (when the runnable is not forked or non-cancelable). This commit improves upon ccafe58 by letting the dialog pop up (after a delay) if the preferences "Always run in background" is set to false. When the preference is set to true, no progress dialog will ever pop up.
1 parent 2f6a390 commit 51bf991

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,9 @@ public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable
971971
// Backward compatible code.
972972
final ProgressMonitorJobsDialog dialog = new ProgressMonitorJobsDialog(
973973
ProgressManagerUtil.getDefaultParent());
974-
if (shouldRunInBackground()) {
975-
dialog.setOpenOnRun(false);
974+
dialog.setOpenOnRun(false);
975+
if (!shouldRunInBackground()) {
976+
scheduleProgressMonitorJob(dialog);
976977
}
977978
dialog.run(fork, cancelable, runnable);
978979
return;

0 commit comments

Comments
 (0)