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.core.mapping
Class ResourceMappingMerger


java.lang.Object
  extended by 
org.eclipse.team.core.mapping.ResourceMappingMerger
All Implemented Interfaces:
IResourceMappingMerger
Direct Known Subclasses:
AbstractResourceMappingMerger

public abstract class ResourceMappingMerger
extends Object
implements IResourceMappingMerger

Abstract implementation of IResourceMappingMerger. This merger delegates the merge of all resources covered by the mappings of the model provider returned from getModelProvider() back to the merge context. Subclasses should override the merge(IMergeContext, IProgressMonitor) method in order to change this behavior.

Clients may subclass this class.

Since:
3.2
See Also:
IResourceMappingMerger

Constructor Summary
ResourceMappingMerger ()
           
 
Method Summary
  ISchedulingRule getMergeRule ( IMergeContext context)
          Return the scheduling rule required to merge all the changes in the context for the model provider of this merger.
protected abstract   ModelProvider getModelProvider ()
          Return the model provider associated with this merger.
  IStatus merge ( IMergeContext mergeContext, IProgressMonitor monitor)
          A default implementation of merge that attempts to merge all the mappings in the context.
  IStatus validateMerge ( IMergeContext mergeContext, IProgressMonitor monitor)
          Validate an auto-merge for the given context.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceMappingMerger

public ResourceMappingMerger()
Method Detail

validateMerge

public 
IStatus validateMerge(
IMergeContext mergeContext,
                             
IProgressMonitor monitor)
Description copied from interface: IResourceMappingMerger
Validate an auto-merge for the given context. This method must be invoked for all mergers involved in the merge before the auto-merge is attempted. The purpose of the validation is to indicate whether there are conditions in the merge context that make an auto-merge undesirable. The purpose is not to indicate that conflicts exist (this is done by the merge method) but instead to indicate that the nature of one of more incoming changes is such that performing an auto-merge may be undesirable.

Clients should validate before performing the merge and, if any of the returned status are not OK, should prompt the user to make them aware of the potential side effects. The user may still decide to attempt an auto-merge, in which case the client may still invoke the merge method.

Specified by:
validateMerge in interface IResourceMappingMerger
Parameters:
mergeContext - a context that provides access to the resources involved in the merge. The context must not be null.
monitor - a progress monitor
Returns:
a status indicating any potential side effects of performing an auto-merge.

getModelProvider

protected abstract 
ModelProvider getModelProvider()
Return the model provider associated with this merger.

Returns:
Return the model provider associated with this merger.

getMergeRule

public 
ISchedulingRule getMergeRule(
IMergeContext context)
Return the scheduling rule required to merge all the changes in the context for the model provider of this merger. By default, return a rule that covers all the projects for the mappings that belong to the model provider of this merger.

Specified by:
getMergeRule in interface IResourceMappingMerger
Parameters:
context - the context that contains the changes to be merged
Returns:
the scheduling rule required by this merger to merge all the changes in the given context belonging to the merger's model provider.
See Also:
IResourceMappingMerger.getMergeRule(org.eclipse.team.core.mapping.IMergeContext)

merge

public 
IStatus merge(
IMergeContext mergeContext,
                     
IProgressMonitor monitor)
              throws 
CoreException
A default implementation of merge that attempts to merge all the mappings in the context.

Specified by:
merge in interface IResourceMappingMerger
Parameters:
mergeContext - the context
monitor - a progress monitor
Returns:
a status indicating whether the merge was successful
Throws:
CoreException - if an error occurred
See Also:
IResourceMappingMerger.merge(org.eclipse.team.core.mapping.IMergeContext, org.eclipse.core.runtime.IProgressMonitor)

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