public abstract class SynchronizationLabelProvider extends AbstractSynchronizeLabelProvider implements ICommonLabelProvider, IFontProvider
Constructor and Description |
---|
SynchronizationLabelProvider() |
Modifier and Type | Method and Description |
---|---|
ISynchronizationContext |
getContext()
Return the synchronization context associated with the view to which
this label provider applies.
|
String |
getDescription(Object anElement)
Provide a description for the status bar view, if available.
|
ICommonContentExtensionSite |
getExtensionSite()
Return the Common Navigator extension site for this
label provider.
|
Image |
getImage(Object element)
Returns the image for the label of the given element.
|
protected Object |
getModelRoot()
Return the root object for the model.
|
ISynchronizationScope |
getScope()
Return the resource mapping scope associated with the view to which
this label provider applies.
|
String |
getText(Object element)
Returns the text for the label of the given element.
|
void |
init(ICommonContentExtensionSite site)
Initialize the label provider with the given configuration.
|
protected boolean |
isDecorationEnabled()
Return whether the label provider should decorate with the synchronization state.
|
void |
restoreState(IMemento aMemento)
Restore the previous state of any actions using the flags in aMemento.
|
void |
saveState(IMemento aMemento)
Save flags in aMemento to remember the state of any actions that persist
from session to session.
|
addListener, decorateImage, decorateText, dispose, getCompareImage, getDelegateImage, getDelegateLabelProvider, getDelegateText, getDiff, getFont, getMarkerSeverity, hasDecendantConflicts, isBusy, isIncludeOverlays, isLabelProperty, isSyncInfoInTextEnabled, removeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, dispose, isLabelProperty, removeListener
getFont
public void init(ICommonContentExtensionSite site)
ICommonLabelProvider
init
in interface ICommonLabelProvider
site
- The extension site provides information that some extensions
will find useful to configure themselves properly in a
particular viewer.ICommonContentProvider
public ISynchronizationContext getContext()
null
is returned if
no context is available.null
public ISynchronizationScope getScope()
null
is returned if
no scope is available.null
public void restoreState(IMemento aMemento)
IMementoAware
Restore the previous state of any actions using the flags in aMemento. This method allows the state of any actions that persist from session to session to be restored.
restoreState
in interface IMementoAware
aMemento
- A memento that was given to the view part to restore its
state.public void saveState(IMemento aMemento)
IMementoAware
Save flags in aMemento to remember the state of any actions that persist from session to session.
Extensions should qualify any keys stored in the memento with their plugin id
saveState
in interface IMementoAware
aMemento
- A memento that was given to the view part to save its state.public String getDescription(Object anElement)
IDescriptionProvider
Provide a description for the status bar view, if available. A default string of the form "(x) items selected" will be used if this method choose to return null.
The empty string ("") will be respected as a valid value if returned. Return null if the extension defers to the default method of supplying status bar descriptions.
getDescription
in interface IDescriptionProvider
anElement
- The element selected in the Navigatorprotected boolean isDecorationEnabled()
AbstractSynchronizeLabelProvider
isDecorationEnabled
in class AbstractSynchronizeLabelProvider
public Image getImage(Object element)
ILabelProvider
getImage
in interface ILabelProvider
getImage
in class AbstractSynchronizeLabelProvider
element
- the element for which to provide the label imagenull
if there is no image for the given objectprotected Object getModelRoot()
public String getText(Object element)
ILabelProvider
getText
in interface ILabelProvider
getText
in class AbstractSynchronizeLabelProvider
element
- the element for which to provide the label textnull
if there is no text label for the given objectpublic ICommonContentExtensionSite getExtensionSite()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.