Package org.eclipse.team.ui.mapping
Class SynchronizationLabelProvider
java.lang.Object
org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvider
org.eclipse.team.ui.mapping.SynchronizationLabelProvider
- All Implemented Interfaces:
- IBaseLabelProvider,- IFontProvider,- ILabelProvider,- ICommonLabelProvider,- IDescriptionProvider,- IMementoAware
- Direct Known Subclasses:
- AbstractSynchronizationLabelProvider
public abstract class SynchronizationLabelProvider
extends AbstractSynchronizeLabelProvider
implements ICommonLabelProvider, IFontProvider
A label provider wrapper that adds synchronization image and/or text decorations
 to the image and label obtained from the delegate provider.
- Since:
- 3.2
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn the synchronization context associated with the view to which this label provider applies.getDescription(Object anElement) Provide a description for the status bar view, if available.Return the Common Navigator extension site for this label provider.Returns the image for the label of the given element.protected ObjectReturn the root object for the model.getScope()Return the resource mapping scope associated with the view to which this label provider applies.Returns the text for the label of the given element.voidInitialize the label provider with the given configuration.protected booleanReturn whether the label provider should decorate with the synchronization state.voidrestoreState(IMemento aMemento) Restore the previous state of any actions using the flags in aMemento.voidSave flags in aMemento to remember the state of any actions that persist from session to session.Methods inherited from class org.eclipse.team.ui.synchronize.AbstractSynchronizeLabelProvideraddListener, decorateImage, decorateText, dispose, getCompareImage, getDelegateImage, getDelegateLabelProvider, getDelegateText, getDiff, getFont, getMarkerSeverity, hasDecendantConflicts, isBusy, isIncludeOverlays, isLabelProperty, isSyncInfoInTextEnabled, removeListenerMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.viewers.IBaseLabelProvideraddListener, dispose, isLabelProperty, removeListenerMethods inherited from interface org.eclipse.jface.viewers.IFontProvidergetFont
- 
Constructor Details- 
SynchronizationLabelProviderpublic SynchronizationLabelProvider()
 
- 
- 
Method Details
- 
getContextReturn the synchronization context associated with the view to which this label provider applies. Anullis returned if no context is available.- Returns:
- the synchronization context or null
 
- 
getScopeReturn the resource mapping scope associated with the view to which this label provider applies. Anullis returned if no scope is available.- Returns:
- the resource mapping scope or null
 
- 
restoreStateDescription copied from interface:IMementoAwareRestore 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. - Specified by:
- restoreStatein interface- IMementoAware
- Parameters:
- aMemento- A memento that was given to the view part to restore its state.
 
- 
saveStateDescription copied from interface:IMementoAwareSave 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 - Specified by:
- saveStatein interface- IMementoAware
- Parameters:
- aMemento- A memento that was given to the view part to save its state.
 
- 
getDescriptionDescription copied from interface:IDescriptionProviderProvide 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. - Specified by:
- getDescriptionin interface- IDescriptionProvider
- Parameters:
- anElement- The element selected in the Navigator
- Returns:
- A description for the status bar view, or null if not available.
 
- 
isDecorationEnabledprotected boolean isDecorationEnabled()Description copied from class:AbstractSynchronizeLabelProviderReturn whether the label provider should decorate with the synchronization state.- Specified by:
- isDecorationEnabledin class- AbstractSynchronizeLabelProvider
- Returns:
- whether the label provider should decorate with the synchronization state
 
- 
getImageDescription copied from interface:ILabelProviderReturns the image for the label of the given element. The image is owned by the label provider and must not be disposed directly. Instead, dispose the label provider when no longer needed.- Specified by:
- getImagein interface- ILabelProvider
- Overrides:
- getImagein class- AbstractSynchronizeLabelProvider
- Parameters:
- element- the element for which to provide the label image
- Returns:
- the image used to label the element, or nullif there is no image for the given object
 
- 
getModelRootReturn the root object for the model. By default, it is the workspace root. Subclasses may override. This object is used to obtain an image for the model provider.- Returns:
- the root object for the model
 
- 
getTextDescription copied from interface:ILabelProviderReturns the text for the label of the given element.- Specified by:
- getTextin interface- ILabelProvider
- Overrides:
- getTextin class- AbstractSynchronizeLabelProvider
- Parameters:
- element- the element for which to provide the label text
- Returns:
- the text string used to label the element, or nullif there is no text label for the given object
 
- 
getExtensionSiteReturn the Common Navigator extension site for this label provider.- Returns:
- the Common Navigator extension site for this label provider