public interface ISynchronizationCompareAdapter
Clients should not implement this interface but should subclass SynchronizationCompareAdapter
instead.
Modifier and Type | Method and Description |
---|---|
ICompareInput |
asCompareInput(ISynchronizationContext context,
Object o)
Return a compare input for the given model object.
|
ImageDescriptor |
getImageDescriptor(ResourceMapping mapping)
Return an image descriptor that can be displayed as an icon for the
model object of the given resource mapping.
|
String |
getName(ResourceMapping mapping)
Get the name associated with the model object of the given mapping.
|
String |
getPathString(ResourceMapping mapping)
Get the path associated with the model object
of the given mapping.
|
int |
getSynchronizationState(ITeamStateProvider provider,
ResourceMapping mapping,
int stateMask,
IProgressMonitor monitor)
Return the synchronization state of the resource mapping with respect to
the given team state provider.
|
boolean |
hasCompareInput(ISynchronizationContext context,
Object object)
Return whether their is a compare input associated with the given object.
|
ResourceMapping[] |
restore(IMemento memento)
Restore the previously saved resource mappings.
|
void |
save(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.
|
boolean hasCompareInput(ISynchronizationContext context, Object object)
true
if asCompareInput(ISynchronizationContext, Object)
would return a value and false
if it would return null
.context
- the synchronization contextobject
- the object.ICompareInput asCompareInput(ISynchronizationContext context, Object o)
ISynchronizationCompareInput.prepareInput(org.eclipse.compare.CompareConfiguration, IProgressMonitor)
method. Clients should call this method once per context before obtaining
any compare inputs from the adapter. A null
should be
returned if the model object is in-sync or otherwise cannot be compared.
Model providers can choose to return an instance of ISynchronizationCompareInput
if they wish to tailor the compare editor used to show the compare input
of provide an SaveableComparison
in order to have more control
over the save lifecycle during a merge.
context
- the synchronization contexto
- the model objectnull
if the model object is
in-sync or otherwise cannot be compared.String getName(ResourceMapping mapping)
mapping
- the mappingString getPathString(ResourceMapping mapping)
mapping
- the mappingImageDescriptor getImageDescriptor(ResourceMapping mapping)
mapping
- the mappingvoid save(ResourceMapping[] mappings, IMemento memento)
mappings
- the resource mappings to savememento
- the memento where the mappings should be savedResourceMapping[] restore(IMemento memento)
memento
- a mementoint getSynchronizationState(ITeamStateProvider provider, ResourceMapping mapping, int stateMask, IProgressMonitor monitor) throws CoreException
ITeamStateProvider
when 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.provider
- the team state providermapping
- the elementstateMask
- the state mask that indicates which state flags are desiredmonitor
- a progress monitorCoreException
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.