Class ApplicationsLabelProvider
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.LabelProvider
org.eclipse.ui.model.WorkbenchLabelProvider
com.e1c.g5.dt.applications.ui.view.ApplicationsLabelProvider
- All Implemented Interfaces:
DelegatingStyledCellLabelProvider.IStyledLabelProvider,IBaseLabelProvider,IColorProvider,IFontProvider,ILabelProvider,IToolTipProvider,org.eclipse.ui.navigator.ICommonLabelProvider,org.eclipse.ui.navigator.IDescriptionProvider,org.eclipse.ui.navigator.IMementoAware
public class ApplicationsLabelProvider
extends org.eclipse.ui.model.WorkbenchLabelProvider
implements org.eclipse.ui.navigator.ICommonLabelProvider, IToolTipProvider
Label provider that can be used to display applications.
The primary intended usage is Applications view.
Items to be displayed are supposed to be mainly
IApplication.
However, the implementation will gracefully chew anything that is not an application
by falling back to basic default behaviour:
- Label and icon for the item to be displayed are determined by adapting the item to
IWorkbenchAdapterthat is supposed to provide both label and icon. This allows to have icons and labels specific for each application type and even for items that are not applications but something else (for example, server sub-item in case of application on standalone server).
default application
or the application is web accessible and
its identifier matches that of default web access.
Tooltip depends on if application artifacts are shown or not and its state:
- If displaying artifacts:
tooltip will reflect
publish stateandlifecycle stateunless the state is unknown. In the latter case, state ofapplication's artifactscould be displayed instead. - If not displaying artifacts:
only application's
publish stateis displayed.
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationsLabelProvider(IApplicationManager applicationManager) Constructs label providerApplicationsLabelProvider(IApplicationManager applicationManager, boolean showArtifacts) Constructs label provider -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()getDescription(Object anElement) org.eclipse.swt.graphics.FontgetToolTipText(Object element) voidinit(org.eclipse.ui.navigator.ICommonContentExtensionSite aConfig) voidrestoreState(org.eclipse.ui.IMemento aMemento) voidsaveState(org.eclipse.ui.IMemento aMemento) Methods inherited from class org.eclipse.ui.model.WorkbenchLabelProvider
decorateImage, decorateText, getAdapter, getAdapter2, getAdapter3, getBackground, getDecoratingWorkbenchLabelProvider, getDecorationStyle, getForeground, getImage, getStyledText, getTextMethods 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, removeListenerMethods inherited from interface org.eclipse.jface.viewers.ILabelProvider
getImage, getText
-
Constructor Details
-
ApplicationsLabelProvider
Constructs label provider- Parameters:
applicationManager- the application manager, cannot beenull
-
ApplicationsLabelProvider
Constructs label provider- Parameters:
applicationManager- the application manager, cannot beenullshowArtifacts- iftruethen tooltip will include publish state only and full state otherwise
-
-
Method Details
-
restoreState
public void restoreState(org.eclipse.ui.IMemento aMemento) - Specified by:
restoreStatein interfaceorg.eclipse.ui.navigator.IMementoAware
-
saveState
public void saveState(org.eclipse.ui.IMemento aMemento) - Specified by:
saveStatein interfaceorg.eclipse.ui.navigator.IMementoAware
-
getDescription
- Specified by:
getDescriptionin interfaceorg.eclipse.ui.navigator.IDescriptionProvider
-
getFont
- Specified by:
getFontin interfaceIFontProvider- Overrides:
getFontin classorg.eclipse.ui.model.WorkbenchLabelProvider
-
getToolTipText
- Specified by:
getToolTipTextin interfaceIToolTipProvider
-
dispose
public void dispose()- Specified by:
disposein interfaceIBaseLabelProvider- Overrides:
disposein classorg.eclipse.ui.model.WorkbenchLabelProvider
-