Skip to content

Fix/progress service run - #4203

Open
fedejeanne wants to merge 2 commits into
eclipse-platform:masterfrom
fedejeanne:fix/progress-service-run
Open

Fix/progress service run#4203
fedejeanne wants to merge 2 commits into
eclipse-platform:masterfrom
fedejeanne:fix/progress-service-run

Conversation

@fedejeanne

Copy link
Copy Markdown
Member

Fixes #4202

This PR contains 2 commits: 1 that adds the Progress Service view, making it easier to show the buggy behavior, and 1 that fixes the issue.

How to test

You can use the newly added ProgressServiceView:

  1. Open ProgressServiceView (Window > Show View > Other... > Progress Examples > Progress Service).
  2. Check "Always run in background" (or set it under Preferences > General — the view's checkbox
    stays in sync either way).
  3. Check both fork and cancelable, set a duration long enough to exceed the short-operation
    threshold (e.g. 3000 ms), click Run.

Expected behavior:
No progress dialog should appear.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   1h 3m 53s ⏱️ + 3m 8s
 8 120 tests ±0   7 877 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 262 runs  ±0  19 608 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit 9007215. ± Comparison against base commit 04c96e4.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses issue #4202 by ensuring IProgressService.run(fork, cancelable, runnable) consistently honors the “Always run in background” preference (suppressing the modal progress dialog even for the common fork=true && cancelable=true case), and adds an examples view to reliably reproduce/observe the behavior.

Changes:

  • Add an example ProgressServiceView to demonstrate/reproduce the different IProgressService.run(...) behaviors and the preference interaction.
  • Fix org.eclipse.ui.internal.progress.ProgressManager#run(...) to suppress modal dialogs for all fork/cancelable combinations when “Always run in background” is enabled.
  • Register the new example view in the examples plugin plugin.xml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
examples/org.eclipse.ui.examples.job/src/org/eclipse/ui/examples/jobs/views/ProgressServiceView.java New example view to exercise IProgressService.run(...) combinations and preference interaction
examples/org.eclipse.ui.examples.job/plugin.xml Registers the new “Progress Service” example view
bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/progress/ProgressManager.java Makes RUN_IN_BACKGROUND suppress modal progress dialogs for all fork/cancelable combinations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iloveeclipse

Copy link
Copy Markdown
Member

Open ProgressServiceView (Window > Show View > Other... > Progress Examples > Progress Service

Interestingly, I don't see it if running in debugger. The org.eclipse.e4.ui.examples.job bundle is in the workspace. I assume this has to do with the "e4" way how views are contributed (progress_view.e4xmi is there), so what kind of trick one needs to see this contribution? I've already removed old workbench.xmi from .metadata/.plugins/org.eclipse.e4.workbench/, but that new view still doesn't show up.

@fedejeanne

fedejeanne commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

... so what kind of trick one needs to see this contribution?

Hm, I couldn't tell since I didn't need to use any specific trick. I am using a pretty normal debug config myself:

image
image

And the view is there for me, even in debug mode:

image

In order to use in in earlier versions of Eclipse though (to reproduce the error), I had to take the longer road:

  • Export the org.eclipse.e4.ui.examples.job plugin
  • Remove/relax the version constraints over org.eclipse.ui and others (in the MANIFEST.MF)
  • Open the older Eclipse IDE e.g. 2025-06
  • Import it as a binary: File > Import > Plug-In Development > Plug-ins and Fragments (Import As Binary projects)
  • Use a Launch Configuration similar to the one I have in my current workspace i.e.:
    • Main tab: Run an application -> org.eclipse.ui.ide.workbench
    • Plug-ins tab: Launch with: -> All workspace and enabled target Plug-ins

Does this help?

@fedejeanne
fedejeanne force-pushed the fix/progress-service-run branch from 3455ba6 to 0da1f60 Compare July 27, 2026 08:26
@iloveeclipse

iloveeclipse commented Jul 27, 2026

Copy link
Copy Markdown
Member

I am using a pretty normal debug config myself

The only difference I see is that I'm running the product, but I've created new launch config that uses application and still no luck.

Not sure how much one can trust "Plug-in Registry" view in the debugger, but the picture it shows indicates on some weird dependency issue which doesn't make sense for me (all the bundles needed are in my workspace as projects in latest versions and PDE is happy at least at compile/validation time):

image

Note that org.eclipse.e4.ui.examples.job is not activated (misses green overlay triandle on the icon).

OSGI console ss shows it as 150 STARTING org.eclipse.e4.ui.examples.job_0.5.0.qualifier and diag says

diag org.eclipse.e4.ui.examples.job
org.eclipse.e4.ui.examples.job [150]
  No resolution report for the bundle.

So PDE / runtime seem to have troubles to start or actvate that bundle automatically. Do you have some bundle which needs & activates org.eclipse.e4.ui.examples.job in your target platform?

@merks
merks force-pushed the fix/progress-service-run branch from 0da1f60 to 4c595aa Compare July 27, 2026 09:15
@merks

merks commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Oops, sorry I did rebase to the wrong PR. Sorry, sorry.

@fedejeanne
fedejeanne force-pushed the fix/progress-service-run branch from 4c595aa to ec11e72 Compare July 27, 2026 13:05
fedejeanne and others added 2 commits July 27, 2026 15:13
It can be used to showcase a buggy behavior in IProgressService.run().

Contributes to
eclipse-platform#4202

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…atform#4202

Fixes eclipse-platform#4202

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@fedejeanne
fedejeanne force-pushed the fix/progress-service-run branch from ec11e72 to 9007215 Compare July 27, 2026 13:14
@fedejeanne

Copy link
Copy Markdown
Member Author

Do you have some bundle which needs & activates org.eclipse.e4.ui.examples.job in your target platform?

Not that I can see:

image

... also, I only use the normal TP that is delivered for the Committers IDE (I didn't change anything):

image

@fedejeanne

Copy link
Copy Markdown
Member Author

This is what I see in my launched application:

image

I seem to have a few less plugins than you in the Plug-in Registry (482 instead of 487) but I see a lot more matches with the word examples in the Target Platform State view. FTR I have 860 Plug-Ins in the TP (Window > Preferences > Plug-In Development > Target Platform) and I also see org.eclipse.e4.ui.examples.job v0.5.0 in there. Just a thought: maybe it's necessary to bump versions for these kind of changes? I noticed we haven't done that in a while...

image

... which probably means that the TP already thinks it has the newest version and some old cached state is being used? You could quickly check if you see the button Robin and I introduced in the Job Factory view in #4121

image

... if you don't, I could bet you have some cached version of org.eclipse.e4.ui.examples.job and bumping the version of the Plug-In in the WS (and in this PR) would fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IProgressService.run(fork, cancelable, runnable) behaves inconsistently

4 participants