public class BatchMerger extends Object implements IBatchMerger
IBatchMerger
leaves some choice to the client as to what should be
merged.Constructor and Description |
---|
BatchMerger(IMerger.Registry registry)
Constructs our batch merger provided the registry from which to retrieve the delegate mergers.
|
BatchMerger(IMerger.Registry registry,
com.google.common.base.Predicate<? super Diff> filter)
Constructs our batch merger provided the registry from which to retrieve the delegate mergers, and a
filter if you only wish to merge specific differences.
|
Modifier and Type | Method and Description |
---|---|
void |
copyAllLeftToRight(Iterable<? extends Diff> differences,
Monitor monitor)
This will be called to copy all of the differences from the given list from the left to the right side.
|
void |
copyAllRightToLeft(Iterable<? extends Diff> differences,
Monitor monitor)
This will be called to copy all of the differences from the given list from the right to the left side.
|
public BatchMerger(IMerger.Registry registry)
registry
- The registry from which we'll retrieve delegate mergers.public BatchMerger(IMerger.Registry registry, com.google.common.base.Predicate<? super Diff> filter)
Note that the filter indicates differences that will be merged, not those that will be ignored.
For example, if you wish to ignore all differences in conflict, you can use :
IMerger.Registry registry = IMerger.RegistryImpl.createStandaloneInstance(); IBatchMerger bathMerger = new BatchMerger(registry,not
(hasConflict
(ConflictKind.PSEUDO, ConflictKind.REAL))); bathMerger.copyAll...
registry
- The registry from which we'll retrieve delegate mergers.filter
- Additional filter for the differences. This could be set in order to ignore diffs
originating from a given side. Note that the filter describes the differences that will be
merged, not those that will be ignored.Predicates
,
EMFComparePredicates
public void copyAllLeftToRight(Iterable<? extends Diff> differences, Monitor monitor)
copyAllLeftToRight
in interface IBatchMerger
differences
- The differences that will be merged.monitor
- Monitor on which to report progress information.IBatchMerger.copyAllLeftToRight(java.lang.Iterable,
org.eclipse.emf.common.util.Monitor)
public void copyAllRightToLeft(Iterable<? extends Diff> differences, Monitor monitor)
copyAllRightToLeft
in interface IBatchMerger
differences
- The differences that will be merged.monitor
- Monitor on which to report progress information.IBatchMerger.copyAllRightToLeft(java.lang.Iterable,
org.eclipse.emf.common.util.Monitor)
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.