public class ComputeDiffsToMerge extends Object
| Constructor and Description |
|---|
ComputeDiffsToMerge(boolean rightToLeft,
IDiffRelationshipComputer relationshipComputer)
Constructor if there is no merge mode for this action.
|
ComputeDiffsToMerge(MergeMode mergeMode,
boolean isLeftEditable,
boolean isRightEditable,
IDiffRelationshipComputer relationshipComputer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDiff(Diff diff)
Compute the ordered set of diffs for the given diff.
|
protected void |
addDiff(Diff diff,
Set<Diff> consequences,
Set<Diff> diffPath)
Recursively add the required diffs, then the diff itself, to the result.
|
protected void |
addDiffs(Collection<Diff> diffs,
Set<Diff> diffPath)
Recursively add the given diffs to the result Set, starting by their requirements, then themselves,
then their consequences, in the right order.
|
ComputeDiffsToMerge |
failOnRealConflictUnless(com.google.common.base.Predicate<? super Conflict> predicate)
Set the failOnConflict flag.
|
Set<Diff> |
getAllDiffsToMerge(Diff diff)
Compute the ordered set of diffs to merge for the given diff.
|
Set<Diff> |
getAllDiffsToMerge(Iterable<? extends Diff> diffs)
Compute the ordered set of diffs to merge for the given diffs.
|
public ComputeDiffsToMerge(MergeMode mergeMode, boolean isLeftEditable, boolean isRightEditable, IDiffRelationshipComputer relationshipComputer)
mergeMode - The kind of merging we're about to implement.isLeftEditable - Whether the left side of the comparison we're operating on is editable.isRightEditable - Whether the right side of the comparison we're operating on is editable.relationshipComputer - The relationship computer used to calculate dependencies and requirements of diffs.public ComputeDiffsToMerge(boolean rightToLeft,
IDiffRelationshipComputer relationshipComputer)
rightToLeft - Direction of the merge.relationshipComputer - The relationship computer used to calculate dependencies and requirements of diffs.public ComputeDiffsToMerge failOnRealConflictUnless(com.google.common.base.Predicate<? super Conflict> predicate)
predicate - Predicate that will be used to check whether an exception must be thrown when encountering a
diff that's involved in a conflict. This predicate will be applied to the conflict, and if
it returns false then an exception will be thrown.public Set<Diff> getAllDiffsToMerge(Iterable<? extends Diff> diffs)
diffs - The diffs to merge, along with its required diffs and its consequent diffs.public Set<Diff> getAllDiffsToMerge(Diff diff)
diff - The diff to merge, along with its required diffs and its consequent diffs.protected void addDiff(Diff diff)
diff - The diff to mergeprotected void addDiffs(Collection<Diff> diffs, Set<Diff> diffPath)
diffs - The diffs to merge at the current step of the computationdiffPath - The path that lead to a diffprotected void addDiff(Diff diff, Set<Diff> consequences, Set<Diff> diffPath)
diff - The diff to addconsequences - The set of diffs that must be merged at the next step.diffPath - The path that lead to the diff to add
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.