public interface IMerger2 extends IMerger
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.
IMerger.Registry, IMerger.RegistryImpl
Modifier and Type | Method and Description |
---|---|
Set<Diff> |
getResultingMerges(Diff diff,
boolean mergeLeftToRight,
Set<Diff> knownImplications)
Retrieves the set of all diffs related to the given
diff when merging in the given
direction. |
Set<Diff> |
getResultingRejections(Diff diff,
boolean mergeLeftToRight,
Set<Diff> knownRejections)
Retrieves the set of all diffs that will be rejected if the given
diff is merged, either
because of unresolveable conflicts or because of unreachable requirements. |
copyLeftToRight, copyRightToLeft, getRanking, getRegistry, isMergerFor, setRanking, setRegistry
Set<Diff> getResultingMerges(Diff diff, boolean mergeLeftToRight, Set<Diff> knownImplications)
diff
when merging in the given
direction.
This is expected to return the set of all differences that will be merged along when a user wishes to
merge diff
, either because they are related or because they are equivalent one way or
another.
Note that as far as the merged is concerned a given diff is considered to be implying itself.
diff
will thus be included in the returned set.
diff
- The difference for which we seek all related ones.mergeLeftToRight
- The direction in which we're considering a merge.knownImplications
- The set of Diffs already known as being implied by our starting point. Since there may be
implication cycles, this can be used to break free. Callees are not supposed to add the new
implications they find within this set.diff
when merging in the given
direction.Set<Diff> getResultingRejections(Diff diff, boolean mergeLeftToRight, Set<Diff> knownRejections)
diff
is merged, either
because of unresolveable conflicts or because of unreachable requirements.diff
- The difference for which we seek all opposite ones.mergeLeftToRight
- The direction in which we're considering a merge.knownRejections
- The set of Diffs already known as being rejected by our starting point. Since there may be
rejection cycles, this can be used to break free. Callees are not supposed to add the new
rejections they find within this set.diff
is merged in the
given direction.
Copyright (c) 2006, 2014 Obeo and others. All rights reserved.