Package org.eclipse.handly.ui.callhierarchy

# 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

  Constructors
  Constructor
  Description
  `CallHierarchyLabelProvider(org.eclipse.jface.viewers.ILabelProvider delegate)`
  Constructs a call hierarchy label provider.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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.
  `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.
  `void`
  `dispose()`
  `protected final org.eclipse.jface.viewers.ILabelProvider`
  `getDelegate()`
  Returns the label provider used for delegation.
  `org.eclipse.swt.graphics.Image`
  `getImage(Object element)`
  `protected final org.eclipse.jface.resource.ResourceManager`
  `getResourceManager()`
  Returns the resource manager for this label provider.
  `org.eclipse.jface.viewers.StyledString`
  `getStyledText(Object element)`
  `String`
  `getText(Object element)`

  ### Methods inherited from class org.eclipse.jface.viewers.LabelProvider

  `createImageProvider, createTextImageProvider, createTextProvider`

  ### Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider

  `addListener, fireLabelProviderChanged, isLabelProperty, removeListener`

  ### Methods inherited from class org.eclipse.core.commands.common.EventManager

  `addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods 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 (not `null`)

- ## Method Details

  - ### dispose

    public void dispose()
    Specified by:
      `dispose` in interface `org.eclipse.jface.viewers.IBaseLabelProvider`
    Overrides:
      `dispose` in class `org.eclipse.jface.viewers.BaseLabelProvider`

  - ### getImage

    public org.eclipse.swt.graphics.Image getImage(Object element)
    Specified by:
      `getImage` in interface `org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider`
    Specified by:
      `getImage` in interface `org.eclipse.jface.viewers.ILabelProvider`
    Overrides:
      `getImage` in class `org.eclipse.jface.viewers.LabelProvider`

  - ### getStyledText

    public org.eclipse.jface.viewers.StyledString getStyledText(Object element)
    Specified by:
      `getStyledText` in interface `org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider`

  - ### getText

    public String getText(Object element)
    Specified by:
      `getText` in interface `org.eclipse.jface.viewers.ILabelProvider`
    Overrides:
      `getText` in class `org.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 be `null`, in which case `null` will be returned)
      `node` - the corresponding node (not `null`)
    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 (not `null`)
      `node` - the corresponding node (not `null`)
    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`)