NEW DATE! Bugzilla will undergo maintenance 2024-03-28 18h00 CET. Bugzilla will be placed in read-only mode at that time.

Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 28938 - [Decorators] Enable ordering of LabelDecorators for enhanced icon decorations
Summary: [Decorators] Enable ordering of LabelDecorators for enhanced icon decorations
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-01 13:31 EST by Markus Gebhard CLA
Modified: 2006-06-22 08:35 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Gebhard CLA 2003-01-01 13:31:55 EST
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.
Comment 1 Eugene Kuleshov CLA 2004-02-23 10:38:57 EST
Another option will be to add an API to retrieve/replace original undecorated
icon in order to do the decoration implemented by Markus.
Comment 2 Tod Creasey CLA 2006-06-22 08:35:14 EDT
There are currently no plans to work on this feature