public class ComputeDiffsToMerge extends Object
Constructor and Description |
---|
ComputeDiffsToMerge(boolean rightToLeft,
IDiffRelationshipComputer relationshipComputer)
Constructor.
|
ComputeDiffsToMerge(boolean rightToLeft,
IMerger.Registry2 registry)
Constructor.
|
ComputeDiffsToMerge(boolean rightToLeft,
IMerger.Registry2 registry,
IMergeCriterion criterion)
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(boolean rightToLeft, IMerger.Registry2 registry)
rightToLeft
- The merge directionregistry
- The Registry to use.public ComputeDiffsToMerge(boolean rightToLeft, IMerger.Registry2 registry, IMergeCriterion criterion)
rightToLeft
- The merge directionregistry
- The Registry to use.criterion
- The merge criterion, must not be null
public ComputeDiffsToMerge(boolean rightToLeft, IDiffRelationshipComputer relationshipComputer)
rightToLeft
- The merge directionrelationshipComputer
- 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.