Skip to main content

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 KFriend
Messages: 2
Registered: July 2009
Junior Member

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)
> decorationContext.putProperty(IDecoration.ENABLE_REPLACE,
> 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)?


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

Current Time: Mon Mar 01 08:06:22 GMT 2021

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

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

Back to the top