Community
Participate
Working Groups
There does not seem to be a way to specify the order the DecoratorManager iterates through the registered ILabelDecorators when decorating an icon image. If one could specify the order it would be possible to write more complex icon decorations: A labelDecorator with highest priority could modify the colors of an original icon (or even overwrite it totally) without influencing the other decorations. Example: A plugin could be written that fades/enhances/modifies the colors of packages by certain criteria. Packages containing junit-tests could appear with a blue icon instead of the orange one (or with a faded icon or whatever). In fact I have already written that plugin and the drawing order is the only problem left: http://www.jave.de/eclipse/labeldecorations/screenshot1.gif. Solutions: (1) A minimal solution is an API method in DecoratorManager or IDecoratorManager by which a plugin can move a LabelDecorator to the top of the list. Of course this would lead to problems with more than one plugin claiming to be the one with highest priority. (2) A better solution seems to be an optional priority value for the decorator element in the plugin.xml. Of course the default priority should leave enough space for lower and higher priority decorators. Finally the order could be made adjustable in the Label Decorations preference page.
Another option will be to add an API to retrieve/replace original undecorated icon in order to do the decoration implemented by Markus.
There are currently no plans to work on this feature