From 51bf9910ff2dad6e2cb7bfa97a89f0b949b6df8b Mon Sep 17 00:00:00 2001 From: fedejeanne Date: Mon, 22 Sep 2025 10:40:45 +0200 Subject: [PATCH] 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 ccafe58e7e349047507d7d5878beec826c19e124 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. --- .../org/eclipse/ui/internal/progress/ProgressManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java index 605878e9a0b..542dd60b1fb 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java @@ -971,8 +971,9 @@ public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable // Backward compatible code. final ProgressMonitorJobsDialog dialog = new ProgressMonitorJobsDialog( ProgressManagerUtil.getDefaultParent()); - if (shouldRunInBackground()) { - dialog.setOpenOnRun(false); + dialog.setOpenOnRun(false); + if (!shouldRunInBackground()) { + scheduleProgressMonitorJob(dialog); } dialog.run(fork, cancelable, runnable); return;