Skip to content

Commit ccd8bab

Browse files
fedejeanneiloveeclipse
authored andcommitted
Show ProgressMonitorJobsDialog after delay in ProgressManager.run
Even for the backwards compatible mode (when the runnable is not forked or non-cancelable).
1 parent 7aad7e3 commit ccd8bab

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
@@ -967,9 +967,10 @@ public void showInDialog(Shell shell, Job job) {
967967
@Override
968968
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)
969969
throws InvocationTargetException, InterruptedException {
970-
if (!fork || !cancelable) {
970+
if (!shouldRunInBackground() && (!fork || !cancelable)) {
971971
// Backward compatible code.
972-
final ProgressMonitorJobsDialog dialog = new ProgressMonitorJobsDialog(null);
972+
final ProgressMonitorJobsDialog dialog = new ProgressMonitorJobsDialog(
973+
ProgressManagerUtil.getDefaultParent());
973974
dialog.run(fork, cancelable, runnable);
974975
return;
975976
}

0 commit comments

Comments
 (0)