Package org.eclipse.team.ui.mapping
Interface ISynchronizationCompareAdapter
- All Known Implementing Classes:
- AbstractSynchronizationCompareAdapter,- SynchronizationCompareAdapter
public interface ISynchronizationCompareAdapter
The compare adapter provides compare support for the model objects
 associated with a model provider.
 
 Clients should not implement this interface but should subclass SynchronizationCompareAdapter
 instead.
- Since:
- 3.2
- 
Method SummaryModifier and TypeMethodDescriptionasCompareInput(ISynchronizationContext context, Object o) Return a compare input for the given model object.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.Restore the previously saved resource mappings.voidsave(ResourceMapping[] mappings, IMemento memento) Save the given resource mappings from this adapters model provider into the given memento in a form that can be restored at a future time.
- 
Method Details- 
hasCompareInputReturn whether their is a compare input associated with the given object. In other words, returntrueifasCompareInput(ISynchronizationContext, Object)would return a value andfalseif it would returnnull.- Parameters:
- context- the synchronization context
- object- the object.
- Returns:
- whether their is a compare input associated with the given object
 
- 
asCompareInputReturn a compare input for the given model object. Creation of the input should be fast. Synchronization information calculations that are longer running should be performed in theISynchronizationCompareInput.prepareInput(org.eclipse.compare.CompareConfiguration, IProgressMonitor)method. Clients should call this method once per context before obtaining any compare inputs from the adapter. Anullshould be returned if the model object is in-sync or otherwise cannot be compared.Model providers can choose to return an instance of ISynchronizationCompareInputif they wish to tailor the compare editor used to show the compare input of provide anSaveableComparisonin order to have more control over the save lifecycle during a merge.- Parameters:
- context- the synchronization context
- o- the model object
- Returns:
- a compare input or nullif the model object is in-sync or otherwise cannot be compared.
 
- 
getNameGet the name associated with the model object of the given mapping. This name should be suitable for display to the user.- Parameters:
- mapping- the mapping
- Returns:
- the name of the mapping's model object
 
- 
getPathStringGet the path associated with the model object of the given mapping. This path should be suitable for display to the user.- Parameters:
- mapping- the mapping
- Returns:
- the path of the model object of the mapping
 
- 
getImageDescriptorReturn an image descriptor that can be displayed as an icon for the model object of the given resource mapping.- Parameters:
- mapping- the mapping
- Returns:
- an image descriptor that can be displayed as an icon for the model object of the given resource mapping
- Since:
- 3.3
 
- 
saveSave the given resource mappings from this adapters model provider into the given memento in a form that can be restored at a future time.- Parameters:
- mappings- the resource mappings to save
- memento- the memento where the mappings should be saved
 
- 
restoreRestore the previously saved resource mappings.- Parameters:
- memento- a memento
- Returns:
- the mappings restored from the given memento
 
- 
getSynchronizationStateint 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. This method can return -1 to indicate that the state calculation should be performed using the resources that the element maps to.- Parameters:
- provider- the team state provider
- mapping- the element
- stateMask- the state mask that indicates which state flags are desired
- monitor- 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; depends on concrete implementation
- Since:
- 3.3
 
 
-