decoration applied twice [message #498474] |
Tue, 17 November 2009 08:13 |
Sven Krause Messages: 119 Registered: July 2009 |
Senior Member |
|
|
Hi,
I've added a very simple ILabelDecorator decorating an own node type.
<extension
point="org.eclipse.ui.decorators">
<decorator adaptable="false" class="...ElementDecorator"
id="..."
label="..."
lightweight="false"
state="true">
<enablement>
<objectClass
name="....model.ElementNode">
</objectClass>
</enablement>
</decorator>
</extension>
The decoration is activated through the DecoratingLabelProvider.
public class ModelBrowserDecoratingLabelProvider extends
DecoratingLabelProvider {
public ModelBrowserDecoratingLabelProvider() {
super(new PrivateLabelProvider(),
PlatformUI.getWorkbench().getDecoratorManager().getLabelDeco rator());
}
}
My problem is that the ElementDecorator is called twice: one via the
org.eclipse.jface.viewers.DecoratingLabelProvider.getText(Ob ject) method
and once via the
org.eclipse.jface.viewers.DecoratingStyledCellLabelProvider. getStyledText(Object)
method.
Where the getStyleText does not consider the already created decoration
suffix. It does not matter, if I use an ILabelDecorator or an
ILightweightLabelDecorator (respective extension config).
Whats wrong? Should I not use the DecoratingLabelProvider directly?
Thanks in advance.
Sven
|
|
|
Powered by
FUDForum. Page generated in 0.02578 seconds