Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikaël Barbero2013-02-04 04:29:11 -0500
committerMikaël Barbero2013-02-04 04:31:55 -0500
commit392557cd309635725c358dffd4f90958b05bb75b (patch)
tree6c86c393c515b02ff7ac12fb92364f841cca4089
parent5f892cb4b3e1d21b16360f751f47bab98ce3e745 (diff)
downloadorg.eclipse.emf.compare-392557cd309635725c358dffd4f90958b05bb75b.tar.gz
org.eclipse.emf.compare-392557cd309635725c358dffd4f90958b05bb75b.tar.xz
org.eclipse.emf.compare-392557cd309635725c358dffd4f90958b05bb75b.zip
fix regression in UML 2 tests.
Comparison#getDifferences() should also return differences get on the given element and not only those from its match because sometimes it is not matched.
-rw-r--r--plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
index 3b4bdeb6a..8fe9485bd 100644
--- a/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
+++ b/plugins/org.eclipse.emf.compare/src/org/eclipse/emf/compare/internal/spec/ComparisonSpec.java
@@ -86,6 +86,7 @@ public class ComparisonSpec extends ComparisonImpl {
eAdapters().add(diffCrossReferencer);
}
+ Iterable<Diff> diffOnElement = filter(getInverse(element, diffCrossReferencer), Diff.class);
final Match match = getMatch(element);
if (match != null) {
Iterable<Diff> left = ImmutableList.of();
@@ -100,10 +101,11 @@ public class ComparisonSpec extends ComparisonImpl {
if (match.getOrigin() != null) {
origin = filter(getInverse(match.getOrigin(), diffCrossReferencer), Diff.class);
}
- Set<Diff> crossRefs = ImmutableSet.copyOf(Iterables.concat(left, right, origin));
+ Set<Diff> crossRefs = ImmutableSet.copyOf(Iterables.concat(diffOnElement, left, right, origin));
return new BasicEList<Diff>(crossRefs);
+ } else {
+ return new BasicEList<Diff>(ImmutableSet.copyOf(diffOnElement));
}
- return new BasicEList<Diff>();
}
/**

Back to the top