Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2014-11-13 11:00:50 -0500
committerAxel RICHARD2014-12-07 10:17:23 -0500
commit01ae0763a8e0156dabc6bcdd1bcef170f1782099 (patch)
tree2f6a268534f4f781b88b300ba9d8d0035112b570 /plugins/org.eclipse.emf.compare.uml2.tests
parent4ae5ea7b3b5c828d6a88421fd396ad042a01967f (diff)
downloadorg.eclipse.emf.compare-01ae0763a8e0156dabc6bcdd1bcef170f1782099.tar.gz
org.eclipse.emf.compare-01ae0763a8e0156dabc6bcdd1bcef170f1782099.tar.xz
org.eclipse.emf.compare-01ae0763a8e0156dabc6bcdd1bcef170f1782099.zip
[451365] Adds specific handling of opaque action, behavior & expression
Opaque actions, behaviors, and expressions all have a multi-valued language and multi-valued body attribute. Their indices have to be kept in sync, because the language value at the index n denotes the language of the body value at the index n. Moreover, if concurrent changes to the same body value are applied, they should be merged using a line-based three-way merge algorithm. If they are not mergeable with such an algorithm, a specific conflict should be raised. This commit contributes support for the aforementioned requirements by introducing a new UML-specific change type, specific conflict detection, and a specific merger. Bug: 451365 Change-Id: I6bf5c786e72a10c56eff7f0faaedd67b77528b4b Signed-off-by: Philip Langer <planger@eclipsesource.com>
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.java9
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeDiffTest.java215
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java660
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/OpaqueInputData.java204
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/left.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/origin.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/left.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/right.uml22
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/left.uml10
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/origin.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/right.uml16
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/left.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/origin.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/right.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/left.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/origin.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/right.uml14
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/useCases82
-rw-r--r--plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java8
51 files changed, 1998 insertions, 2 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 f125fffa0..ef7edc245 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
@@ -47,8 +47,10 @@ import org.eclipse.emf.compare.scope.IComparisonScope;
import org.eclipse.emf.compare.tests.postprocess.data.TestPostProcessor;
import org.eclipse.emf.compare.uml2.internal.StereotypedElementChange;
import org.eclipse.emf.compare.uml2.internal.UMLDiff;
+import org.eclipse.emf.compare.uml2.internal.merge.OpaqueElementBodyChangeMerger;
import org.eclipse.emf.compare.uml2.internal.merge.UMLMerger;
import org.eclipse.emf.compare.uml2.internal.merge.UMLReferenceChangeMerger;
+import org.eclipse.emf.compare.uml2.internal.postprocessor.OpaqueElementBodyChangePostProcessor;
import org.eclipse.emf.compare.uml2.internal.postprocessor.UMLPostProcessor;
import org.eclipse.emf.compare.uml2.profile.test.uml2comparetestprofile.UML2CompareTestProfilePackage;
import org.eclipse.emf.compare.utils.ReferenceUtil;
@@ -113,10 +115,13 @@ public abstract class AbstractUMLTest {
mergerRegistry = IMerger.RegistryImpl.createStandaloneInstance();
final IMerger umlMerger = new UMLMerger();
final IMerger umlReferenceChangeMerger = new UMLReferenceChangeMerger();
+ final IMerger opaqueElementBodyChangeMerger = new OpaqueElementBodyChangeMerger();
umlMerger.setRanking(11);
umlReferenceChangeMerger.setRanking(25);
+ opaqueElementBodyChangeMerger.setRanking(25);
mergerRegistry.add(umlMerger);
mergerRegistry.add(umlReferenceChangeMerger);
+ mergerRegistry.add(opaqueElementBodyChangeMerger);
emfCompare = builder.build();
}
@@ -131,6 +136,10 @@ public abstract class AbstractUMLTest {
new TestPostProcessor.TestPostProcessorDescriptor(Pattern
.compile("http://www.eclipse.org/uml2/\\d\\.0\\.0/UML"), null,
new UMLPostProcessor(), 20));
+ postProcessorRegistry.put(OpaqueElementBodyChangePostProcessor.class.getName(),
+ new TestPostProcessor.TestPostProcessorDescriptor(Pattern
+ .compile("http://www.eclipse.org/uml2/\\d\\.0\\.0/UML"), null,
+ new OpaqueElementBodyChangePostProcessor(), 25));
}
@After
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeDiffTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeDiffTest.java
new file mode 100644
index 000000000..b27fdf260
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeDiffTest.java
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2014 EclipseSource Muenchen GmbH and others.
+ * 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:
+ * Philip Langer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.opaque;
+
+import static com.google.common.base.Predicates.and;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.size;
+import static org.eclipse.emf.compare.DifferenceKind.ADD;
+import static org.eclipse.emf.compare.DifferenceKind.CHANGE;
+import static org.eclipse.emf.compare.DifferenceKind.DELETE;
+import static org.eclipse.emf.compare.DifferenceKind.MOVE;
+import static org.eclipse.emf.compare.DifferenceSource.LEFT;
+import static org.eclipse.emf.compare.DifferenceSource.RIGHT;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.fromSide;
+import static org.eclipse.emf.compare.utils.EMFComparePredicates.ofKind;
+import static org.junit.Assert.assertEquals;
+
+import com.google.common.base.Predicate;
+
+import java.io.IOException;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceKind;
+import org.eclipse.emf.compare.DifferenceSource;
+import org.eclipse.emf.compare.uml2.internal.OpaqueElementBodyChange;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.opaque.data.OpaqueInputData;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.junit.Test;
+
+/**
+ * Tests the detection of {@link OpaqueElementBodyChange opaque element body changes}.
+ *
+ * @author Philip Langer <planger@eclipsesource.com>
+ */
+@SuppressWarnings("nls")
+public class OpaqueElementBodyChangeDiffTest extends AbstractUMLTest {
+
+ private static final Predicate<Diff> IS_OPAQUE_ELEMENT_CHANGE = new Predicate<Diff>() {
+ public boolean apply(Diff diff) {
+ return diff instanceof OpaqueElementBodyChange;
+ }
+ };
+
+ private static final String OPAQUE_ACTION1_ID = "_opaqueAction1";
+
+ private OpaqueInputData input = new OpaqueInputData();
+
+ @Test
+ public void testA1UseCaseLeft() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+
+ Comparison comparison = compare(left, origin, null);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> opaqueChanges = filter(diffs, IS_OPAQUE_ELEMENT_CHANGE);
+ assertEquals(1, size(opaqueChanges));
+
+ Diff firstDiff = opaqueChanges.iterator().next();
+ OpaqueElementBodyChange bodyChange = (OpaqueElementBodyChange)firstDiff;
+
+ assertEquals(DifferenceKind.CHANGE, bodyChange.getKind());
+ assertEquals(DifferenceSource.LEFT, bodyChange.getSource());
+ assertEquals(2, bodyChange.getRefinedBy().size());
+ assertEquals(1, size(filter(bodyChange.getRefinedBy(), ofKind(ADD))));
+ assertEquals(1, size(filter(bodyChange.getRefinedBy(), ofKind(DELETE))));
+ assertEquals(2, size(filter(bodyChange.getRefinedBy(), fromSide(LEFT))));
+ }
+
+ @Test
+ public void testA1UseCase() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> leftOpaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(LEFT)));
+ assertEquals(1, size(leftOpaqueChanges));
+
+ Diff firstLeftDiff = leftOpaqueChanges.iterator().next();
+ OpaqueElementBodyChange leftBodyChange = (OpaqueElementBodyChange)firstLeftDiff;
+
+ assertEquals(DifferenceKind.CHANGE, leftBodyChange.getKind());
+ assertEquals(DifferenceSource.LEFT, leftBodyChange.getSource());
+ assertEquals(2, leftBodyChange.getRefinedBy().size());
+ assertEquals(0, size(filter(leftBodyChange.getRefinedBy(), fromSide(RIGHT))));
+ assertEquals(2, size(filter(leftBodyChange.getRefinedBy(), fromSide(LEFT))));
+ assertEquals(1, size(filter(leftBodyChange.getRefinedBy(), ofKind(ADD))));
+ assertEquals(1, size(filter(leftBodyChange.getRefinedBy(), ofKind(DELETE))));
+
+ Iterable<Diff> rightOpaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(RIGHT)));
+ assertEquals(1, size(rightOpaqueChanges));
+
+ Diff firstRightDiff = rightOpaqueChanges.iterator().next();
+ OpaqueElementBodyChange rightBodyChange = (OpaqueElementBodyChange)firstRightDiff;
+
+ assertEquals(DifferenceKind.CHANGE, rightBodyChange.getKind());
+ assertEquals(DifferenceSource.RIGHT, rightBodyChange.getSource());
+ assertEquals(2, rightBodyChange.getRefinedBy().size());
+ assertEquals(2, size(filter(rightBodyChange.getRefinedBy(), fromSide(RIGHT))));
+ assertEquals(0, size(filter(rightBodyChange.getRefinedBy(), fromSide(LEFT))));
+ assertEquals(1, size(filter(rightBodyChange.getRefinedBy(), ofKind(ADD))));
+ assertEquals(1, size(filter(rightBodyChange.getRefinedBy(), ofKind(DELETE))));
+ }
+
+ @Test
+ public void testA5UseCaseLeft() throws IOException {
+ Resource origin = input.getA5Origin();
+ Resource left = input.getA5Left();
+
+ Comparison comparison = compare(left, origin, null);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> opaqueChanges = filter(diffs, IS_OPAQUE_ELEMENT_CHANGE);
+ assertEquals(1, size(opaqueChanges));
+
+ Diff firstDiff = opaqueChanges.iterator().next();
+ OpaqueElementBodyChange bodyChange = (OpaqueElementBodyChange)firstDiff;
+
+ assertEquals(DifferenceKind.ADD, bodyChange.getKind());
+ assertEquals(DifferenceSource.LEFT, bodyChange.getSource());
+ assertEquals(2, bodyChange.getRefinedBy().size());
+ assertEquals(2, size(filter(bodyChange.getRefinedBy(), ofKind(ADD))));
+ assertEquals(2, size(filter(bodyChange.getRefinedBy(), fromSide(LEFT))));
+ }
+
+ @Test
+ public void testA5UseCase() throws IOException {
+ Resource origin = input.getA5Origin();
+ Resource left = input.getA5Left();
+ Resource right = input.getA5Right();
+
+ Comparison comparison = compare(left, right, origin);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> leftOpaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(LEFT)));
+ assertEquals(1, size(leftOpaqueChanges));
+
+ Diff firstLeftDiff = leftOpaqueChanges.iterator().next();
+ OpaqueElementBodyChange leftBodyChange = (OpaqueElementBodyChange)firstLeftDiff;
+
+ assertEquals(DifferenceKind.ADD, leftBodyChange.getKind());
+ assertEquals(DifferenceSource.LEFT, leftBodyChange.getSource());
+ assertEquals(2, leftBodyChange.getRefinedBy().size());
+ assertEquals(0, size(filter(leftBodyChange.getRefinedBy(), fromSide(RIGHT))));
+ assertEquals(2, size(filter(leftBodyChange.getRefinedBy(), fromSide(LEFT))));
+ assertEquals(2, size(filter(leftBodyChange.getRefinedBy(), ofKind(ADD))));
+
+ Iterable<Diff> rightOpaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(RIGHT)));
+ assertEquals(1, size(rightOpaqueChanges));
+
+ Diff firstRightDiff = rightOpaqueChanges.iterator().next();
+ OpaqueElementBodyChange rightBodyChange = (OpaqueElementBodyChange)firstRightDiff;
+
+ assertEquals(DifferenceKind.ADD, rightBodyChange.getKind());
+ assertEquals(DifferenceSource.RIGHT, rightBodyChange.getSource());
+ assertEquals(2, rightBodyChange.getRefinedBy().size());
+ assertEquals(2, size(filter(rightBodyChange.getRefinedBy(), fromSide(RIGHT))));
+ assertEquals(0, size(filter(rightBodyChange.getRefinedBy(), fromSide(LEFT))));
+ assertEquals(2, size(filter(rightBodyChange.getRefinedBy(), ofKind(ADD))));
+ }
+
+ @Test
+ public void testA7UseCaseRight_MoveAndChange() throws IOException {
+ Resource origin = input.getA7Origin();
+ Resource right = input.getA7Right();
+
+ Comparison comparison = compare(right, origin, null);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> opaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(LEFT)));
+ assertEquals(2, size(opaqueChanges));
+ assertEquals(1, size(filter(opaqueChanges, ofKind(MOVE))));
+ assertEquals(1, size(filter(opaqueChanges, ofKind(CHANGE))));
+ }
+
+ @Test
+ public void testA7UseCaseRight_Move() throws IOException {
+ Resource origin = input.getA7Origin();
+ Resource right = input.getA7Right();
+
+ // Make sure JAVA body is unchanged
+ OpaqueAction rightAction = (OpaqueAction)right.getEObject(OPAQUE_ACTION1_ID);
+ OpaqueAction originAction = (OpaqueAction)origin.getEObject(OPAQUE_ACTION1_ID);
+ String bodyJava = originAction.getBodies().get(0);
+ rightAction.getBodies().set(1, bodyJava);
+
+ Comparison comparison = compare(right, origin, null);
+ EList<Diff> diffs = comparison.getDifferences();
+ Iterable<Diff> opaqueChanges = filter(diffs, and(IS_OPAQUE_ELEMENT_CHANGE, fromSide(LEFT)));
+ assertEquals(1, size(opaqueChanges));
+ assertEquals(1, size(filter(opaqueChanges, ofKind(MOVE))));
+
+ Diff opaqueChangeDiff = opaqueChanges.iterator().next();
+ OpaqueElementBodyChange opaqueChange = (OpaqueElementBodyChange)opaqueChangeDiff;
+ assertEquals(2, opaqueChange.getRefinedBy().size());
+ assertEquals(2, size(filter(opaqueChange.getRefinedBy(), ofKind(MOVE))));
+ }
+
+ @Override
+ protected AbstractUMLInputData getInput() {
+ return input;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
new file mode 100644
index 000000000..3f86f6fc7
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
@@ -0,0 +1,660 @@
+/*******************************************************************************
+ * Copyright (c) 2014 EclipseSource Muenchen GmbH and others.
+ * 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:
+ * Philip Langer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.opaque;
+
+import static com.google.common.base.Predicates.and;
+import static com.google.common.collect.Iterables.filter;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.google.common.base.Predicate;
+
+import java.io.IOException;
+
+import org.eclipse.emf.common.util.BasicMonitor;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.compare.Comparison;
+import org.eclipse.emf.compare.Conflict;
+import org.eclipse.emf.compare.ConflictKind;
+import org.eclipse.emf.compare.Diff;
+import org.eclipse.emf.compare.DifferenceSource;
+import org.eclipse.emf.compare.merge.IMerger;
+import org.eclipse.emf.compare.uml2.internal.OpaqueElementBodyChange;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLTest;
+import org.eclipse.emf.compare.uml2.tests.opaque.data.OpaqueInputData;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.OpaqueAction;
+import org.eclipse.uml2.uml.OpaqueBehavior;
+import org.eclipse.uml2.uml.OpaqueExpression;
+import org.junit.Test;
+
+/**
+ * Tests merging of the body attribute of {@link OpaqueBehavior opaque behaviors}, {@link OpaqueAction opaque
+ * actions}, and {@link OpaqueExpression opaque expressions} containing multi-line contents also with respect
+ * to their respective language attribute.
+ *
+ * @author Philip Langer <planger@eclipsesource.com>
+ */
+@SuppressWarnings("nls")
+public class OpaqueElementBodyChangeMergeTest extends AbstractUMLTest {
+
+ private static final String NL = "\r\n";
+
+ private static final String OPAQUE_ACTION1_ID = "_opaqueAction1";
+
+ private static final String OPAQUE_BEHAVIOR1_ID = "_opaqueBehavior1";
+
+ private static final String OPAQUE_EXPRESSION1_ID = "_opaqueExpression1";
+
+ private static final String OCL = "OCL";
+
+ private static final String JAVA = "JAVA";
+
+ private static final String EXPECTED_MERGE = "This is a" + NL //
+ + "test with multi-line (changed)" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes (changed)" + NL //
+ + "of them.";
+
+ private static final String EXPECTED_MERGE_JAVA = "This is a JAVA" + NL//
+ + "test with multi-line" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes (changed)" + NL //
+ + "of them.";
+
+ private static final String EXPECTED_MERGE_OCL = "This is an OCL" + NL//
+ + "test with multi-line (changed)" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes (changed)" + NL //
+ + "of them.";
+
+ private static final String EXPECTED_JAVA = "This is a JAVA" + NL//
+ + "test with multi-line" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes" + NL //
+ + "of them.";
+
+ private static final String EXPECTED_OCL = "This is an OCL" + NL//
+ + "test with multi-line" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes" + NL //
+ + "of them.";
+
+ private static final String EXPECTED_C = "This is a C" + NL//
+ + "test with multi-line" + NL //
+ + "String attribute" + NL //
+ + "and concurrent changes" + NL //
+ + "of them.";
+
+ private static final Predicate<Diff> IS_OPAQUE_ELEMENT_CHANGE = new Predicate<Diff>() {
+ public boolean apply(Diff diff) {
+ return diff instanceof OpaqueElementBodyChange;
+ }
+ };
+
+ private static final Predicate<Diff> IS_RIGHT_SOURCE = new Predicate<Diff>() {
+ public boolean apply(Diff diff) {
+ return DifferenceSource.RIGHT.equals(diff.getSource());
+ }
+ };
+
+ private static final Predicate<Diff> IS_LEFT_SOURCE = new Predicate<Diff>() {
+ public boolean apply(Diff diff) {
+ return DifferenceSource.LEFT.equals(diff.getSource());
+ }
+ };
+
+ private OpaqueInputData input = new OpaqueInputData();
+
+ @Test
+ public void testA1UseCaseRtoL() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertA1UseCaseMergeResult(left.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ @Test
+ public void testA1UseCaseLtoR() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertA1UseCaseMergeResult(right.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ private void assertA1UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueAction);
+
+ OpaqueAction action = (OpaqueAction)eObject;
+ assertEquals(1, action.getLanguages().size());
+ assertEquals(1, action.getBodies().size());
+
+ assertEquals(JAVA, action.getLanguages().get(0));
+ assertEquals(EXPECTED_MERGE, action.getBodies().get(0));
+ }
+
+ @Test
+ public void testA1UseCase_RevertChangeLeftTwoWay() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+
+ OpaqueAction originAction = (OpaqueAction)origin.getEObject(OPAQUE_ACTION1_ID);
+ String originBody = originAction.getBodies().get(0);
+
+ Comparison comparison = compare(left, origin, null);
+ revertLeftOpaqueElementBodyChanges(comparison);
+ assertOneBodyWithContents(left, originBody);
+ }
+
+ @Test
+ public void testA1UseCase_RevertChangeRightThreeWay() throws IOException {
+ Resource origin = input.getA1Origin();
+ Resource left = input.getA1Left();
+ Resource right = input.getA1Right();
+
+ OpaqueAction originAction = (OpaqueAction)origin.getEObject(OPAQUE_ACTION1_ID);
+ String originBody = originAction.getBodies().get(0);
+
+ Comparison comparison = compare(left, right, origin);
+ revertRightOpaqueElementBodyChanges(comparison);
+ assertOneBodyWithContents(right, originBody);
+ }
+
+ @Test
+ public void testA2UseCase() throws IOException {
+ Resource origin = input.getA2Origin();
+ Resource left = input.getA2Left();
+ Resource right = input.getA2Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA3UseCase() throws IOException {
+ Resource origin = input.getA3Origin();
+ Resource left = input.getA3Left();
+ Resource right = input.getA3Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA4UseCaseLtoR() throws IOException {
+ Resource origin = input.getA4Origin();
+ Resource left = input.getA4Left();
+ Resource right = input.getA4Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertA4UseCaseMergeResult(right.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ @Test
+ public void testA4UseCaseRtoL() throws IOException {
+ Resource origin = input.getA4Origin();
+ Resource left = input.getA4Left();
+ Resource right = input.getA4Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertA4UseCaseMergeResult(left.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ private void assertA4UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueAction);
+
+ OpaqueAction action = (OpaqueAction)eObject;
+ assertEquals(2, action.getLanguages().size());
+ assertEquals(2, action.getBodies().size());
+
+ assertEquals(JAVA, action.getLanguages().get(0));
+ assertEquals(OCL, action.getLanguages().get(1));
+
+ assertEquals(EXPECTED_MERGE_JAVA, action.getBodies().get(0));
+ assertEquals(EXPECTED_OCL, action.getBodies().get(1));
+ }
+
+ @Test
+ public void testA4UseCase_RevertAdditionLeftTwoWay() throws IOException {
+ Resource origin = input.getA4Origin();
+ Resource left = input.getA4Left();
+
+ OpaqueAction originAction = (OpaqueAction)origin.getEObject(OPAQUE_ACTION1_ID);
+ String originBody = originAction.getBodies().get(0);
+
+ Comparison comparison = compare(left, origin, null);
+ revertLeftOpaqueElementBodyChanges(comparison);
+ assertOneBodyWithContents(left, originBody);
+ }
+
+ @Test
+ public void testA4UseCase_RevertDeletionLeftTwoWay() throws IOException {
+ Resource left = input.getA4Left();
+ Resource origin = input.getA4Origin();
+
+ // swapped left and origin to create deletion
+ Comparison comparison = compare(origin, left, null);
+ revertLeftOpaqueElementBodyChanges(comparison);
+
+ EObject eObject = origin.getEObject(OPAQUE_ACTION1_ID);
+ OpaqueAction action = (OpaqueAction)eObject;
+ assertEquals(2, action.getLanguages().size());
+ assertEquals(2, action.getBodies().size());
+ }
+
+ @Test
+ public void testA5UseCaseLtoR() throws IOException {
+ Resource origin = input.getA5Origin();
+ Resource left = input.getA5Left();
+ Resource right = input.getA5Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertA5UseCaseMergeResult(right.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ @Test
+ public void testA5UseCaseRtoL() throws IOException {
+ Resource origin = input.getA5Origin();
+ Resource left = input.getA5Left();
+ Resource right = input.getA5Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertA5UseCaseMergeResult(left.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ private void assertA5UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueAction);
+
+ OpaqueAction action = (OpaqueAction)eObject;
+ assertEquals(3, action.getLanguages().size());
+ assertEquals(3, action.getBodies().size());
+
+ assertTrue(action.getLanguages().contains("JAVA"));
+ assertTrue(action.getLanguages().contains("OCL"));
+ assertTrue(action.getLanguages().contains("C"));
+
+ int indexJava = action.getLanguages().indexOf("JAVA");
+ int indexOcl = action.getLanguages().indexOf("OCL");
+ int indexC = action.getLanguages().indexOf("C");
+
+ assertEquals(EXPECTED_JAVA, action.getBodies().get(indexJava));
+ assertEquals(EXPECTED_OCL, action.getBodies().get(indexOcl));
+ assertEquals(EXPECTED_C, action.getBodies().get(indexC));
+ }
+
+ @Test
+ public void testA6UseCaseLtoR() throws IOException {
+ Resource origin = input.getA6Origin();
+ Resource left = input.getA6Left();
+ Resource right = input.getA6Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertA6UseCaseMergeResult(right.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ @Test
+ public void testA6UseCaseRtoL() throws IOException {
+ Resource origin = input.getA6Origin();
+ Resource left = input.getA6Left();
+ Resource right = input.getA6Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertA6UseCaseMergeResult(left.getEObject(OPAQUE_ACTION1_ID));
+ }
+
+ private void assertA6UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueAction);
+
+ OpaqueAction action = (OpaqueAction)eObject;
+ assertEquals(2, action.getLanguages().size());
+ assertEquals(2, action.getBodies().size());
+
+ assertTrue(action.getLanguages().contains("JAVA"));
+ assertTrue(action.getLanguages().contains("OCL"));
+
+ int indexJava = action.getLanguages().indexOf("JAVA");
+ int indexOcl = action.getLanguages().indexOf("OCL");
+
+ assertEquals(EXPECTED_JAVA, action.getBodies().get(indexJava));
+ assertEquals(EXPECTED_MERGE_OCL, action.getBodies().get(indexOcl));
+
+ assertEquals(indexOcl, 0);
+ assertEquals(indexJava, 1);
+ }
+
+ @Test
+ public void testA6UseCase_RevertReorderRightTwoWay() throws IOException {
+ Resource origin = input.getA6Origin();
+ // we take right as left, because we want to test reverting the reordering
+ Resource left = input.getA6Right();
+
+ Comparison comparison = compare(left, origin, null);
+ revertLeftOpaqueElementBodyChanges(comparison);
+
+ OpaqueAction action = (OpaqueAction)left.getEObject(OPAQUE_ACTION1_ID);
+
+ assertEquals(2, action.getLanguages().size());
+ assertEquals(2, action.getBodies().size());
+
+ int indexJava = action.getLanguages().indexOf("JAVA");
+ int indexOcl = action.getLanguages().indexOf("OCL");
+
+ // assert that the order of languages and bodies is reverted
+ assertEquals(indexJava, 0);
+ assertEquals(indexOcl, 1);
+ assertEquals(EXPECTED_JAVA, action.getBodies().get(indexJava));
+ assertEquals(EXPECTED_OCL, action.getBodies().get(indexOcl));
+ }
+
+ @Test
+ public void testA7UseCase() throws IOException {
+ Resource origin = input.getA7Origin();
+ Resource left = input.getA7Left();
+ Resource right = input.getA7Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA8UseCase() throws IOException {
+ Resource origin = input.getA8Origin();
+ Resource left = input.getA8Left();
+ Resource right = input.getA8Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA9UseCaseLtoR() throws IOException {
+ Resource origin = input.getA9Origin();
+ Resource left = input.getA9Left();
+ Resource right = input.getA9Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+
+ assertA9UseCaseMergeResult(right);
+ }
+
+ @Test
+ public void testA9UseCaseRtoL() throws IOException {
+ Resource origin = input.getA9Origin();
+ Resource left = input.getA9Left();
+ Resource right = input.getA9Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+
+ assertA9UseCaseMergeResult(left);
+ }
+
+ private void assertA9UseCaseMergeResult(Resource resource) {
+ EObject eObject = resource.getEObject(OPAQUE_ACTION1_ID);
+ assertTrue(eObject instanceof OpaqueAction);
+ OpaqueAction opaqueAction = (OpaqueAction)eObject;
+ assertEquals(0, opaqueAction.getBodies().size());
+ assertEquals(0, opaqueAction.getLanguages().size());
+ }
+
+ @Test
+ public void testA10UseCaseRtoL() throws IOException {
+ Resource origin = input.getA10Origin();
+ Resource left = input.getA10Left();
+ Resource right = input.getA10Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+
+ assertOneBodyWithContents(left, EXPECTED_MERGE_OCL);
+ }
+
+ @Test
+ public void testA10UseCaseLtoR() throws IOException {
+ Resource origin = input.getA10Origin();
+ Resource left = input.getA10Left();
+ Resource right = input.getA10Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+
+ assertOneBodyWithContents(right, EXPECTED_MERGE_OCL);
+ }
+
+ @Test
+ public void testA11UseCase() throws IOException {
+ Resource origin = input.getA11Origin();
+ Resource left = input.getA11Left();
+ Resource right = input.getA11Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA12UseCase() throws IOException {
+ Resource origin = input.getA12Origin();
+ Resource left = input.getA12Left();
+ Resource right = input.getA12Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertOneRealConflict(comparison);
+ }
+
+ @Test
+ public void testA13UseCase() throws IOException {
+ Resource origin = input.getA13Origin();
+ Resource left = input.getA13Left();
+ Resource right = input.getA13Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+
+ EObject leftEObject = left.getEObject(OPAQUE_ACTION1_ID);
+ OpaqueAction leftOpaqueAction = (OpaqueAction)leftEObject;
+ String bodyLeft = leftOpaqueAction.getBodies().get(0);
+
+ assertOneBodyWithContents(right, bodyLeft);
+ }
+
+ @Test
+ public void testB1UseCaseRtoL() throws IOException {
+ Resource origin = input.getB1Origin();
+ Resource left = input.getB1Left();
+ Resource right = input.getB1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertB1UseCaseMergeResult(left.getEObject(OPAQUE_BEHAVIOR1_ID));
+ }
+
+ @Test
+ public void testB1UseCaseLtoR() throws IOException {
+ Resource origin = input.getB1Origin();
+ Resource left = input.getB1Left();
+ Resource right = input.getB1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertB1UseCaseMergeResult(right.getEObject(OPAQUE_BEHAVIOR1_ID));
+ }
+
+ private void assertB1UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueBehavior);
+
+ OpaqueBehavior action = (OpaqueBehavior)eObject;
+ assertEquals(1, action.getLanguages().size());
+ assertEquals(1, action.getBodies().size());
+
+ assertEquals(JAVA, action.getLanguages().get(0));
+ assertEquals(EXPECTED_MERGE, action.getBodies().get(0));
+ }
+
+ @Test
+ public void testE1UseCaseRtoL() throws IOException {
+ Resource origin = input.getE1Origin();
+ Resource left = input.getE1Left();
+ Resource right = input.getE1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyRightOpaqueElementBodyChangesToLeft(comparison);
+ assertE1UseCaseMergeResult(left.getEObject(OPAQUE_EXPRESSION1_ID));
+ }
+
+ @Test
+ public void testE1UseCaseLtoR() throws IOException {
+ Resource origin = input.getE1Origin();
+ Resource left = input.getE1Left();
+ Resource right = input.getE1Right();
+
+ Comparison comparison = compare(left, right, origin);
+ assertNoRealConflict(comparison);
+
+ applyLeftOpaqueElementBodyChangesToRight(comparison);
+ assertE1UseCaseMergeResult(right.getEObject(OPAQUE_EXPRESSION1_ID));
+ }
+
+ private void assertE1UseCaseMergeResult(EObject eObject) {
+ assertTrue(eObject instanceof OpaqueExpression);
+
+ OpaqueExpression action = (OpaqueExpression)eObject;
+ assertEquals(1, action.getLanguages().size());
+ assertEquals(1, action.getBodies().size());
+
+ assertEquals(JAVA, action.getLanguages().get(0));
+ assertEquals(EXPECTED_MERGE, action.getBodies().get(0));
+ }
+
+ private void assertOneBodyWithContents(Resource resource, String contents) {
+ EObject eObject = resource.getEObject(OPAQUE_ACTION1_ID);
+ assertTrue(eObject instanceof OpaqueAction);
+ OpaqueAction opaqueAction = (OpaqueAction)eObject;
+ assertEquals(1, opaqueAction.getBodies().size());
+ assertEquals(1, opaqueAction.getLanguages().size());
+
+ String body = opaqueAction.getBodies().get(0);
+ assertEquals(contents, body);
+ }
+
+ private void applyRightOpaqueElementBodyChangesToLeft(Comparison comparison) {
+ final EList<Diff> allDifferences = comparison.getDifferences();
+ final Iterable<Diff> rightOpaqueElementBodyChanges = filter(allDifferences, and(
+ IS_OPAQUE_ELEMENT_CHANGE, IS_RIGHT_SOURCE));
+ for (Diff diff : rightOpaqueElementBodyChanges) {
+ IMerger merger = getMergerRegistry().getHighestRankingMerger(diff);
+ merger.copyRightToLeft(diff, new BasicMonitor());
+ }
+ }
+
+ private void revertLeftOpaqueElementBodyChanges(Comparison comparison) {
+ final EList<Diff> allDifferences = comparison.getDifferences();
+ final Iterable<Diff> leftOpaqueElementBodyChanges = filter(allDifferences, and(
+ IS_OPAQUE_ELEMENT_CHANGE, IS_LEFT_SOURCE));
+ for (Diff diff : leftOpaqueElementBodyChanges) {
+ IMerger merger = getMergerRegistry().getHighestRankingMerger(diff);
+ merger.copyRightToLeft(diff, new BasicMonitor());
+ }
+ }
+
+ private void revertRightOpaqueElementBodyChanges(Comparison comparison) {
+ final EList<Diff> allDifferences = comparison.getDifferences();
+ final Iterable<Diff> rightOpaqueElementBodyChanges = filter(allDifferences, and(
+ IS_OPAQUE_ELEMENT_CHANGE, IS_RIGHT_SOURCE));
+ for (Diff diff : rightOpaqueElementBodyChanges) {
+ IMerger merger = getMergerRegistry().getHighestRankingMerger(diff);
+ merger.copyLeftToRight(diff, new BasicMonitor());
+ }
+ }
+
+ private void applyLeftOpaqueElementBodyChangesToRight(Comparison comparison) {
+ final EList<Diff> allDifferences = comparison.getDifferences();
+ final Iterable<Diff> leftOpaqueElementBodyChanges = filter(allDifferences, and(
+ IS_OPAQUE_ELEMENT_CHANGE, IS_LEFT_SOURCE));
+ for (Diff diff : leftOpaqueElementBodyChanges) {
+ IMerger merger = getMergerRegistry().getHighestRankingMerger(diff);
+ merger.copyLeftToRight(diff, new BasicMonitor());
+ }
+ }
+
+ private void assertNoRealConflict(Comparison comparison) {
+ for (Conflict conflict : comparison.getConflicts()) {
+ assertFalse(isRealConflict(conflict));
+ }
+ }
+
+ private void assertOneRealConflict(Comparison comparison) {
+ int numberOfRealConflicts = 0;
+ for (Conflict conflict : comparison.getConflicts()) {
+ if (isRealConflict(conflict)) {
+ numberOfRealConflicts++;
+ }
+ }
+ assertEquals(1, numberOfRealConflicts);
+ }
+
+ private boolean isRealConflict(Conflict conflict) {
+ return ConflictKind.REAL.equals(conflict.getKind());
+ }
+
+ @Override
+ protected AbstractUMLInputData getInput() {
+ return input;
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/OpaqueInputData.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/OpaqueInputData.java
new file mode 100644
index 000000000..7607d808b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/OpaqueInputData.java
@@ -0,0 +1,204 @@
+/*******************************************************************************
+ * Copyright (c) 2014 EclipseSource Muenchen GmbH and others.
+ * 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:
+ * Philip Langer - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.emf.compare.uml2.tests.opaque.data;
+
+import java.io.IOException;
+
+import org.eclipse.emf.compare.uml2.tests.AbstractUMLInputData;
+import org.eclipse.emf.compare.uml2.tests.opaque.OpaqueElementBodyChangeMergeTest;
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * Provides test data for the {@link OpaqueElementBodyChangeMergeTest}.
+ *
+ * @author Philip Langer <planger@eclipsesource.com>
+ */
+public class OpaqueInputData extends AbstractUMLInputData {
+ public Resource getA1Origin() throws IOException {
+ return loadFromClassLoader("a1/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA1Left() throws IOException {
+ return loadFromClassLoader("a1/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA1Right() throws IOException {
+ return loadFromClassLoader("a1/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA2Origin() throws IOException {
+ return loadFromClassLoader("a2/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA2Left() throws IOException {
+ return loadFromClassLoader("a2/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA2Right() throws IOException {
+ return loadFromClassLoader("a2/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA3Origin() throws IOException {
+ return loadFromClassLoader("a3/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA3Left() throws IOException {
+ return loadFromClassLoader("a3/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA3Right() throws IOException {
+ return loadFromClassLoader("a3/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA4Origin() throws IOException {
+ return loadFromClassLoader("a4/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA4Left() throws IOException {
+ return loadFromClassLoader("a4/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA4Right() throws IOException {
+ return loadFromClassLoader("a4/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA5Origin() throws IOException {
+ return loadFromClassLoader("a5/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA5Left() throws IOException {
+ return loadFromClassLoader("a5/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA5Right() throws IOException {
+ return loadFromClassLoader("a5/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA6Origin() throws IOException {
+ return loadFromClassLoader("a6/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA6Left() throws IOException {
+ return loadFromClassLoader("a6/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA6Right() throws IOException {
+ return loadFromClassLoader("a6/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA7Origin() throws IOException {
+ return loadFromClassLoader("a7/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA7Left() throws IOException {
+ return loadFromClassLoader("a7/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA7Right() throws IOException {
+ return loadFromClassLoader("a7/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA8Origin() throws IOException {
+ return loadFromClassLoader("a8/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA8Left() throws IOException {
+ return loadFromClassLoader("a8/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA8Right() throws IOException {
+ return loadFromClassLoader("a8/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA9Origin() throws IOException {
+ return loadFromClassLoader("a9/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA9Left() throws IOException {
+ return loadFromClassLoader("a9/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA9Right() throws IOException {
+ return loadFromClassLoader("a9/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA10Origin() throws IOException {
+ return loadFromClassLoader("a10/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA10Left() throws IOException {
+ return loadFromClassLoader("a10/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA10Right() throws IOException {
+ return loadFromClassLoader("a10/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA11Origin() throws IOException {
+ return loadFromClassLoader("a11/origin.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 getA12Origin() throws IOException {
+ return loadFromClassLoader("a12/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA12Left() throws IOException {
+ return loadFromClassLoader("a12/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA12Right() throws IOException {
+ return loadFromClassLoader("a12/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA13Origin() throws IOException {
+ return loadFromClassLoader("a13/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA13Left() throws IOException {
+ return loadFromClassLoader("a13/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getA13Right() throws IOException {
+ return loadFromClassLoader("a13/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB1Origin() throws IOException {
+ return loadFromClassLoader("b1/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB1Left() throws IOException {
+ return loadFromClassLoader("b1/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getB1Right() throws IOException {
+ return loadFromClassLoader("b1/right.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getE1Origin() throws IOException {
+ return loadFromClassLoader("e1/origin.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getE1Left() throws IOException {
+ return loadFromClassLoader("e1/left.uml"); //$NON-NLS-1$
+ }
+
+ public Resource getE1Right() throws IOException {
+ return loadFromClassLoader("e1/right.uml"); //$NON-NLS-1$
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/left.uml
new file mode 100644
index 000000000..fed93990b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/origin.uml
new file mode 100644
index 000000000..be0cecdbe
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/right.uml
new file mode 100644
index 000000000..8e3947afd
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a1/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/left.uml
new file mode 100644
index 000000000..1e03af1cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <body>This is an OCL&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/right.uml
new file mode 100644
index 000000000..3d7f829f6
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a10/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/left.uml
new file mode 100644
index 000000000..1e03af1cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <body>This is an OCL&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/right.uml
new file mode 100644
index 000000000..d4bf4879a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a11/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+(changed) test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/left.uml
new file mode 100644
index 000000000..1e03af1cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <body>This is an OCL&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/right.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a12/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/left.uml
new file mode 100644
index 000000000..1e03af1cf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <body>This is an OCL&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/right.uml
new file mode 100644
index 000000000..21b3809ec
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a13/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/left.uml
new file mode 100644
index 000000000..fed93990b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/left.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/origin.uml
new file mode 100644
index 000000000..be0cecdbe
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/right.uml
new file mode 100644
index 000000000..f6c56c59b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a2/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+(changed)test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/left.uml
new file mode 100644
index 000000000..436d09076
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/right.uml
new file mode 100644
index 000000000..f6a67250b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a3/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/left.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/origin.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/right.uml
new file mode 100644
index 000000000..d31d218e1
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a4/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/left.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/origin.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/right.uml
new file mode 100644
index 000000000..d2bd1ac3b
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a5/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>C</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is a C&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/left.uml
new file mode 100644
index 000000000..56fb7da8c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/right.uml
new file mode 100644
index 000000000..e85db3ee3
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a6/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <language>JAVA</language>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/left.uml
new file mode 100644
index 000000000..75afe65ae
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/origin.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/origin.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/right.uml
new file mode 100644
index 000000000..a0a7fd9a4
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a7/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>OCL</language>
+ <language>JAVA</language>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is a JAVA&#xD;
+(changed) test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/left.uml
new file mode 100644
index 000000000..d1c6a7222
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/left.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is an OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/origin.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/right.uml
new file mode 100644
index 000000000..d57b727bb
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a8/right.uml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <language>OCL</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ <body>This is a different OCL&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/left.uml
new file mode 100644
index 000000000..f7c718aa6
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/left.uml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/origin.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/origin.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/right.uml
new file mode 100644
index 000000000..e3ad24c8f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/a9/right.uml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Activity" xmi:id="_mlTEQGQIEeS_8IneN_JFUg" name="Activity1" node="_opaqueAction1">
+ <node xmi:type="uml:OpaqueAction" xmi:id="_opaqueAction1" name="OpaqueAction1">
+ <language>JAVA</language>
+ <body>This is a JAVA&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </node>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/left.uml
new file mode 100644
index 000000000..be677b7ce
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/left.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueBehavior" xmi:id="_opaqueBehavior1" name="OpaqueBehavior1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/origin.uml
new file mode 100644
index 000000000..c6dda644a
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/origin.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueBehavior" xmi:id="_opaqueBehavior1" name="OpaqueBehavior1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/right.uml
new file mode 100644
index 000000000..52819b935
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/b1/right.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueBehavior" xmi:id="_opaqueBehavior1" name="OpaqueBehavior1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/left.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/left.uml
new file mode 100644
index 000000000..774e3819f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/left.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueExpression" xmi:id="_opaqueExpression1" name="OpaqueExpression1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line (changed)&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/origin.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/origin.uml
new file mode 100644
index 000000000..2834b4cb8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/origin.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueExpression" xmi:id="_opaqueExpression1" name="OpaqueExpression1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/right.uml b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/right.uml
new file mode 100644
index 000000000..adc07dbb0
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/e1/right.uml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_mhydQGQIEeS_8IneN_JFUg" name="Model">
+ <packageImport xmi:id="_mhydQWQIEeS_8IneN_JFUg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:OpaqueExpression" xmi:id="_opaqueExpression1" name="OpaqueExpression1">
+ <language>JAVA</language>
+ <body>This is a&#xD;
+test with multi-line&#xD;
+String attribute&#xD;
+and concurrent changes (changed)&#xD;
+of them.</body>
+ </packagedElement>
+</uml:Model>
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/useCases b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/useCases
new file mode 100644
index 000000000..ec5fcfeb2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/data/useCases
@@ -0,0 +1,82 @@
+Use Cases for merging bodies of OpaqueBehaviors
+===============================================
+
+A1
+--
+Opaque action with one body attribute value that is concurrently modified in a
+mergeable way (i.e., at different lines).
+
+A2
+--
+Opaque action with one body attribute value that is concurrently modified in a
+non-mergeable way (i.e., conflict).
+
+A3
+--
+Opaque action with two body attribute values, whereas the second is concurrently
+modified in a non-mergeable way (i.e., conflict) and the first one is changed in
+a mergeable way (i.e., no conflict).
+
+A4
+--
+Opaque action with one body attribute value that is changed on the right-hand side
+and on the left-hand side a new language and body has been added (i.e., mergeable).
+
+A5
+--
+Opaque action with one body attribute value that is unchanged, but both sides add
+different new languages and bodies (i.e., mergeable).
+
+A6
+--
+Opaque action with two body attribute values, whereas one is changed on the both
+sides but on different lines (i.e., mergeable) and on the right-hand side the order
+of the language/body values is changed (i.e., mergeable).
+
+A7
+--
+Opaque action with two body attribute values, whereas one is changed on the both
+sides on the same line (i.e., conflict) and additionally on the right-hand side
+the order of the language/body values is changed.
+
+A8
+--
+Opaque action with one body attribute value that is unchanged, but both sides add
+same new language value with different body (i.e., conflict).
+
+A9
+--
+Opaque action with one body attribute value that is deleted on the left-hand side
+and left unchanged on the right-hand side.
+
+A10
+---
+Opaque action with two body attribute values, whereas one is deleted and the other one
+is changed left-hand side and on the right-hand side the one that has been changed on the
+left-hand side is also changed in a mergeable way.
+
+A11
+---
+Opaque action with two body attribute values, whereas one is deleted and the other one
+is changed left-hand side and on the right-hand side the one that has been changed on the
+left-hand side is also changed in a non-mergeable way (conflict).
+
+A12
+---
+Opaque action with two body attribute values, whereas one is deleted and the other one
+is changed left-hand side and on the right-hand side the one that has been changed on the
+left-hand side is deleted (delete-update conflict).
+
+A13
+---
+Opaque action with two body attribute values, whereas one is deleted and the other one
+is changed left-hand side and on the right-hand side the one that has been deleted on
+the left-hand side is deleted too (delete-delete -> no conflict).
+
+B1
+--
+Same as A1 but with OpaqueBehaviors.
+
+E1
+--
+Same as A1 but with OpaqueExpressions. \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
index 1cda2f7fe..0dc9c70b2 100644
--- a/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
+++ b/plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/suite/AllTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2014 Obeo.
+ * Copyright (c) 2012, 2014 Obeo and others.
* 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
@@ -7,6 +7,7 @@
*
* Contributors:
* Obeo - initial API and implementation
+ * Philip Langer - addition of OpaqueTest
*******************************************************************************/
package org.eclipse.emf.compare.uml2.tests.suite;
@@ -38,6 +39,8 @@ import org.eclipse.emf.compare.uml2.tests.implications.ImplicationsTransitionTes
import org.eclipse.emf.compare.uml2.tests.include.AddIncludeTest;
import org.eclipse.emf.compare.uml2.tests.merge.ExtensionMergeTest;
import org.eclipse.emf.compare.uml2.tests.message.AddMessageTest;
+import org.eclipse.emf.compare.uml2.tests.opaque.OpaqueElementBodyChangeDiffTest;
+import org.eclipse.emf.compare.uml2.tests.opaque.OpaqueElementBodyChangeMergeTest;
import org.eclipse.emf.compare.uml2.tests.profiles.DynamicProfileTest;
import org.eclipse.emf.compare.uml2.tests.profiles.StaticProfileTest;
import org.eclipse.emf.compare.uml2.tests.stereotypes.DynamicStereotypeTest;
@@ -65,7 +68,8 @@ import org.junit.runners.Suite.SuiteClasses;
StaticStereotypeTest.class, StaticStereotypedElementChangeTests.class, DynamicStereotypeTest.class,
DynamicStereotypedElementChangeTests.class, ImplicationsAssociationTest.class,
ImplicationsTransitionTest.class, ImplicationsInterfaceRealizationTest.class,
- StaticStereotypedElementItemProviderTest.class, DynamicStereotypedElementItemProviderTest.class })
+ StaticStereotypedElementItemProviderTest.class, DynamicStereotypedElementItemProviderTest.class,
+ OpaqueElementBodyChangeDiffTest.class, OpaqueElementBodyChangeMergeTest.class })
public class AllTests {
/**

Back to the top