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. |
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 |
9007215 to
7862ed6
Compare
|
I need to revisit the tests. Drafting PR. |
7862ed6 to
e2524f6
Compare
e2524f6 to
2de28cc
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
e09b43a to
a54fa15
Compare
…atform#4202 Fixes eclipse-platform#4202 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a54fa15 to
ca52e6d
Compare









Fixes #4202
This PR contains 2 commits: 1 that adds the1 single commit.Progress Serviceview, making it easier to show the buggy behavior, and 1 that fixes the issue.How to test
Either run the tests in
org.eclipse.ui.tests.progress.ProgressServiceTestor use the newly addedProgressServiceView: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:
testRun_fork_cancelable_runInBackground_callFromUIThread_notPumpingUiEvents_noDialogShown.