Package org.eclipse.emf.compare.merge
Class AdditiveResourceAttachmentChangeMerger
- java.lang.Object
-
- org.eclipse.emf.compare.merge.AbstractMerger
-
- org.eclipse.emf.compare.merge.ResourceAttachmentChangeMerger
-
- org.eclipse.emf.compare.merge.AdditiveResourceAttachmentChangeMerger
-
- All Implemented Interfaces:
IMergeCriterionAware,IMergeOptionAware,IMerger,IMerger2
public class AdditiveResourceAttachmentChangeMerger extends ResourceAttachmentChangeMerger
This specific implementation ofAbstractMergerwill be used to merge resource attachment changes 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
Constructors Constructor Description AdditiveResourceAttachmentChangeMerger()The constructor specify the context where this merger can be used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapply(IMergeCriterion criterion)Default implementation of apply for mergers that extends this class.voidcopyRightToLeft(Diff target, Monitor monitor)Executes the copy from right to left.Set<Diff>getDirectMergeDependencies(Diff diff, boolean mergeRightToLeft)Retrieves the set of directly required diffs needed in order to merge the current one.Set<Diff>getDirectResultingMerges(Diff diff, boolean mergeRightToLeft)Returns all differences that will be merged because of our merging the giventargetdifference.-
Methods inherited from class org.eclipse.emf.compare.merge.ResourceAttachmentChangeMerger
accept, addInTarget, computeTargetURI, deleteFormerResourceIfNecessary, deleteResource, findInsertionIndex, findOrCreateTargetResource, getMatchResource, isMergerFor, move, mustDelete, reject, removeFromTarget
-
Methods inherited from class org.eclipse.emf.compare.merge.AbstractMerger
addAt, copyDiff, copyLeftToRight, createCopy, getDirectResultingRejections, getImpliedMerges, getLogicallyResultingMerges, getMergeOptions, getMergerDelegate, getMergerDelegate, getRanking, getRegistry, isAccepting, isAdd, isInTerminalState, isSet, isUnset, mergeDiff, setMergeOptions, setRanking, setRegistry
-
-
-
-
Method Detail
-
apply
public boolean apply(IMergeCriterion criterion)
Description copied from class:AbstractMergerDefault implementation of apply for mergers that extends this class. Will acceptnullor AdditiveMergeCriterion.INSTANCE.- Specified by:
applyin interfaceIMergeCriterionAware- Overrides:
applyin classResourceAttachmentChangeMerger- Parameters:
criterion- The merge criterion- Returns:
trueif the given criterion is null or is AdditiveMergeCriterion.INSTANCE.
-
copyRightToLeft
public void copyRightToLeft(Diff target, Monitor monitor)
Description copied from class:AbstractMergerExecutes the copy from right to left.- Specified by:
copyRightToLeftin interfaceIMerger- Overrides:
copyRightToLeftin classAbstractMerger- Parameters:
target- The difference to handle.monitor- Monitor.- See Also:
IMerger.copyRightToLeft(org.eclipse.emf.compare.Diff, org.eclipse.emf.common.util.Monitor)
-
getDirectMergeDependencies
public Set<Diff> getDirectMergeDependencies(Diff diff, boolean mergeRightToLeft)
Description copied from class:AbstractMergerRetrieves the set of directly required diffs needed in order to merge the current one. This may includes the diff'srequirementsor any other diff that we need to merge before the given one.- Specified by:
getDirectMergeDependenciesin interfaceIMerger2- Overrides:
getDirectMergeDependenciesin classAbstractMerger- Parameters:
diff- 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
public Set<Diff> getDirectResultingMerges(Diff diff, boolean mergeRightToLeft)
Description copied from class:AbstractMergerReturns all differences that will be merged because of our merging the giventargetdifference. This may include the diff'simplications, the diff'sequivalences, the diff'srefinementsor any other diff that we need to merge together with the given diff.- Specified by:
getDirectResultingMergesin interfaceIMerger2- Overrides:
getDirectResultingMergesin classAbstractMerger- Parameters:
diff- 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.
-
-