Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 475785

Summary: Replace usage of SubProgressMonitor with SubMonitor in platform.ui
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Stefan Xenos <sxenos>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse.sprigogin, Lars.Vogel, markus.kell.r, stepper, sxenos
Version: 4.5   
Target Milestone: 4.6 M3   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/55894
https://git.eclipse.org/r/55909
https://git.eclipse.org/r/55910
https://git.eclipse.org/r/55911
https://git.eclipse.org/r/55912
https://git.eclipse.org/r/55913
https://git.eclipse.org/r/55915
https://git.eclipse.org/r/55916
https://git.eclipse.org/r/55917
https://git.eclipse.org/r/55918
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ea9d71a488dcd539b8b3a84d7ddc8b2acbca7bf5
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ab0a4e07b8b5102fa2756c32111cd2d6d7ce13e2
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2daab974129378b92daacc860dbcee77dabf2123
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b071a5aa0e1dbef1760839ea0a8abe805a6d8830
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=5957cef476205f372aa1ad15a8798bb2254a87ed
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9030b39b10c8df7a53aacb45437b92be765b8566
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e1fb21c161e6f9188ad46cb4aebf2c4a6984f90c
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d7a1117af7376fa32af298daeb4065bfcd631551
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9468f370adbfd4af0d76c4ec6e6c22edb43162e4
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=85b93c1e2053aa36564fe96be16b502e1944b683
https://git.eclipse.org/r/56271
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b51d6dfc180ca7cdf065958541f51484c2e036d9
https://git.eclipse.org/r/56273
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c7a4a91a8f6f6a9c5d4dae92ac80eda4645b80db
https://git.eclipse.org/r/56450
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=fcadf18bbe1e72f5f6eddfd3ea6f47fb854028f9
Whiteboard:
Bug Depends on:    
Bug Blocks: 510537    

Description Lars Vogel CLA 2015-08-25 06:31:20 EDT

    
Comment 1 Stefan Xenos CLA 2015-08-25 13:16:09 EDT
Related to bug 291518.
Comment 2 Lars Vogel CLA 2015-09-14 05:07:01 EDT
Stefan, can you take this bug? I see still lots of usage of SubProgressMonitor in platform.ui.
Comment 3 Stefan Xenos CLA 2015-09-14 12:22:02 EDT
Sure. Working on it now.

I'll submit one commit per package in order to break down the scope of the change.

While I'm at it, I'll also fix any progress-reporting bugs I come across and remove workarounds for bugs in SubProgressMonitor (such as the common "multiply progress by 1000" trick that was commonly used to work around the SPM resolution bug).

I may need some help with testing.
Comment 4 Eclipse Genie CLA 2015-09-14 12:37:34 EDT
New Gerrit change created: https://git.eclipse.org/r/55894
Comment 5 Eclipse Genie CLA 2015-09-14 16:20:09 EDT
New Gerrit change created: https://git.eclipse.org/r/55909
Comment 6 Eclipse Genie CLA 2015-09-14 16:20:40 EDT
New Gerrit change created: https://git.eclipse.org/r/55910
Comment 7 Eclipse Genie CLA 2015-09-14 16:21:12 EDT
New Gerrit change created: https://git.eclipse.org/r/55911
Comment 8 Eclipse Genie CLA 2015-09-14 16:21:43 EDT
New Gerrit change created: https://git.eclipse.org/r/55912
Comment 9 Eclipse Genie CLA 2015-09-14 16:22:05 EDT
New Gerrit change created: https://git.eclipse.org/r/55913
Comment 10 Eclipse Genie CLA 2015-09-14 16:22:26 EDT
New Gerrit change created: https://git.eclipse.org/r/55915
Comment 11 Eclipse Genie CLA 2015-09-14 16:23:07 EDT
New Gerrit change created: https://git.eclipse.org/r/55916
Comment 12 Eclipse Genie CLA 2015-09-14 16:23:39 EDT
New Gerrit change created: https://git.eclipse.org/r/55917
Comment 13 Eclipse Genie CLA 2015-09-14 16:24:10 EDT
New Gerrit change created: https://git.eclipse.org/r/55918
Comment 14 Stefan Xenos CLA 2015-09-14 16:30:27 EDT
There we go. These patches remove every reference I could find to SubProgressMonitor in the eclipse.platform.ui repository.

I wrote them using visual inspection and confirmed that they compile, but have not tested them yet (and I'm not entirely sure how to reach all those branches).

I'll try to test them all tomorrow, but may need help with some of the more obscure branches.

They could also use some additional eyes on them, so if you have time I'd appreciate if you could look over one or two of them. Also, if you could help me test a couple of them it would be greatly appreciated. Just let me know which ones you've verified so I don't repeat any work.
Comment 25 Stefan Xenos CLA 2015-09-15 16:44:08 EDT
All changes merged. SubMonitor has been purged from platform UI.

Now to get rid of manual GridLayout instantiation in favor of GridLayoutFactory, eleminate the use of ImageRegistry, FontRegistry, and friends, update our Jobs to use lambdas...
Comment 26 Markus Keller CLA 2015-09-16 09:31:25 EDT
Stefan, we're in the M2 week. No regular changes must be released until M2 is declared. Please revert this immediately.
Comment 27 Markus Keller CLA 2015-09-16 09:31:38 EDT
.
Comment 28 Lars Vogel CLA 2015-09-16 09:44:43 EDT
(In reply to Markus Keller from comment #26)
> Stefan, we're in the M2 week. No regular changes must be released until M2
> is declared. Please revert this immediately.

Please revert it with one commit.
Comment 29 Markus Keller CLA 2015-09-16 09:55:04 EDT
We discussed this in the status call. Since we're not sure in which time zone Stefan is, I'll do the revert.
Comment 30 Markus Keller CLA 2015-09-16 10:18:14 EDT
Reverted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=29da1e2b77a857c43a558eafcc528e5717b1e321

This commit can be reverted again and pushed after M2 is declared.
Comment 31 Stefan Xenos CLA 2015-09-16 11:09:17 EDT
Yeah, my bad. Reverting was the right thing to do.
Comment 32 Eclipse Genie CLA 2015-09-18 14:07:02 EDT
New Gerrit change created: https://git.eclipse.org/r/56271
Comment 34 Stefan Xenos CLA 2015-09-18 14:08:28 EDT
Reverted the revert. Re-closing.
Comment 35 Eclipse Genie CLA 2015-09-18 14:12:17 EDT
New Gerrit change created: https://git.eclipse.org/r/56273
Comment 37 Lars Vogel CLA 2015-09-18 15:29:07 EDT
(In reply to Eclipse Genie from comment #36)
> Gerrit change https://git.eclipse.org/r/56273 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/
> ?id=c7a4a91a8f6f6a9c5d4dae92ac80eda4645b80db

I think you missed a monitor.done removal. See Gerrit reviwe
Comment 38 Eclipse Genie CLA 2015-09-22 12:43:13 EDT
New Gerrit change created: https://git.eclipse.org/r/56450
Comment 40 Stefan Xenos CLA 2015-09-22 12:51:36 EDT
> I think you missed a monitor.done removal. See Gerrit reviwe

Done.
Comment 41 Stefan Xenos CLA 2015-09-22 12:52:03 EDT
You have to specify a comment when changing the Status of a bug from REOPENED to RESOLVED.
Comment 42 Dani Megert CLA 2017-01-17 06:10:25 EST
The changes made in OpenResourceAction cause a bad regression, see bug 510537.