org.eclipse.wst.jsdt.ui
Class ProblemsLabelDecorator

java.lang.Object
  extended by org.eclipse.wst.jsdt.ui.ProblemsLabelDecorator

public class ProblemsLabelDecorator
extends java.lang.Object

LabelDecorator that decorates an element's image with error and warning overlays that represent the severity of markers attached to the element's underlying resource. To see a problem decoration for a marker, the marker needs to be a subtype of IMarker.PROBLEM.

Important: Although this decorator implements ILightweightLabelDecorator, do not contribute this class as a decorator to the org.eclipse.ui.decorators extension. Only use this class in your own views and label providers. Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Nested Class Summary
static class ProblemsLabelDecorator.ProblemsLabelChangedEvent
          This is a special LabelProviderChangedEvent carrying additional information whether the event origins from a maker change.
 
Constructor Summary
ProblemsLabelDecorator()
          Creates a new ProblemsLabelDecorator.
ProblemsLabelDecorator(org.eclipse.wst.jsdt.internal.ui.viewsupport.ImageDescriptorRegistry registry)
          Note: This constructor is for internal use only.
 
Method Summary
 void addListener(ILabelProviderListener listener)
           
 void decorate(java.lang.Object element, IDecoration decoration)
           
 Image decorateImage(Image image, java.lang.Object obj)
           
 java.lang.String decorateText(java.lang.String text, java.lang.Object element)
           
 void dispose()
           
 boolean isLabelProperty(java.lang.Object element, java.lang.String property)
           
 void removeListener(ILabelProviderListener listener)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProblemsLabelDecorator

public ProblemsLabelDecorator()
Creates a new ProblemsLabelDecorator.


ProblemsLabelDecorator

public ProblemsLabelDecorator(org.eclipse.wst.jsdt.internal.ui.viewsupport.ImageDescriptorRegistry registry)
Note: This constructor is for internal use only. Clients should not call this constructor.

Parameters:
registry - The registry to use or null to use the JavaScript plugin's image registry
Method Detail

decorateText

public java.lang.String decorateText(java.lang.String text,
                                     java.lang.Object element)

decorateImage

public Image decorateImage(Image image,
                           java.lang.Object obj)

dispose

public void dispose()

isLabelProperty

public boolean isLabelProperty(java.lang.Object element,
                               java.lang.String property)

addListener

public void addListener(ILabelProviderListener listener)

removeListener

public void removeListener(ILabelProviderListener listener)

decorate

public void decorate(java.lang.Object element,
                     IDecoration decoration)