Package org.eclipse.team.ui.mapping
Class SynchronizationCompareAdapter
java.lang.Object
org.eclipse.team.ui.mapping.SynchronizationCompareAdapter
- All Implemented Interfaces:
ISynchronizationCompareAdapter
- Direct Known Subclasses:
AbstractSynchronizationCompareAdapter
public abstract class SynchronizationCompareAdapter
extends Object
implements ISynchronizationCompareAdapter
An abstract implementation of
ISynchronizationCompareAdapter.
Clients may subclass this class.
- Since:
- 3.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasCompareInput(ISynchronizationContext context, Object o) Default implementation that is capable of returning a compare input for objects that adapt toIFile.getImageDescriptor(ResourceMapping mapping) Return an image descriptor that can be displayed as an icon for the model object of the given resource mapping.getName(ResourceMapping mapping) Get the name associated with the model object of the given mapping.getPathString(ResourceMapping mapping) Get the path associated with the model object of the given mapping.intgetSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) Return the synchronization state of the resource mapping with respect to the given team state provider.booleanhasCompareInput(ISynchronizationContext context, Object object) Return whether their is a compare input associated with the given object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.team.ui.mapping.ISynchronizationCompareAdapter
restore, save
-
Constructor Details
-
SynchronizationCompareAdapter
public SynchronizationCompareAdapter()
-
-
Method Details
-
asCompareInput
Default implementation that is capable of returning a compare input for objects that adapt toIFile. Subclasses should override if compare inputs are available for other types of model elements.- Specified by:
asCompareInputin interfaceISynchronizationCompareAdapter- Parameters:
context- the synchronization contexto- the model object- Returns:
- a compare input or
nullif the model object is in-sync or otherwise cannot be compared. - See Also:
-
hasCompareInput
Description copied from interface:ISynchronizationCompareAdapterReturn whether their is a compare input associated with the given object. In other words, returntrueifISynchronizationCompareAdapter.asCompareInput(ISynchronizationContext, Object)would return a value andfalseif it would returnnull.- Specified by:
hasCompareInputin interfaceISynchronizationCompareAdapter- Parameters:
context- the synchronization contextobject- the object.- Returns:
- whether their is a compare input associated with the given object
-
getName
Description copied from interface:ISynchronizationCompareAdapterGet the name associated with the model object of the given mapping. This name should be suitable for display to the user.- Specified by:
getNamein interfaceISynchronizationCompareAdapter- Parameters:
mapping- the mapping- Returns:
- the name of the mapping's model object
-
getPathString
Description copied from interface:ISynchronizationCompareAdapterGet the path associated with the model object of the given mapping. This path should be suitable for display to the user.- Specified by:
getPathStringin interfaceISynchronizationCompareAdapter- Parameters:
mapping- the mapping- Returns:
- the path of the model object of the mapping
-
getImageDescriptor
Description copied from interface:ISynchronizationCompareAdapterReturn an image descriptor that can be displayed as an icon for the model object of the given resource mapping.- Specified by:
getImageDescriptorin interfaceISynchronizationCompareAdapter- Parameters:
mapping- the mapping- Returns:
- an image descriptor that can be displayed as an icon for the model object of the given resource mapping
-
getSynchronizationState
public int getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException Return the synchronization state of the resource mapping with respect to the given team state provider. This method is invoked from instances ofITeamStateProviderwhen the synchronization state description for an element is requested.- Specified by:
getSynchronizationStatein interfaceISynchronizationCompareAdapter- Parameters:
provider- the team state providermapping- the elementstateMask- the state mask that indicates which state flags are desiredmonitor- a progress monitor- Returns:
- the synchronization state of the element or -1 if the calculation of the state should be done using the resources of the mapping.
- Throws:
CoreException- on failures- Since:
- 3.3
-