|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
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.
EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is a guarantee neither that this API will work nor that it will remain the same. Please do not use this API without consulting with the Platform/Team team.
| Method Summary | |
|---|---|
ICompareInput |
asCompareInput(ISynchronizationContext context,
Object o)
Return a compare input for the given model object. |
long |
countFor(ISynchronizationContext context,
int state,
int mask)
Return the number of out-of-sync elements in the given context whose synchronization state matches the given mask. |
IPath |
getFullPath(org.eclipse.core.resources.mapping.ResourceMapping mapping)
Get the path associated with the model object of the given mapping. |
String |
getName(org.eclipse.core.resources.mapping.ResourceMapping mapping)
Get the name associated with the model object of the given mapping. |
boolean |
hasCompareInput(ISynchronizationContext context,
Object object)
Return whether their is a compare input associated with the given object. |
org.eclipse.core.resources.mapping.ResourceMapping[] |
restore(IMemento memento)
Restore the previosuly saved resource mappings. |
void |
save(org.eclipse.core.resources.mapping.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 Detail |
public 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.
public ICompareInput asCompareInput(ISynchronizationContext context,
Object o)
#prepareContext(ISynchronizationContext, 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 paroviders can choose to return an instance of IModelCompareInput
if they wish to tailor the compare editor used to show the compare input
of provide an ISaveableCompareModel in order to have more contol
over the save lifecycle during a merge.
context - the synchronization contexto - the model object
null if the model object is
in-sync or otherwise cannot be compared.
public long countFor(ISynchronizationContext context,
int state,
int mask)
IDiffTree.countFor(int, int) or perform the calculation themselves.
For example, this will return the number of outgoing changes in the set:
long outgoing = countFor(context, IThreeWayDiff.OUTGOING, IThreeWayDiff.DIRECTION_MASK);
context - the synchronization contextstate - the sync statemask - the sync state mask
public String getName(org.eclipse.core.resources.mapping.ResourceMapping mapping)
mapping - the mapping
public IPath getFullPath(org.eclipse.core.resources.mapping.ResourceMapping mapping)
mapping - the mapping
public void save(org.eclipse.core.resources.mapping.ResourceMapping[] mappings,
IMemento memento)
mappings - the resource mappings to savememento - the memento where the mappings should be savedpublic org.eclipse.core.resources.mapping.ResourceMapping[] restore(IMemento memento)
memento - a memento
|
Eclipse Platform Release 3.2 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.