Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Decorator class stays null
Decorator class stays null [message #294599] Mon, 14 November 2005 14:59 Go to next message
Eclipse UserFriend
Hi all,

I'm trying to write my own decorator and have the following problem:
MoreUnitPlugin.getDefault().getWorkbench().getDecoratorManag er() has a
reference to my LightWeightDecoratorDefinition but the
decorator-instance-variable is always null.

Here is the code snippet from my plugin.xml:

<extension point="org.eclipse.ui.decorators">
<decorator
id="moreunit.testdecorator"
label="Decoratorlabel"
state="true"
class="moreUnit.decorator.UnitDecorator"
adaptable="true"
lightweight="true">
<enablement>
<objectClass name="org.eclipse.core.resources.IResource"/>
</enablement>
<description>
Description.
</description>
</decorator>
</extension>

The UnitDecorator-class implements the
ILightweightLabelDecorator-interface and extends LabelProvider.

Any hints what I'm doing wrong?
Thanks for help.

Vera
Re: Decorator class stays null [message #294660 is a reply to message #294599] Tue, 15 November 2005 15:43 Go to previous message
Eclipse UserFriend
Ok I solved it.
In my workspace I had installed the DemoDecorator-example from the
eclipse-homepage. After deactivating the demo-decoration of this plugin
my own decorator worked.


Vera Wahler wrote:
> Hi all,
>
> I'm trying to write my own decorator and have the following problem:
> MoreUnitPlugin.getDefault().getWorkbench().getDecoratorManag er() has a
> reference to my LightWeightDecoratorDefinition but the
> decorator-instance-variable is always null.
>
> Here is the code snippet from my plugin.xml:
>
> <extension point="org.eclipse.ui.decorators">
> <decorator
> id="moreunit.testdecorator"
> label="Decoratorlabel"
> state="true"
> class="moreUnit.decorator.UnitDecorator"
> adaptable="true"
> lightweight="true">
> <enablement>
> <objectClass name="org.eclipse.core.resources.IResource"/>
> </enablement>
> <description>
> Description.
> </description>
> </decorator>
> </extension>
>
> The UnitDecorator-class implements the
> ILightweightLabelDecorator-interface and extends LabelProvider.
>
> Any hints what I'm doing wrong?
> Thanks for help.
>
> Vera
Previous Topic:how to disable the ok button which is shown in dialog box
Next Topic:MarkerImageProvider Problem
Goto Forum:
  


Current Time: Tue Jul 22 20:36:52 EDT 2025

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

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

Back to the top