Package org.eclipse.jdt.ui
Class OverrideIndicatorLabelDecorator
java.lang.Object
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator
- All Implemented Interfaces:
org.eclipse.jface.viewers.IBaseLabelProvider
,org.eclipse.jface.viewers.ILabelDecorator
,org.eclipse.jface.viewers.ILightweightLabelDecorator
public class OverrideIndicatorLabelDecorator
extends Object
implements org.eclipse.jface.viewers.ILabelDecorator, org.eclipse.jface.viewers.ILightweightLabelDecorator
LabelDecorator that decorates an method's image with override or implements overlays.
The viewer using this decorator is responsible for updating the images on element changes.
This class may be instantiated; it is not intended to be subclassed.
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionCreates a decorator.OverrideIndicatorLabelDecorator
(org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry registry) Note: This constructor is for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(org.eclipse.jface.viewers.ILabelProviderListener listener) int
computeAdornmentFlags
(Object element) Note: This method is for internal use only.void
org.eclipse.swt.graphics.Image
decorateImage
(org.eclipse.swt.graphics.Image image, Object element) decorateText
(String text, Object element) void
dispose()
protected int
findInHierarchy
(IType type, ITypeHierarchy hierarchy, String name, String[] paramTypes) Deprecated.Not used anymore.protected int
getOverrideIndicators
(IMethod method) Note: This method is for internal use only.boolean
isLabelProperty
(Object element, String property) void
removeListener
(org.eclipse.jface.viewers.ILabelProviderListener listener)
-
Constructor Details
-
OverrideIndicatorLabelDecorator
public OverrideIndicatorLabelDecorator()Creates a decorator. The decorator creates an own image registry to cache images. -
OverrideIndicatorLabelDecorator
public OverrideIndicatorLabelDecorator(org.eclipse.jdt.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.- Restriction:
- This method is not intended to be referenced by clients.
-
-
Method Details
-
decorateText
- Specified by:
decorateText
in interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
decorateImage
public org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image image, Object element) - Specified by:
decorateImage
in interfaceorg.eclipse.jface.viewers.ILabelDecorator
-
computeAdornmentFlags
Note: This method is for internal use only. Clients should not call this method.- Parameters:
element
- The element to decorate- Returns:
- Resulting decorations (combination of JavaElementImageDescriptor.IMPLEMENTS and JavaElementImageDescriptor.OVERRIDES)
- Restriction:
- This method is not intended to be referenced by clients.
-
getOverrideIndicators
Note: This method is for internal use only. Clients should not call this method.- Parameters:
method
- The element to decorate- Returns:
- Resulting decorations (combination of JavaElementImageDescriptor.IMPLEMENTS and JavaElementImageDescriptor.OVERRIDES)
- Throws:
JavaModelException
- if accessing a Java Model element fails- Restriction:
- This method is not intended to be referenced by clients.
-
findInHierarchy
@Deprecated protected int findInHierarchy(IType type, ITypeHierarchy hierarchy, String name, String[] paramTypes) throws JavaModelException Deprecated.Not used anymore. This method is not accurate for methods in generic types.Note: This method is for internal use only. Clients should not call this method.- Parameters:
type
- The declaring type of the method to decorate.hierarchy
- The type hierarchy of the declaring type.name
- The name of the method to find.paramTypes
- The parameter types of the method to find.- Returns:
- The resulting decoration.
- Throws:
JavaModelException
- if accessing a Java Model element fails- Restriction:
- This method is not intended to be referenced by clients.
-
addListener
public void addListener(org.eclipse.jface.viewers.ILabelProviderListener listener) - Specified by:
addListener
in interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
isLabelProperty
- Specified by:
isLabelProperty
in interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
removeListener
public void removeListener(org.eclipse.jface.viewers.ILabelProviderListener listener) - Specified by:
removeListener
in interfaceorg.eclipse.jface.viewers.IBaseLabelProvider
-
decorate
- Specified by:
decorate
in interfaceorg.eclipse.jface.viewers.ILightweightLabelDecorator
-