Interface IMerger2

All Superinterfaces:
IMerger
All Known Implementing Classes:
AbstractMerger, AdditiveConflictMerger, AdditiveReferenceChangeMerger, AdditiveResourceAttachmentChangeMerger, AttributeChangeMerger, ConflictMerger, FeatureMapChangeMerger, PseudoConflictMerger, ReferenceChangeMerger, ResourceAttachmentChangeMerger, ResourceLocationChangeMerger

public interface IMerger2 extends IMerger
This adds the ability for mergers to define their own sub-set of "required" differences.

This set of differences is what will be used by the UI to highlight related differences, by the batch merger to determine whether the diff can be merged beforehand (one of the related being in conflict will prevent the merge as a whole), ...

The AbstractMerger implements this and can be sub-classed instead when the default set of requirements is enough.

Since:
3.2
  • Method Details

    • getDirectMergeDependencies

      Set<Diff> getDirectMergeDependencies(Diff diff, boolean mergeRightToLeft)
      Retrieves the set of directly required diffs needed in order to merge the current one. This may includes the diff's requirements or any other diff that we need to merge before the given one.
      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

      Set<Diff> getDirectResultingMerges(Diff target, boolean mergeRightToLeft)
      Returns all differences that will be merged because of our merging the given target difference. This may include the diff's implications, the diff's equivalences, the diff's refinements or any other diff that we need to merge together with the given diff.
      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.
    • getDirectResultingRejections

      Set<Diff> getDirectResultingRejections(Diff target, boolean mergeRightToLeft)
      Returns the set of all differences that need to be rejected if target is merged in the given direction.
      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 rejected if we are to merge merged target.