Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2015-05-29 10:01:46 +0000
committerAxel Richard2015-06-09 13:29:07 +0000
commit1991ca751a80fafe2027e730dd0300c9bd0279e1 (patch)
tree3ffeff14282e74850dced9f7278465b4e53b53e2 /plugins
parent4cc60a9edaae3e2876d1cfe907bb5dd96b2e4365 (diff)
downloadorg.eclipse.emf.compare-1991ca751a80fafe2027e730dd0300c9bd0279e1.tar.gz
org.eclipse.emf.compare-1991ca751a80fafe2027e730dd0300c9bd0279e1.tar.xz
org.eclipse.emf.compare-1991ca751a80fafe2027e730dd0300c9bd0279e1.zip
[468740] Fix By Side Group Provider: Left Side Group contains conflicts
Refined diffs must also satisfy the predicate applied to the group they belong to. Bug: 468740 Change-Id: If652d093ff88f3f9c899f53eaf2a27f60a772d0f Signed-off-by: Axel Richard <axel.richard@obeo.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
index 702540565..b7af47ac8 100644
--- a/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
+++ b/plugins/org.eclipse.emf.compare.rcp.ui/src/org/eclipse/emf/compare/rcp/ui/internal/structuremergeviewer/groups/impl/BasicDifferenceGroupImpl.java
@@ -348,9 +348,9 @@ public class BasicDifferenceGroupImpl extends AdapterImpl implements IDifference
node.getChildren().addAll(buildSubTree(matchOfValue, true, DIFF_TO_SIDE.apply(diff)));
}
if (containment) {
- ret.addAll(manageRefines(diff));
+ ret.addAll(manageRefines(diff, side));
} else {
- nodeChildren.addAll(manageRefines(diff));
+ nodeChildren.addAll(manageRefines(diff, side));
}
} else if (!(diff instanceof ResourceAttachmentChange)) {
if (diff.getPrimeRefining() != null && extensionDiffProcessed.contains(diff)) {
@@ -428,14 +428,16 @@ public class BasicDifferenceGroupImpl extends AdapterImpl implements IDifference
*
* @param diff
* the given Diff.
+ * @param side
+ * the accepted side(s) for children of current level.
* @return the sub tree of refines diffs.
*/
- private List<TreeNode> manageRefines(Diff diff) {
+ private List<TreeNode> manageRefines(Diff diff, ChildrenSide side) {
final List<TreeNode> ret = Lists.newArrayList();
final EList<Diff> refines = diff.getRefines();
for (Diff refine : refines) {
Diff mainDiff = refine.getPrimeRefining();
- if (mainDiff != null && mainDiff == diff) {
+ if (mainDiff != null && mainDiff == diff && and(filter, compatibleSide(side)).apply(refine)) {
TreeNode refineSubTree = buildSubTree(refine);
ret.add(refineSubTree);
extensionDiffProcessed.add(refine);

Back to the top