<center> | |
<h1> | |
Decorators</h1></center> | |
<b><i>Identifier: </i></b>org.eclipse.ui.decorators | |
<p><b><i>Description: </i></b>This extension point is used to add decorators to | |
views that subscribe to a decorator manager. | |
<p><b><i>Configuration Markup:</i></b> | |
<p><tt> <!ELEMENT decorator ></tt> | |
<br><tt> <!ATTLIST actionSet</tt> | |
<br><tt> id | |
CDATA #REQUIRED</tt> | |
<br><tt> label | |
CDATA | |
#REQUIRED</tt> | |
<br><tt> class | |
CDATA | |
#REQUIRED</tt> | |
<br><tt> objectClass CDATA | |
#REQUIRED</tt> | |
<br><tt> adaptable (true | false) | |
#IMPLIED</tt> | |
<br><tt> ></tt> | |
<br><tt> <!ELEMENT description (#PCDATA)></tt> | |
<ul> | |
<li> | |
<b>id</b> - a unique name that will be used to identify this decorator.</li> | |
<li> | |
<b>label</b> - a translatable name that will be used in the workbench window | |
menu to represent this decorator.</li> | |
<li> | |
<b>class</b> - a fully qualified name of a class which implements <tt>org.eclipse.jface.viewers.ILabelDecorator</tt></li> | |
<li> | |
<tt><b>objectClass</b> - </tt> a fully qualified name of a class which this | |
decorator will be applied to</li> | |
<li> | |
<b>description</b> - an optional subelement whose body should contain text | |
providing short description of the decorator. This will be shown in the Decorators | |
preference page so it is recommended that this is included. Default value is an | |
empty String.</li> | |
<li> | |
<b>adaptable</b> - a flag that indicates if types that adapt to IResource should | |
use this object contribution. This flag is used only if objectClass adapts to | |
IResource. Default value is false.</li> | |
</ul> | |
<tt> </tt><b><i>Example:</i></b> | |
<p>The following is an example of an action set (note the subelements and | |
the way attributes are used): | |
<p><tt><extension</tt> <tt>point="org.eclipse.ui.decorators"></tt> | |
<br> <tt> <decorator</tt> | |
<br><tt> </tt> | |
<tt> </tt> | |
<tt>id="com.xyz.decorator"</tt> | |
<br><tt> </tt> | |
<tt> </tt> | |
<tt>label="XYZ Decorator"</tt> | |
<br><tt> </tt> | |
<tt>state="true"</tt> | |
<br><tt> class="com.xyz.DecoratorContributor"</tt> | |
<br><tt> </tt> | |
<tt> </tt> | |
<tt>objectClass="org.eclipse.core.resources.IResource"></tt> | |
<br><tt> </tt> | |
<tt></decorator ></tt> | |
<br><tt></extension></tt> | |
<p><b><i>API Information: </i></b>The value of the <tt>class</tt> attribute | |
must be the fully qualified name of a class that implements <tt>org.eclipse.jface.viewers.ILabelDecorator.</tt> | |
This class is loaded as late as possible to avoid loading the entire plug-in | |
before it is really needed.<p><b><i>Supplied Implementation:</i></b> Plug-ins may use this extension | |
point to add new decorators to be applied to views that use the decorator | |
manager as thier label decorator. To use the decorator manager use the result of | |
IViewPart.getDecoratorManager() as the decorator for an instance of | |
DecoratingLabelProvider. This is currently in use by the ResourceNavigator. | |
<p>The Decorators can be toggled on or off by selecting them in the | |
Window->Decorators menu. | |
<br> | |
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001. All Rights Reserved." BORDER=0 height=12 width=195></a> |