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
IWorkbenchAdapter
that 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 state
andlifecycle state
unless the state is unknown. In the latter case, state ofapplication's artifacts
could be displayed instead. - If not displaying artifacts:
only application's
publish state
is displayed.
-
Constructor Summary
ConstructorsConstructorDescriptionApplicationsLabelProvider
(IApplicationManager applicationManager) Constructs label providerApplicationsLabelProvider
(IApplicationManager applicationManager, boolean showArtifacts) Constructs label provider -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
getDescription
(Object anElement) org.eclipse.swt.graphics.Font
getToolTipText
(Object element) void
init
(org.eclipse.ui.navigator.ICommonContentExtensionSite aConfig) void
restoreState
(org.eclipse.ui.IMemento aMemento) void
saveState
(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, getText
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
Methods 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 beenull
showArtifacts
- iftrue
then tooltip will include publish state only and full state otherwise
-
-
Method Details
-
restoreState
public void restoreState(org.eclipse.ui.IMemento aMemento) - Specified by:
restoreState
in interfaceorg.eclipse.ui.navigator.IMementoAware
-
saveState
public void saveState(org.eclipse.ui.IMemento aMemento) - Specified by:
saveState
in interfaceorg.eclipse.ui.navigator.IMementoAware
-
getDescription
- Specified by:
getDescription
in interfaceorg.eclipse.ui.navigator.IDescriptionProvider
-
getFont
- Specified by:
getFont
in interfaceIFontProvider
- Overrides:
getFont
in classorg.eclipse.ui.model.WorkbenchLabelProvider
-
getToolTipText
- Specified by:
getToolTipText
in interfaceIToolTipProvider
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIBaseLabelProvider
- Overrides:
dispose
in classorg.eclipse.ui.model.WorkbenchLabelProvider
-