Class AbstractSynchronizationCompareAdapter
java.lang.Object
org.eclipse.team.ui.mapping.SynchronizationCompareAdapter
org.eclipse.ltk.ui.refactoring.model.AbstractSynchronizationCompareAdapter
- All Implemented Interfaces:
ISynchronizationCompareAdapter
Partial implementation of a refactoring-aware synchronization compare adapter.
This class provides compare support for the refactoring history objects associated with a refactoring model provider.
Note: this class is designed to be extended by clients. Programming language implementers which need a refactoring-aware synchronization compare adapter to contribute to team synchronization views may extend this class to provide specific compare inputs for their model elements.
- Since:
- 3.2
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasCompareInput(ISynchronizationContext context, Object element) Default implementation that is capable of returning a compare input for objects that adapt toIFile.protected intgetKind(ISynchronizationContext context, RefactoringDescriptorProxy proxy) Returns the kind of difference between the three sides ancestor, left and right of the specified refactoring descriptor proxy.Methods inherited from class org.eclipse.team.ui.mapping.SynchronizationCompareAdapter
getImageDescriptor, getName, getPathString, getSynchronizationState, hasCompareInputMethods 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
-
AbstractSynchronizationCompareAdapter
public AbstractSynchronizationCompareAdapter()
-
-
Method Details
-
asCompareInput
Description copied from class:SynchronizationCompareAdapterDefault 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- Overrides:
asCompareInputin classSynchronizationCompareAdapter- Parameters:
context- the synchronization contextelement- the model object- Returns:
- a compare input or
nullif the model object is in-sync or otherwise cannot be compared. - See Also:
-
getKind
Returns the kind of difference between the three sides ancestor, left and right of the specified refactoring descriptor proxy.The result of this method is used to compose an icon which reflects the kind of difference between the two or three versions of the refactoring descriptor.
- Parameters:
context- the synchronization contextproxy- the refactoring descriptor proxy- Returns:
- the kind of difference
- See Also:
-