public class ProblemsLabelDecorator extends Object implements ILabelDecorator, ILightweightLabelDecorator
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.
Modifier and Type | Class and Description |
---|---|
static class |
ProblemsLabelDecorator.ProblemsLabelChangedEvent
This is a special
LabelProviderChangedEvent carrying additional
information whether the event origins from a maker change. |
Constructor and Description |
---|
ProblemsLabelDecorator()
Creates a new
ProblemsLabelDecorator . |
ProblemsLabelDecorator(org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry registry)
Note: This constructor is for internal use only.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ILabelProviderListener listener) |
protected int |
computeAdornmentFlags(Object obj)
Computes the adornment flags for the given element.
|
void |
decorate(Object element,
IDecoration decoration) |
Image |
decorateImage(Image image,
Object obj) |
String |
decorateText(String text,
Object element) |
void |
dispose() |
protected boolean |
isInside(int pos,
ISourceReference sourceElement)
Tests if a position is inside the source range of an element.
|
boolean |
isLabelProperty(Object element,
String property) |
void |
removeListener(ILabelProviderListener listener) |
public ProblemsLabelDecorator()
ProblemsLabelDecorator
.public ProblemsLabelDecorator(org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry registry)
registry
- The registry to use or null
to use the Java plugin's image
registrypublic String decorateText(String text, Object element)
decorateText
in interface ILabelDecorator
public Image decorateImage(Image image, Object obj)
decorateImage
in interface ILabelDecorator
protected int computeAdornmentFlags(Object obj)
obj
- the element to compute the flags forprotected boolean isInside(int pos, ISourceReference sourceElement) throws CoreException
pos
- Position to be tested.sourceElement
- Source element (must be a IJavaElement)true
if position is located inside the source element.CoreException
- Exception thrown if element range could not be accessed.public void dispose()
dispose
in interface IBaseLabelProvider
public boolean isLabelProperty(Object element, String property)
isLabelProperty
in interface IBaseLabelProvider
public void addListener(ILabelProviderListener listener)
addListener
in interface IBaseLabelProvider
public void removeListener(ILabelProviderListener listener)
removeListener
in interface IBaseLabelProvider
public void decorate(Object element, IDecoration decoration)
decorate
in interface ILightweightLabelDecorator
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.