Fix/progress service run - #4203
Conversation
There was a problem hiding this comment.
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
ProgressServiceViewto demonstrate/reproduce the differentIProgressService.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.
Interestingly, I don't see it if running in debugger. The |
3455ba6 to
0da1f60
Compare
0da1f60 to
4c595aa
Compare
|
Oops, sorry I did rebase to the wrong PR. Sorry, sorry. |
4c595aa to
ec11e72
Compare
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>
ec11e72 to
9007215
Compare
|
This is what I see in my launched application:
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
... 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
... if you don't, I could bet you have some cached version of |









Fixes #4202
This PR contains 2 commits: 1 that adds the
Progress Serviceview, making it easier to show the buggy behavior, and 1 that fixes the issue.How to test
You can use the newly added
ProgressServiceView:ProgressServiceView(Window > Show View > Other... > Progress Examples > Progress Service).Preferences > General— the view's checkboxstays in sync either way).
threshold (e.g. 3000 ms), click Run.
Expected behavior:
No progress dialog should appear.