Community
Participate
Working Groups
We didn't manage to include images in the 3.0 theme work although the intention was there. The original idea was to provide add <imageDefinition> and <imageOverride> elements to the themes extension point, along with an ImageRegistry that mirrored the existing support for colours and fonts. Whether the existing JFace ImageRegistry can be used for this is a question that needs to be answered - the javadoc states that images cannot be replaced. In order to be in line with the other theme registries this can't be the case. In addition to the explicitly declared images, it would be good if we could override ANY image that is accessable via some central authority (such as the plugin ImageRegistry or imageDescriptorFromPlugin on AbstractUIPlugin). imageOverride elements could be specified by key (referring to imageDefinition elements), by plugin/key combinations (referring to plugin ImageRegistry objects) or by platform URL (available from imageDescriptorFromPlugin). This would allow themes to customize all workbench and plugin images. In addition to specific overrides, we could allow themes to specify an <imageTransformer> element. When accessing images in a given theme, the transformer would be run over all images as appropriate. These transformers could apply color/sizing transformations on the entire image set. The initial cost of this would be quite high, but the results could be cached. Opinions?
I'm very much in favour of this. Just the other day I had a request from an RCP app developer who wanted to know whether it's possible to override the icon used for Open Perspective (in the perspective switcher). The best I could offer was to replace the corresponding file under org.eclipse.ui/icons.
I'd suggest making sure that the theme only returns ImageDescriptors and never Images. - Clients can easily convert ImageDescriptors into shared Image instances using JFaceResources.getResources().createImage(...) - Any Image instance that is ever directly exposed through API is hard to dispose safely. - ImageDescriptors are device-independent (ie: could be used with a printer).
I'd like to go one step further and deprecate the jface font and color registries on Themes for just that same reason and look into using your new style of registry. Perhaps we could talk about that at some point.
Susan is now responsible for watching the [Themes] category.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.