Class CallHierarchyLabelProvider
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.LabelProvider
org.eclipse.handly.ui.callhierarchy.CallHierarchyLabelProvider
- All Implemented Interfaces:
org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider,org.eclipse.jface.viewers.IBaseLabelProvider,org.eclipse.jface.viewers.ILabelProvider
public class CallHierarchyLabelProvider
extends org.eclipse.jface.viewers.LabelProvider
implements org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider
Default implementation of a label provider for call hierarchy nodes.
Uses a delegate label provider to obtain the labels for the underlying
model elements of the call hierarchy nodes and decorates them as needed
(e.g., the image for a recursive node is decorated with an overlay icon).
-
Constructor Summary
ConstructorsConstructorDescriptionCallHierarchyLabelProvider(org.eclipse.jface.viewers.ILabelProvider delegate) Constructs a call hierarchy label provider. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.swt.graphics.ImagedecorateNodeImage(org.eclipse.swt.graphics.Image image, ICallHierarchyNode node) Decorates the given image for a call hierarchy node as needed.protected org.eclipse.jface.viewers.StyledStringdecorateNodeStyledText(org.eclipse.jface.viewers.StyledString styledText, ICallHierarchyNode node) Decorates the given styled string for a call hierarchy node as needed.voiddispose()protected final org.eclipse.jface.viewers.ILabelProviderReturns the label provider used for delegation.org.eclipse.swt.graphics.Imageprotected final org.eclipse.jface.resource.ResourceManagerReturns the resource manager for this label provider.org.eclipse.jface.viewers.StyledStringgetStyledText(Object element) Methods inherited from class org.eclipse.jface.viewers.LabelProvider
createImageProvider, createTextImageProvider, createTextProviderMethods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, fireLabelProviderChanged, isLabelProperty, removeListenerMethods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvider
addListener, isLabelProperty, removeListener
-
Constructor Details
-
CallHierarchyLabelProvider
public CallHierarchyLabelProvider(org.eclipse.jface.viewers.ILabelProvider delegate) Constructs a call hierarchy label provider.- Parameters:
delegate- the label provider used for delegation (notnull)
-
-
Method Details
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.jface.viewers.IBaseLabelProvider- Overrides:
disposein classorg.eclipse.jface.viewers.BaseLabelProvider
-
getImage
- Specified by:
getImagein interfaceorg.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider- Specified by:
getImagein interfaceorg.eclipse.jface.viewers.ILabelProvider- Overrides:
getImagein classorg.eclipse.jface.viewers.LabelProvider
-
getStyledText
- Specified by:
getStyledTextin interfaceorg.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider
-
getText
- Specified by:
getTextin interfaceorg.eclipse.jface.viewers.ILabelProvider- Overrides:
getTextin classorg.eclipse.jface.viewers.LabelProvider
-
decorateNodeImage
protected org.eclipse.swt.graphics.Image decorateNodeImage(org.eclipse.swt.graphics.Image image, ICallHierarchyNode node) Decorates the given image for a call hierarchy node as needed.- Parameters:
image- the original image (may benull, in which casenullwill be returned)node- the corresponding node (notnull)- Returns:
- the decorated image (can be the given image if no decoration was necessary for the node)
-
decorateNodeStyledText
protected org.eclipse.jface.viewers.StyledString decorateNodeStyledText(org.eclipse.jface.viewers.StyledString styledText, ICallHierarchyNode node) Decorates the given styled string for a call hierarchy node as needed.- Parameters:
styledText- the original string (notnull)node- the corresponding node (notnull)- Returns:
- the decorated string (can be the given string if no decoration was necessary for the node)
-
getDelegate
protected final org.eclipse.jface.viewers.ILabelProvider getDelegate()Returns the label provider used for delegation.- Returns:
- the delegate label provider (never
null)
-
getResourceManager
protected final org.eclipse.jface.resource.ResourceManager getResourceManager()Returns the resource manager for this label provider.- Returns:
- the resource manager (never
null)
-