org.eclipse.xtext.ui.label
Class DeclarativeLabelProvider

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.viewers.BaseLabelProvider
          extended by org.eclipse.jface.viewers.LabelProvider
              extended by org.eclipse.xtext.ui.label.AbstractLabelProvider
                  extended by org.eclipse.xtext.ui.label.DeclarativeLabelProvider
All Implemented Interfaces:
org.eclipse.emf.edit.provider.IItemLabelProvider, org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider, org.eclipse.jface.viewers.IBaseLabelProvider, org.eclipse.jface.viewers.ILabelProvider
Direct Known Subclasses:
DefaultDescriptionLabelProvider, DefaultEditorInputLabelProvider, DefaultEObjectLabelProvider

public class DeclarativeLabelProvider
extends AbstractLabelProvider

A label provider that dispatches to typed Object image() and Object text() methods.

Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
DeclarativeLabelProvider()
           
DeclarativeLabelProvider(org.eclipse.jface.viewers.ILabelProvider delegate)
           
 
Method Summary
protected  java.lang.Object doGetImage(java.lang.Object element)
          Expected to be overridden by clients.
protected  java.lang.Object doGetText(java.lang.Object element)
          Expected to be overridden by clients.
protected  java.lang.Object handleImageError(java.lang.Object[] params, java.lang.Throwable e)
           
protected  java.lang.Object handleTextError(java.lang.Object[] params, java.lang.Throwable e)
           
 java.lang.Object image(java.lang.Object element)
           
 java.lang.Object image(java.lang.Void element)
           
 java.lang.Object text(java.lang.Object element)
           
 java.lang.Object text(java.lang.Void element)
           
 
Methods inherited from class org.eclipse.xtext.ui.label.AbstractLabelProvider
convertToImage, convertToString, convertToStyledString, getDefaultImage, getDefaultStyledText, getDefaultText, getImage, getStyledText, getText, setImageHelper
 
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, dispose, 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, dispose, isLabelProperty, removeListener
 

Constructor Detail

DeclarativeLabelProvider

public DeclarativeLabelProvider()

DeclarativeLabelProvider

public DeclarativeLabelProvider(org.eclipse.jface.viewers.ILabelProvider delegate)
Method Detail

doGetText

protected java.lang.Object doGetText(java.lang.Object element)
Description copied from class: AbstractLabelProvider
Expected to be overridden by clients.

Overrides:
doGetText in class AbstractLabelProvider
Returns:
a StyledString or a a String.

doGetImage

protected java.lang.Object doGetImage(java.lang.Object element)
Description copied from class: AbstractLabelProvider
Expected to be overridden by clients.

Overrides:
doGetImage in class AbstractLabelProvider
Returns:
a String, an ImageDescriptor or an Image passed to AbstractLabelProvider.convertToImage(Object) to determine the actual Image.

image

public java.lang.Object image(java.lang.Object element)

text

public java.lang.Object text(java.lang.Object element)

image

public java.lang.Object image(java.lang.Void element)

text

public java.lang.Object text(java.lang.Void element)

handleTextError

protected java.lang.Object handleTextError(java.lang.Object[] params,
                                           java.lang.Throwable e)

handleImageError

protected java.lang.Object handleImageError(java.lang.Object[] params,
                                            java.lang.Throwable e)