Bug 477393 - Replace usage of ImageRegistry with LocalResourceManager in platform.ui
Summary: Replace usage of ImageRegistry with LocalResourceManager in platform.ui
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.8 M7   Edit
Assignee: Björn Arnelid CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks: 477394
  Show dependency tree
 
Reported: 2015-09-14 14:27 EDT by Lars Vogel CLA
Modified: 2019-02-28 04:39 EST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2015-09-14 14:27:18 EDT

    
Comment 1 Björn Arnelid CLA 2018-01-15 08:39:46 EST
Does this include removing ImageRegistry from public facing classes like AbstractUIPlugin?
Comment 2 Lars Vogel CLA 2018-01-15 08:40:43 EST
(In reply to Björn Arnelid from comment #1)
> Does this include removing ImageRegistry from public facing classes like
> AbstractUIPlugin?

No
Comment 3 Eclipse Genie CLA 2018-01-23 07:51:43 EST
New Gerrit change created: https://git.eclipse.org/r/115871
Comment 4 Eclipse Genie CLA 2018-01-23 07:51:48 EST
New Gerrit change created: https://git.eclipse.org/r/115872
Comment 5 Björn Arnelid CLA 2018-01-23 08:09:53 EST
ImageRegistry is publicly exposed in FieldDecoratingRegistry, DialogCellEditor and JFaceResources so these should probably be left as is. 

I think MarkerUtil is part of dead code, it should probably be removed all together?
Comment 6 Lars Vogel CLA 2018-01-23 08:46:58 EST
(In reply to Björn Arnelid from comment #5)
> I think MarkerUtil is part of dead code, it should probably be removed all
> together?

For deletion of dead code, please open a new bug. I quick looks indicates that org.eclipse.ui.views.tasklist.MarkerUtil and the classes referring to it are internal and not used. If that is true, they should be deleted.
Comment 7 Eclipse Genie CLA 2018-01-25 09:18:15 EST
New Gerrit change created: https://git.eclipse.org/r/116046
Comment 8 Eclipse Genie CLA 2018-01-25 09:18:19 EST
New Gerrit change created: https://git.eclipse.org/r/116045
Comment 11 Mickael Istria CLA 2018-02-01 09:01:13 EST
Can someone please enlighten me about what is the benefit of LocalResourceManager over ImageRegistry?
Comment 12 Björn Arnelid CLA 2018-02-01 09:18:02 EST
I am probably not the best person to answer this since im fairly new to contributing. 

But one benefit i see is that it is a bit smarter when it comes to disposing resources. Instead of disposing when Display is disposed it will dispose as soon as the owner control is disposed (given that no other control claims ownership of the resource as well).
Comment 13 Lars Vogel CLA 2018-02-01 09:20:13 EST
(In reply to Mickael Istria from comment #11)
> Can someone please enlighten me about what is the benefit of
> LocalResourceManager over ImageRegistry?

This would also reduce the need for activators. Activators can slow done the startup time of Eclipse. IMHO it is better to move as much as possible out of the activator.
Comment 15 Eclipse Genie CLA 2018-02-16 11:56:18 EST
New Gerrit change created: https://git.eclipse.org/r/117551
Comment 17 Karsten Thoms CLA 2018-02-23 00:34:54 EST
@Björn: Anything left here?
Comment 18 Björn Arnelid CLA 2018-02-23 06:15:18 EST
Yes, there is, ImageRegistry is fairly frequently used in platform.ui so there are a lot of places where it needs to be replaced. I will write a short comment here once i think everything is finished.
Comment 19 Lars Vogel CLA 2019-02-28 04:39:48 EST
Please open a new bug if you plan to continue to work on this.