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
A abstract implementation of
ISynchronizationCompareAdapter
.
The
asCompareInput(ISynchronizationContext, Object)
which will convert file objects to an appropriate compare input.
Clients may subclass this class.
-
Since:
- 3.2
Methods inherited from class java.lang.
Object
|
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
|
SynchronizationCompareAdapter
public SynchronizationCompareAdapter()
asCompareInput
public
ICompareInput asCompareInput(
ISynchronizationContext context,
Object o)
- Default implementation that is capable of returning a compare input for objects
that adapt to
IFile
. Subclasses should override if compare inputs are
available for other types of model elements.
-
-
Specified by:
-
asCompareInput
in interface
ISynchronizationCompareAdapter
-
-
Parameters:
-
context
- the synchronization context -
o
- the model object
-
Returns:
- a compare input or
null
if the model object is
in-sync or otherwise cannot be compared. -
See Also:
-
ISynchronizationCompareAdapter.asCompareInput(ISynchronizationContext, Object)
hasCompareInput
public boolean hasCompareInput(
ISynchronizationContext context,
Object object)
-
Description copied from interface:
ISynchronizationCompareAdapter
- Return whether their is a compare input associated with the given object.
In other words, return
true
if
ISynchronizationCompareAdapter.asCompareInput(ISynchronizationContext, Object)
would return a value and false
if it would return null
.
-
-
Specified by:
-
hasCompareInput
in interface
ISynchronizationCompareAdapter
-
-
Parameters:
-
context
- the synchronization context -
object
- the object.
-
Returns:
- whether their is a compare input associated with the given object
getName
public
String getName(
ResourceMapping mapping)
-
Description copied from interface:
ISynchronizationCompareAdapter
- Get the name associated with the model object of the given mapping.
This name should be suitable for display to the user.
-
-
Specified by:
-
getName
in interface
ISynchronizationCompareAdapter
-
-
Parameters:
-
mapping
- the mapping
-
Returns:
- the name of the mapping's model object
getPathString
public
String getPathString(
ResourceMapping mapping)
-
Description copied from interface:
ISynchronizationCompareAdapter
- Get the path associated with the model object
of the given mapping.
This path should be suitable for display to the user.
-
-
Specified by:
-
getPathString
in interface
ISynchronizationCompareAdapter
-
-
Parameters:
-
mapping
- the mapping
-
Returns:
- the path of the model object of the mapping
getImageDescriptor
public
ImageDescriptor getImageDescriptor(
ResourceMapping mapping)
-
Description copied from interface:
ISynchronizationCompareAdapter
- Return an image descriptor that can be displayed as an icon for the
model object of the given resource mapping.
-
-
Specified by:
-
getImageDescriptor
in interface
ISynchronizationCompareAdapter
-
-
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 of
ITeamStateProvider
when the synchronization state description for
an element is requested.
-
-
Specified by:
-
getSynchronizationState
in interface
ISynchronizationCompareAdapter
-
-
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
-
Since:
- 3.3
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.