|Error decoration and custom overlay decoration [message #496494]
||Tue, 10 November 2009 10:36
| Steffen K
Registered: July 2009
I want to mark specific folders in the Project Explorer (CNF) with
custom icons (folder icon with custom color) in order to distinguish
them from standard folders. Therefore I provided a custom decorator
(implementing ILightweightLabelDecorator) using the
"org.eclipse.ui.decorators" extension point.
Problem: the eclipse error decorators are not displayed properly anymore.
I tried adding the decorator in
ILightweightLabelDecorator.decorate(Object element, IDecoration
decoration) on two ways:
A) REPLACING the original folder icon
> final DecorationContext decorationContext = (DecorationContext)
> decoration.addOverlay(USECASE_IMAGE, IDecoration.REPLACE);
B) overlaying the original folder icon
> decoration.addOverlay(USECASE_IMAGE, IDecoration.TOP_RIGHT);
The folder "usecases" contains errors and thus should display the error
decoration. As you can see, solution A suppresses the error decorator
totally, whereas in solution B the custom decorator overlaps the error
So the following questions come up:
- Is there a way to add my custom decoration before all other
decorations are added?
- Is there another way to replace the icon for my custom folders (while
keeping all decorators)?
Powered by FUDForum
. Page generated in 0.14179 seconds