Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2014-02-17 05:34:24 -0500
committerAxel Richard2014-02-17 05:49:25 -0500
commit5f8f9ebf62e0b88208e2de510bc7f8edfaac0966 (patch)
tree811f1d5db8b2ea6100692b37ad2bf9d14fa9e975 /plugins/org.eclipse.emf.compare.uml2.tests
parentb77be69bacff7eae5932744e4db195a62d382517 (diff)
downloadorg.eclipse.emf.compare-5f8f9ebf62e0b88208e2de510bc7f8edfaac0966.tar.gz
org.eclipse.emf.compare-5f8f9ebf62e0b88208e2de510bc7f8edfaac0966.tar.xz
org.eclipse.emf.compare-5f8f9ebf62e0b88208e2de510bc7f8edfaac0966.zip
[418163] Manage display and merge of UML Stereotype Properties
Manage display and merge of Stereotype Attribute & Reference changes Bug: 418163 Change-Id: I52fa6a0fb1f2c5566a8a16f57c0ac280a0701601
Diffstat (limited to 'plugins/org.eclipse.emf.compare.uml2.tests')
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java41
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java86
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java47
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java12
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/ancestor.uml18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/left.uml18
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/right.uml18
7 files changed, 205 insertions, 35 deletions
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
index 8a1a8d35e..17d9a53ca 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/AbstractUMLTest.java
@@ -10,6 +10,8 @@
*/
package org.eclipse.emf.compare.uml2.tests;
+import static com.google.common.collect.Iterators.all;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.hasConflict;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +30,7 @@ import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.compare.AttributeChange;
import org.eclipse.emf.compare.ComparePackage;
import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.ConflictKind;
import org.eclipse.emf.compare.Diff;
import org.eclipse.emf.compare.EMFCompare;
import org.eclipse.emf.compare.EMFCompare.Builder;
@@ -201,25 +204,45 @@ public abstract class AbstractUMLTest {
protected abstract AbstractUMLInputData getInput();
protected void testMergeLeftToRight(Notifier left, Notifier right, Notifier origin) {
+ testMergeLeftToRight(left, right, origin, false);
+ }
+
+ protected void testMergeRightToLeft(Notifier left, Notifier right, Notifier origin) {
+ testMergeRightToLeft(left, right, origin, false);
+ }
+
+ protected void testMergeLeftToRight(Notifier left, Notifier right, Notifier origin, boolean pseudoAllowed) {
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
final Comparison comparisonBefore = getCompare().compare(scope);
- EList<Diff> differences = comparisonBefore.getDifferences();
+ EList<Diff> differencesBefore = comparisonBefore.getDifferences();
final IBatchMerger merger = new BatchMerger(mergerRegistry);
- merger.copyAllLeftToRight(differences, new BasicMonitor());
+ merger.copyAllLeftToRight(differencesBefore, new BasicMonitor());
final Comparison comparisonAfter = getCompare().compare(scope);
- assertTrue("Comparison#getDifferences() must be empty after copyAllLeftToRight", comparisonAfter
- .getDifferences().isEmpty());
+ EList<Diff> differencesAfter = comparisonAfter.getDifferences();
+ final boolean diffs;
+ if (pseudoAllowed) {
+ diffs = all(differencesAfter.iterator(), hasConflict(ConflictKind.PSEUDO));
+ } else {
+ diffs = differencesAfter.isEmpty();
+ }
+ assertTrue("Comparison#getDifferences() must be empty after copyAllLeftToRight", diffs);
}
- protected void testMergeRightToLeft(Notifier left, Notifier right, Notifier origin) {
+ protected void testMergeRightToLeft(Notifier left, Notifier right, Notifier origin, boolean pseudoAllowed) {
final IComparisonScope scope = new DefaultComparisonScope(left, right, origin);
final Comparison comparisonBefore = getCompare().compare(scope);
- EList<Diff> differences = comparisonBefore.getDifferences();
+ EList<Diff> differencesBefore = comparisonBefore.getDifferences();
final IBatchMerger merger = new BatchMerger(mergerRegistry);
- merger.copyAllRightToLeft(differences, new BasicMonitor());
+ merger.copyAllRightToLeft(differencesBefore, new BasicMonitor());
final Comparison comparisonAfter = getCompare().compare(scope);
- assertTrue("Comparison#getDifferences() must be empty after copyAllRightToLeft", comparisonAfter
- .getDifferences().isEmpty());
+ EList<Diff> differencesAfter = comparisonAfter.getDifferences();
+ final boolean diffs;
+ if (pseudoAllowed) {
+ diffs = all(differencesAfter.iterator(), hasConflict(ConflictKind.PSEUDO));
+ } else {
+ diffs = differencesAfter.isEmpty();
+ }
+ assertTrue("Comparison#getDifferences() must be empty after copyAllRightToLeft", diffs);
}
protected void testIntersections(Comparison comparison) {
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
index df9b0639a..68eeb6a68 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/DynamicStereotypeTest.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.uml2.tests.stereotypes;
import static com.google.common.base.Predicates.and;
@@ -14,6 +24,7 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatche
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
+import com.google.common.collect.UnmodifiableIterator;
import java.io.IOException;
import java.util.List;
@@ -26,6 +37,8 @@ import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.ResourceAttachmentChange;
import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeAttributeChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeReferenceChange;
import org.eclipse.emf.compare.uml2.tests.AbstractDynamicProfileTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.stereotypes.data.dynamic.DynamicStereotypeInputData;
@@ -519,6 +532,19 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
testMergeLeftToRight(left, right, left);
}
+ @Test
+ public void testA110UseCase3way() throws IOException {
+ final Resource left = input.getA11Left();
+ final Resource right = input.getA11Right();
+ final Resource ancestor = input.getA11Ancestor();
+
+ final Comparison comparison = compare(left, right, ancestor);
+ testAB11(comparison);
+
+ testMergeRightToLeft(left, right, ancestor, true);
+ testMergeLeftToRight(left, right, ancestor, true);
+ }
+
private void testAB1(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
@@ -864,8 +890,8 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
private void testAB5(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 3 differences
- assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
Predicate<? super Diff> changeAttributeDescription1 = null;
Predicate<? super Diff> changeAttributeDescription2 = null;
@@ -877,15 +903,23 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
final Diff changeAttribute1 = Iterators.find(differences.iterator(), changeAttributeDescription1);
final Diff changeAttribute2 = Iterators.find(differences.iterator(), changeAttributeDescription2);
- final Diff changeUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
- instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.CHANGE)));
+ final UnmodifiableIterator<Diff> changeUMLStereotypeProperties = Iterators.filter(differences
+ .iterator(), and(instanceOf(StereotypeAttributeChange.class), ofKind(DifferenceKind.CHANGE)));
+
+ assertTrue(changeUMLStereotypeProperties.hasNext());
+ final Diff changeUMLStereotypeProperty1 = changeUMLStereotypeProperties.next();
+ assertTrue(changeUMLStereotypeProperties.hasNext());
+ final Diff changeUMLStereotypeProperty2 = changeUMLStereotypeProperties.next();
+
assertNotNull(changeAttribute1);
assertNotNull(changeAttribute2);
- assertNotNull(changeUMLStereotypeApplication);
+ assertNotNull(changeUMLStereotypeProperty1);
+ assertNotNull(changeUMLStereotypeProperty2);
- assertSame(Integer.valueOf(2), Integer.valueOf(changeUMLStereotypeApplication.getRefinedBy().size()));
- assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute1));
- assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute2));
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty1.getRefinedBy().size()));
+ assertTrue(changeUMLStereotypeProperty1.getRefinedBy().contains(changeAttribute1));
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty2.getRefinedBy().size()));
+ assertTrue(changeUMLStereotypeProperty2.getRefinedBy().contains(changeAttribute2));
testIntersections(comparison);
@@ -907,7 +941,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
addStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
ofKind(DifferenceKind.DELETE), onFeature("manyValuedReference"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff addStereotypeRef = Iterators.find(differences.iterator(), addStereotypeRefDescription);
@@ -935,7 +969,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
moveStereotypeRefDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
onFeature("manyValuedReference"));
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff moveStereotypeRef = Iterators.find(differences.iterator(), moveStereotypeRefDescription);
@@ -970,7 +1004,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"),
valueNameMatches("class1"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
@@ -999,7 +1033,7 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
changeStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"), valueNameMatches("class0"));
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
@@ -1033,7 +1067,33 @@ public class DynamicStereotypeTest extends AbstractDynamicProfileTest {
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedAttribute"), valueIs("oldValue"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeAttributeChange.class),
+ ofKind(DifferenceKind.CHANGE));
+
+ final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
+ changeStereotypeRefDescription);
+ final Diff changeUMLStereotype = Iterators.find(differences.iterator(),
+ changeUMLStereotypeDescription);
+
+ assertNotNull(changeStereotypeRef);
+ assertNotNull(changeUMLStereotype);
+
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotype.getRefinedBy().size()));
+ assertTrue(changeUMLStereotype.getRefinedBy().contains(changeStereotypeRef));
+
+ testIntersections(comparison);
+ }
+
+ private void testAB11(final Comparison comparison) {
+ final List<Diff> differences = comparison.getDifferences();
+ // We should have no less and no more than 2 differences
+ assertSame(Integer.valueOf(2), Integer.valueOf(differences.size()));
+
+ Predicate<? super Diff> changeStereotypeRefDescription = null;
+ Predicate<? super Diff> changeUMLStereotypeDescription = null;
+
+ changeStereotypeRefDescription = and(instanceOf(AttributeChange.class), ofKind(DifferenceKind.CHANGE));
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeAttributeChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
index a1283fa4e..dad4413a1 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/StaticStereotypeTest.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
package org.eclipse.emf.compare.uml2.tests.stereotypes;
import static com.google.common.base.Predicates.and;
@@ -14,6 +24,7 @@ import static org.eclipse.emf.compare.utils.EMFComparePredicates.valueNameMatche
import com.google.common.base.Predicate;
import com.google.common.collect.Iterators;
+import com.google.common.collect.UnmodifiableIterator;
import java.io.IOException;
import java.util.List;
@@ -26,6 +37,8 @@ import org.eclipse.emf.compare.ReferenceChange;
import org.eclipse.emf.compare.ResourceAttachmentChange;
import org.eclipse.emf.compare.uml2.internal.ProfileApplicationChange;
import org.eclipse.emf.compare.uml2.internal.StereotypeApplicationChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeAttributeChange;
+import org.eclipse.emf.compare.uml2.internal.StereotypeReferenceChange;
import org.eclipse.emf.compare.uml2.tests.AbstractStaticProfileTest;
import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
import org.eclipse.emf.compare.uml2.tests.stereotypes.data.static_.StaticStereotypeInputData;
@@ -1021,8 +1034,8 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
private void testAB5(TestKind kind, final Comparison comparison) {
final List<Diff> differences = comparison.getDifferences();
- // We should have no less and no more than 3 differences
- assertSame(Integer.valueOf(3), Integer.valueOf(differences.size()));
+ // We should have no less and no more than 4 differences
+ assertSame(Integer.valueOf(4), Integer.valueOf(differences.size()));
Predicate<? super Diff> changeAttributeDescription1 = null;
Predicate<? super Diff> changeAttributeDescription2 = null;
@@ -1034,15 +1047,23 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
final Diff changeAttribute1 = Iterators.find(differences.iterator(), changeAttributeDescription1);
final Diff changeAttribute2 = Iterators.find(differences.iterator(), changeAttributeDescription2);
- final Diff changeUMLStereotypeApplication = Iterators.find(differences.iterator(), and(
- instanceOf(StereotypeApplicationChange.class), ofKind(DifferenceKind.CHANGE)));
+ final UnmodifiableIterator<Diff> changeUMLStereotypeProperties = Iterators.filter(differences
+ .iterator(), and(instanceOf(StereotypeAttributeChange.class), ofKind(DifferenceKind.CHANGE)));
+
+ assertTrue(changeUMLStereotypeProperties.hasNext());
+ final Diff changeUMLStereotypeProperty1 = changeUMLStereotypeProperties.next();
+ assertTrue(changeUMLStereotypeProperties.hasNext());
+ final Diff changeUMLStereotypeProperty2 = changeUMLStereotypeProperties.next();
+
assertNotNull(changeAttribute1);
assertNotNull(changeAttribute2);
- assertNotNull(changeUMLStereotypeApplication);
+ assertNotNull(changeUMLStereotypeProperty1);
+ assertNotNull(changeUMLStereotypeProperty2);
- assertSame(Integer.valueOf(2), Integer.valueOf(changeUMLStereotypeApplication.getRefinedBy().size()));
- assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute1));
- assertTrue(changeUMLStereotypeApplication.getRefinedBy().contains(changeAttribute2));
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty1.getRefinedBy().size()));
+ assertTrue(changeUMLStereotypeProperty1.getRefinedBy().contains(changeAttribute1));
+ assertSame(Integer.valueOf(1), Integer.valueOf(changeUMLStereotypeProperty2.getRefinedBy().size()));
+ assertTrue(changeUMLStereotypeProperty2.getRefinedBy().contains(changeAttribute2));
testIntersections(comparison);
@@ -1064,7 +1085,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
addStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
ofKind(DifferenceKind.DELETE), onFeature("manyValuedReference"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff addStereotypeRef = Iterators.find(differences.iterator(), addStereotypeRefDescription);
@@ -1091,7 +1112,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
moveStereotypeRefDescription = and(instanceOf(ReferenceChange.class), ofKind(DifferenceKind.MOVE),
onFeature("manyValuedReference"));
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff moveStereotypeRef = Iterators.find(differences.iterator(), moveStereotypeRefDescription);
@@ -1125,7 +1146,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"),
valueNameMatches("class1"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
@@ -1154,7 +1175,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
changeStereotypeRefDescription = and(instanceOf(ReferenceChange.class),
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedReference"), valueNameMatches("class0"));
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeReferenceChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
@@ -1188,7 +1209,7 @@ public class StaticStereotypeTest extends AbstractStaticProfileTest {
ofKind(DifferenceKind.CHANGE), onFeature("singleValuedAttribute"), valueIs("oldValue"));
}
- changeUMLStereotypeDescription = and(instanceOf(StereotypeApplicationChange.class),
+ changeUMLStereotypeDescription = and(instanceOf(StereotypeAttributeChange.class),
ofKind(DifferenceKind.CHANGE));
final Diff changeStereotypeRef = Iterators.find(differences.iterator(),
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
index 6c616f5c1..0e1a3f909 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/DynamicStereotypeInputData.java
@@ -87,4 +87,16 @@ public class DynamicStereotypeInputData extends AbstractUMLInputData {
return loadFromClassLoader("a10/right.uml"); //$NON-NLS-1$
}
+ public Resource getA11Left() throws IOException {
+ return loadFromClassLoader("a11/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA11Right() throws IOException {
+ return loadFromClassLoader("a11/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA11Ancestor() throws IOException {
+ return loadFromClassLoader("a11/ancestor.uml"); //$NON-NLS-1$
+ }
+
}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/ancestor.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/ancestor.uml
new file mode 100644
index 000000000..3a2ea9cfb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/ancestor.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_lWjJoEt7EeOhavcmtA3PkA" name="anotherClass">
+ <ownedAttribute xmi:id="_LLxCUEt8EeOhavcmtA3PkA"/>
+ </packagedElement>
+ <profileApplication xmi:id="_GzuskHxtEeCJOrA24Ue2iw">
+ <eAnnotations xmi:id="_Gzxv4HxtEeCJOrA24Ue2iw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <Ecore:EAttribute xmi:id="_M56mMEt8EeOhavcmtA3PkA" base_Property="_LLxCUEt8EeOhavcmtA3PkA" attributeName="att1"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/left.uml
new file mode 100644
index 000000000..3a2ea9cfb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/left.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_lWjJoEt7EeOhavcmtA3PkA" name="anotherClass">
+ <ownedAttribute xmi:id="_LLxCUEt8EeOhavcmtA3PkA"/>
+ </packagedElement>
+ <profileApplication xmi:id="_GzuskHxtEeCJOrA24Ue2iw">
+ <eAnnotations xmi:id="_Gzxv4HxtEeCJOrA24Ue2iw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <Ecore:EAttribute xmi:id="_M56mMEt8EeOhavcmtA3PkA" base_Property="_LLxCUEt8EeOhavcmtA3PkA" attributeName="att1"/>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/right.uml
new file mode 100644
index 000000000..2b0c44e45
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/stereotypes/data/dynamic/a11/right.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Model xmi:id="_94mkoHxsEeCJOrA24Ue2iw" name="aModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_BYEVIHxtEeCJOrA24Ue2iw" name="aPack">
+ <packagedElement xmi:type="uml:Class" xmi:id="_C4IZsHxtEeCJOrA24Ue2iw" name="aClass"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_lWjJoEt7EeOhavcmtA3PkA" name="anotherClass">
+ <ownedAttribute xmi:id="_LLxCUEt8EeOhavcmtA3PkA"/>
+ </packagedElement>
+ <profileApplication xmi:id="_GzuskHxtEeCJOrA24Ue2iw">
+ <eAnnotations xmi:id="_Gzxv4HxtEeCJOrA24Ue2iw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ </uml:Model>
+ <Ecore:EAttribute xmi:id="_M56mMEt8EeOhavcmtA3PkA" visibility="ReadWrite" base_Property="_LLxCUEt8EeOhavcmtA3PkA" attributeName="att1"/>
+</xmi:XMI>

Back to the top