Community
Participate
Working Groups
Created attachment 283207 [details] Partial output from UCDetector While working on Bug 563974, I took the liberty of running UCDetector [1] on the platform UI codebase. For the org.eclipse.ui.internal package of org.eclipse.ui.workbench alone, it finds around 40 classes that potentially not used. Furthermore, there are a lot of constants, fields and methods that are not referenced (around 500 total). I expect that there are (some) false positives in the results. But there is surely dead code that can be removed. Note for anybody that wants to run the tool too: The tool will find false positives for injected fields/methods. To reduce the number of false positive, you can add additional annotations that should be ignored (e.g. PostConstruct, PreDestroy, Persist, CanExecute, Execute, SetEnabled) [1] http://www.ucdetector.org/
Great work. +1 for removal. Just one additional check would be to check plugin.xml for usage of such classes. IIRC Brian once suggest to write a test for such cases not sure if we finished that....
New Gerrit change created: https://git.eclipse.org/r/164740
New Gerrit change created: https://git.eclipse.org/r/164741
Rolf and all others, can you check a few from Rolfs list and delete the selected once? Would be nice if that can be a group effort. I picked two of the classes, deleted them and ran a full text search for the repo (and included multiple others) to ensure they are not used somewhere.
Gerrit change https://git.eclipse.org/r/164740 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0bb2f42aa79fc8962da0cca84f9ecd34d3be82c6
Gerrit change https://git.eclipse.org/r/164741 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=88655f1e7609ce2f5a58c4d3e9b00facd85f9dea
New Gerrit change created: https://git.eclipse.org/r/164825
New Gerrit change created: https://git.eclipse.org/r/164826
New Gerrit change created: https://git.eclipse.org/r/164828
New Gerrit change created: https://git.eclipse.org/r/164829
FYI - I work from the classes bottom up, looks like you start from the top, so hopefully we do not do double work.
New Gerrit change created: https://git.eclipse.org/r/164847
New Gerrit change created: https://git.eclipse.org/r/164848
New Gerrit change created: https://git.eclipse.org/r/164849
Gerrit change https://git.eclipse.org/r/164825 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=19f4745a5ddc57922818553eb544f65f492b74cb
Gerrit change https://git.eclipse.org/r/164826 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2d0a20d1e50d7322f3cc7ed11face32e43a4304e
Gerrit change https://git.eclipse.org/r/164828 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d8ab1068048b58172c3e78ab6f6865e3b9db5837
Gerrit change https://git.eclipse.org/r/164827 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=08bd8f642e6d98fd53b5cc2e43282529aba6f228
Gerrit change https://git.eclipse.org/r/164829 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d76f4a81554b588252db7e55c6cfd992eac1add4
Gerrit change https://git.eclipse.org/r/164847 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=97ea36f53734c6c4865fd524c60442e80023ca3a
Gerrit change https://git.eclipse.org/r/164849 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c741a2be1cd618388d64e318f37fedab04321878
Gerrit change https://git.eclipse.org/r/164848 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=21f53331f85afe60c4679965d5617a1c720f2081
New Gerrit change created: https://git.eclipse.org/r/164878
Gerrit change https://git.eclipse.org/r/164878 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=e9eb501f0c02985fb32e81150fd8a26b11c8b40e
New Gerrit change created: https://git.eclipse.org/r/165017
Gerrit change https://git.eclipse.org/r/165017 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ea386eb32875dc5c12e8109685a7e0b61dba927f
New Gerrit change created: https://git.eclipse.org/r/165143
Gerrit change https://git.eclipse.org/r/165143 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=427efc516331c0ddb2f824c8d7d81749710840e9
New Gerrit change created: https://git.eclipse.org/r/165162
New Gerrit change created: https://git.eclipse.org/r/165163
New Gerrit change created: https://git.eclipse.org/r/165164
Gerrit change https://git.eclipse.org/r/165162 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ebc5e789668923e097d13a0443dd525586e24312
Gerrit change https://git.eclipse.org/r/165163 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=b1da3ecef1e666f45ab4c480eab829b39a72028c
Gerrit change https://git.eclipse.org/r/165164 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=caf7e53233f18c116d58275c078c7a611444b2af
New Gerrit change created: https://git.eclipse.org/r/165286
Rolf, could you run UCDectector again and update the attachment to reflect the current state of work?
Gerrit change https://git.eclipse.org/r/165286 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1d5ae1fc79c6e08e0856c125cbd730ac7cad377d
New Gerrit change created: https://git.eclipse.org/r/165308
Created attachment 283386 [details] Partial output from UCDetector Current status, including code only used in test. Note that I only have platform.ui in the workspace.
New Gerrit change created: https://git.eclipse.org/r/165374
New Gerrit change created: https://git.eclipse.org/r/165376
New Gerrit change created: https://git.eclipse.org/r/165377
New Gerrit change created: https://git.eclipse.org/r/165378
New Gerrit change created: https://git.eclipse.org/r/165379
New Gerrit change created: https://git.eclipse.org/r/165381
New Gerrit change created: https://git.eclipse.org/r/165382
New Gerrit change created: https://git.eclipse.org/r/165383
Gerrit change https://git.eclipse.org/r/165381 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=78cf7c1af6230fd71fafcd097af581c6fbbb67db
Gerrit change https://git.eclipse.org/r/165382 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=3471cc7424c81709240cc953fc23a1256ef62f77
Gerrit change https://git.eclipse.org/r/165308 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=2decc0db71d81baf1dd0b04d9e9ed5470496d653
LegacyTrim is used (full text search). Does UCDector allow to define exceptions?
RGBVisibleContrastColorFactory is also used (JDT)
New Gerrit change created: https://git.eclipse.org/r/165398
New Gerrit change created: https://git.eclipse.org/r/165400
New Gerrit change created: https://git.eclipse.org/r/165401
Gerrit change https://git.eclipse.org/r/165234 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1e8a04c7dacf72495e67cd4cf5d555eb2b36dce1
Gerrit change https://git.eclipse.org/r/165374 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=815fb0aa6dfb3d7c6ff5e3f876c68d0ab15814da
Gerrit change https://git.eclipse.org/r/165378 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=991209fe63bf47966a2febe2464afe67a482617b
Gerrit change https://git.eclipse.org/r/165379 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=65d22391d99ca4b8f4fa55beac59d87e1eb9961a
Gerrit change https://git.eclipse.org/r/165376 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0392a8bc3452d4d8ccc351b5b07210cfb71f3f46
Gerrit change https://git.eclipse.org/r/165383 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=c7fd8819ffabed898826d6922c1dceb367f45bc0
Gerrit change https://git.eclipse.org/r/165377 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=086089ee52f93636f3c741028e34a73edeefc5d2
Gerrit change https://git.eclipse.org/r/165398 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4ad07dffd67f899dec87c63bb98db776e72aa570
Gerrit change https://git.eclipse.org/r/165401 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d47df2901197aa43a7e134b29f6ef1b472d0b0ad
Gerrit change https://git.eclipse.org/r/165400 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=df45709ca4e16e82f72e55edc67cbd063b91b1e7
(In reply to Lars Vogel from comment #52) > LegacyTrim is used (full text search). Does UCDector allow to define > exceptions? Check the website, they support multiple ways of defining exceptions, e.g. with a special annotation or comment. There is some configuration too. b.t.w I opened Bug 564397 to get similar functionality in JDT.
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165791
As the WorkbenchMessagas, didn't we have a tool which cleans-up unused messages?
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165971
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165791 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f1d1f8140897721a24b5f001f7880e74b8056eb6
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/165971 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d1a6bf9ed982e9065ae0d80e33ec4ea609a76a23
Rolf, can you update the output of UCDector?
This one got really bit, suggesting to close this one as fixed and potentially continue with a new bug. Rolf, please reopen if you disagree and would like to continue using this one.