Package org.eclipse.emf.compare.merge
Class AdditiveConflictMerger
java.lang.Object
org.eclipse.emf.compare.merge.AbstractMerger
org.eclipse.emf.compare.merge.ConflictMerger
org.eclipse.emf.compare.merge.AdditiveConflictMerger
- All Implemented Interfaces:
IMergeCriterionAware
,IMergeOptionAware
,IMerger
,IMerger2
This specific implementation of
AbstractMerger
will be used to merge conflicts in an additive merge
context.- Since:
- 3.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.emf.compare.merge.IMerger
IMerger.Registry, IMerger.Registry2, IMerger.RegistryImpl
-
Field Summary
Fields inherited from class org.eclipse.emf.compare.merge.AbstractMerger
mergeOptions, SUB_DIFF_AWARE_OPTION
-
Constructor Summary
ConstructorDescriptionThe constructor specify the context where this merger can be used. -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(IMergeCriterion criterion) Default implementation of apply for mergers that extends this class.void
copyRightToLeft
(Diff target, Monitor monitor) Executes the copy from right to left.getDirectMergeDependencies
(Diff target, boolean mergeRightToLeft) Retrieves the set of directly required diffs needed in order to merge the current one.getDirectResultingMerges
(Diff target, boolean mergeRightToLeft) Returns all differences that will be merged because of our merging the giventarget
difference.Methods inherited from class org.eclipse.emf.compare.merge.ConflictMerger
copyLeftToRight, getMergerDelegate, isMergerFor
Methods inherited from class org.eclipse.emf.compare.merge.AbstractMerger
accept, addAt, copyDiff, createCopy, getDirectResultingRejections, getImpliedMerges, getLogicallyResultingMerges, getMergeOptions, getMergerDelegate, getRanking, getRegistry, isAccepting, isAdd, isInTerminalState, isSet, isUnset, mergeDiff, reject, setMergeOptions, setRanking, setRegistry
-
Constructor Details
-
AdditiveConflictMerger
public AdditiveConflictMerger()The constructor specify the context where this merger can be used.
-
-
Method Details
-
apply
Description copied from class:AbstractMerger
Default implementation of apply for mergers that extends this class. Will acceptnull
or AdditiveMergeCriterion.INSTANCE.- Specified by:
apply
in interfaceIMergeCriterionAware
- Overrides:
apply
in classConflictMerger
- Parameters:
criterion
- The merge criterion- Returns:
true
if the given criterion is null or is AdditiveMergeCriterion.INSTANCE.
-
copyRightToLeft
Description copied from class:ConflictMerger
Executes the copy from right to left.- Specified by:
copyRightToLeft
in interfaceIMerger
- Overrides:
copyRightToLeft
in classConflictMerger
- Parameters:
target
- The difference to handle.monitor
- Monitor.- See Also:
-
getDirectMergeDependencies
Description copied from class:AbstractMerger
Retrieves the set of directly required diffs needed in order to merge the current one. This may includes the diff'srequirements
or any other diff that we need to merge before the given one.- Specified by:
getDirectMergeDependencies
in interfaceIMerger2
- Overrides:
getDirectMergeDependencies
in classConflictMerger
- Parameters:
target
- The diff which direct requirements we need.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- The set of directly required diffs in order to merge the current one.
-
getDirectResultingMerges
Description copied from class:AbstractMerger
Returns all differences that will be merged because of our merging the giventarget
difference. This may include the diff'simplications
, the diff'sequivalences
, the diff'srefinements
or any other diff that we need to merge together with the given diff.- Specified by:
getDirectResultingMerges
in interfaceIMerger2
- Overrides:
getDirectResultingMerges
in classConflictMerger
- Parameters:
target
- The difference we're considering merging.mergeRightToLeft
- The direction in which we're considering a merge.- Returns:
- The Set of all differences that will be merged because we've merged
target
.
-