Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Error decoration and custom overlay decoration
Error decoration and custom overlay decoration [message #496494] Tue, 10 November 2009 10:36
Steffen K is currently offline Steffen K
Messages: 2
Registered: July 2009
Junior Member
Hi,

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.getDecorationContext();
> decorationContext.putProperty(IDecoration.ENABLE_REPLACE,
Boolean.TRUE);
> decoration.addOverlay(USECASE_IMAGE, IDecoration.REPLACE);


Result: http://img121.imageshack.us/img121/727/overlayreplace.gif


B) overlaying the original folder icon

> decoration.addOverlay(USECASE_IMAGE, IDecoration.TOP_RIGHT);


Result: http://img262.imageshack.us/img262/2224/overlaycorner.gif


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
decorator.

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)?


Thanks,

Steffen
Previous Topic:Open File... menu command - get path of opened file
Next Topic:Galileo - where is the Laucher Icon?
Goto Forum:
  


Current Time: Mon Sep 15 04:19:41 GMT 2014

Powered by FUDForum. Page generated in 0.01780 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software