Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.ui.mapping
Class SynchronizationCompareAdapter


java.lang.Object
  extended by 
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

Constructor Summary
SynchronizationCompareAdapter ()
           
 
Method Summary
  ICompareInput asCompareInput ( ISynchronizationContext context, Object o)
          Default implementation that is capable of returning a compare input for objects that adapt to IFile.
  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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.team.ui.mapping. ISynchronizationCompareAdapter
restore, save
 

Constructor Detail

SynchronizationCompareAdapter

public SynchronizationCompareAdapter()
Method Detail

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

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire