Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2012-03-05 16:30:38 +0000
committerlgoubet2012-03-05 16:30:38 +0000
commitd1de4044f70dbb52b9fb53b6cc3471ec707e0c3b (patch)
treea4a1e71c1f633d0ef99022bfec1657bc06377c5c /plugins
parent91c8769f49f5961e1d4bbea29f96194d36f17637 (diff)
downloadorg.eclipse.emf.compare-d1de4044f70dbb52b9fb53b6cc3471ec707e0c3b.tar.gz
org.eclipse.emf.compare-d1de4044f70dbb52b9fb53b6cc3471ec707e0c3b.tar.xz
org.eclipse.emf.compare-d1de4044f70dbb52b9fb53b6cc3471ec707e0c3b.zip
[294336] Including Stephen McCants' unit tests.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/model/external.ecore20
-rw-r--r--plugins/org.eclipse.emf.compare.tests/model/external.genmodel24
-rw-r--r--plugins/org.eclipse.emf.compare.tests/model/nodes.ecore27
-rw-r--r--plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel29
-rw-r--r--plugins/org.eclipse.emf.compare.tests/plugin.xml5
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/MergeTests.java1098
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalFactory.java84
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalPackage.java366
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/Holder.java65
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/HolderHolder.java65
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/NoncontainmentHolder.java65
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/StringHolder.java65
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalFactoryImpl.java143
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalPackageImpl.java289
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderHolderImpl.java191
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderImpl.java191
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/NoncontainmentHolderImpl.java172
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/StringHolderImpl.java178
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalAdapterFactory.java189
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalSwitch.java204
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/match/NodeMatchEngine.java38
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Group.java55
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Leaf.java204
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java94
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java75
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java566
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/GroupImpl.java165
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/LeafImpl.java503
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java234
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java207
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java376
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java171
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java185
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nonemf/NonEMFStringHolder.java44
34 files changed, 6387 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/model/external.ecore b/plugins/org.eclipse.emf.compare.tests/model/external.ecore
new file mode 100644
index 000000000..852bff4b2
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/model/external.ecore
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="external"
+ nsURI="externalURI" nsPrefix="compare.tests.external">
+ <eClassifiers xsi:type="ecore:EClass" name="StringHolder">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Holder">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stringHolder" eType="#//StringHolder"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NoncontainmentHolder">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stringHolder" eType="#//StringHolder"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="HolderHolder">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="holder" eType="#//NoncontainmentHolder"
+ containment="true"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.compare.tests/model/external.genmodel b/plugins/org.eclipse.emf.compare.tests/model/external.genmodel
new file mode 100644
index 000000000..b4b29e1b4
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/model/external.genmodel
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2009, 2012 IBM Corporation and others.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA;Contributors:&#xD;&#xA; Stephen McCants - Initial API and implementation"
+ modelDirectory="/org.eclipse.emf.compare.tests/src-gen" modelPluginID="org.eclipse.emf.compare.tests"
+ modelName="External" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" runtimeVersion="2.4">
+ <foreignModel>external.ecore</foreignModel>
+ <genPackages prefix="External" basePackage="org.eclipse.emf.compare.tests" disposableProviderFactory="true"
+ ecorePackage="external.ecore#/">
+ <genClasses ecoreClass="external.ecore#//StringHolder">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute external.ecore#//StringHolder/name"/>
+ </genClasses>
+ <genClasses ecoreClass="external.ecore#//Holder">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference external.ecore#//Holder/stringHolder"/>
+ </genClasses>
+ <genClasses ecoreClass="external.ecore#//NoncontainmentHolder">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference external.ecore#//NoncontainmentHolder/stringHolder"/>
+ </genClasses>
+ <genClasses ecoreClass="external.ecore#//HolderHolder">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference external.ecore#//HolderHolder/holder"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.compare.tests/model/nodes.ecore b/plugins/org.eclipse.emf.compare.tests/model/nodes.ecore
new file mode 100644
index 000000000..ba367d424
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/model/nodes.ecore
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="nodes"
+ nsURI="namespaceURI" nsPrefix="compare.tests">
+ <eClassifiers xsi:type="ecore:EClass" name="Group" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//Node" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Leaf" eSuperTypes="#//Node">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="noncontainmentHolder" eType="ecore:EClass external.ecore#//StringHolder"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="containmentHolder" eType="ecore:EClass external.ecore#//StringHolder"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="holder" eType="ecore:EClass external.ecore#//Holder"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="nonEMF" eType="#//NonEMFStringHolder"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="noncontainmentNoncontainmentHolder"
+ eType="ecore:EClass external.ecore#//NoncontainmentHolder"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Node">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="uuid" eType="#//UUID"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="UUID" instanceClassName="java.util.UUID"/>
+ <eClassifiers xsi:type="ecore:EDataType" name="NonEMFStringHolder" instanceClassName="org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder"/>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel b/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel
new file mode 100644
index 000000000..6a26ebe82
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/model/nodes.genmodel
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2009, 2012 IBM Corporation and others.&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA;Contributors:&#xD;&#xA; Stephen McCants - Initial API and implementation"
+ modelDirectory="/org.eclipse.emf.compare.tests/src-gen" modelPluginID="org.eclipse.emf.compare.tests"
+ modelName="Nodes" nonNLSMarkers="true" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" runtimeVersion="2.4" usedGenPackages="external.genmodel#//external">
+ <foreignModel>nodes.ecore</foreignModel>
+ <genPackages prefix="Nodes" basePackage="org.eclipse.emf.compare.tests" disposableProviderFactory="true"
+ ecorePackage="nodes.ecore#/">
+ <genDataTypes ecoreDataType="nodes.ecore#//UUID"/>
+ <genDataTypes ecoreDataType="nodes.ecore#//NonEMFStringHolder"/>
+ <genClasses ecoreClass="nodes.ecore#//Group">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//Group/children"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//Leaf">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//Leaf/noncontainmentHolder"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference nodes.ecore#//Leaf/containmentHolder"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Leaf/number"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//Leaf/holder"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Leaf/nonEMF"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference nodes.ecore#//Leaf/noncontainmentNoncontainmentHolder"/>
+ </genClasses>
+ <genClasses ecoreClass="nodes.ecore#//Node">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Node/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute nodes.ecore#//Node/uuid"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.compare.tests/plugin.xml b/plugins/org.eclipse.emf.compare.tests/plugin.xml
index 605a56b87..22448852a 100644
--- a/plugins/org.eclipse.emf.compare.tests/plugin.xml
+++ b/plugins/org.eclipse.emf.compare.tests/plugin.xml
@@ -46,6 +46,11 @@ Contributors:
namespacePattern=".*2002/GenModel"
priority="lowest">
</matchengine>
+ <matchengine
+ engineClass="org.eclipse.emf.compare.tests.match.NodeMatchEngine"
+ fileExtension="nodes"
+ label="Node Match Engine">
+ </matchengine>
<!--
<matchengine
engineClass="org.eclipse.emf.compare.match.statistic.test.match.engines.GenericHighestEngine"
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/MergeTests.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/MergeTests.java
new file mode 100644
index 000000000..1f70156ec
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/MergeTests.java
@@ -0,0 +1,1098 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.compare.diff.merge.service.MergeService;
+import org.eclipse.emf.compare.diff.metamodel.DiffElement;
+import org.eclipse.emf.compare.diff.metamodel.DiffModel;
+import org.eclipse.emf.compare.diff.metamodel.DiffResourceSet;
+import org.eclipse.emf.compare.diff.metamodel.UpdateReference;
+import org.eclipse.emf.compare.diff.service.DiffService;
+import org.eclipse.emf.compare.match.metamodel.MatchResourceSet;
+import org.eclipse.emf.compare.match.service.MatchService;
+import org.eclipse.emf.compare.tests.external.ExternalFactory;
+import org.eclipse.emf.compare.tests.external.Holder;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+import org.eclipse.emf.compare.tests.nodes.Group;
+import org.eclipse.emf.compare.tests.nodes.Leaf;
+import org.eclipse.emf.compare.tests.nodes.Node;
+import org.eclipse.emf.compare.tests.nodes.NodesFactory;
+import org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+/**
+ * This is a set of generic tests to test EMFCompare and make sure it is working okay. The reason I'm using
+ * generic tests is so I can share them with the EMFCompare authors if needed.
+ *
+ * @author smccants
+ */
+public class MergeTests extends TestCase {
+ /** We'll use the test plugin's "data" folder in order to save temporary resources created by the tests. */
+ private static final String TEMPORARY_DATA_FOLDER = "/data"; //$NON-NLS-1$
+
+ /**
+ * Can we find a changed reference correctly? This is the reference changing, not just the contents of the
+ * reference.
+ *
+ * @throws InterruptedException
+ */
+ public void testNonContainmentReferenceChange() throws InterruptedException {
+ // Build the left holder
+ ResourceSet holderResourceSet = new ResourceSetImpl();
+ Resource holder1Resource = holderResourceSet.createResource(URI
+ .createFileURI("/tmp/holder1asdfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfasdfasdf")); // Makes
+ // the
+ // URI
+ // Similarity
+ // not
+ // cause
+ // problems
+ StringHolder holder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder1.setName("holder1");
+ holder1Resource.getContents().add(holder1);
+
+ // Build the right holder
+ Resource holder2Resource = holderResourceSet.createResource(URI.createFileURI("/tmp/holder2"));
+ StringHolder holder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder2.setName("holder2");
+ holder2Resource.getContents().add(holder2);
+
+ // Build the left and right models
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1adsf.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ Leaf leaf1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1.setName("leaf");
+ leaf1.setUuid(uuid);
+ leaf1.setNoncontainmentHolder(holder1);
+ nodeResource1.getContents().add(leaf1);
+
+ Leaf leaf2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2.setName("leaf");
+ leaf2.setUuid(uuid);
+ leaf2.setNoncontainmentHolder(holder2);
+ nodeResource2.getContents().add(leaf2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(leaf1.eResource().getResourceSet(), leaf2
+ .eResource().getResourceSet(), Collections.<String, Object> emptyMap());
+ assertTrue(match.getUnmatchedModels().isEmpty());
+ DiffResourceSet diff = DiffService.doDiff(match, false);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getOwnedElements());
+ UpdateReference referenceUpdate = (UpdateReference)differences.get(0).getSubDiffElements().get(0)
+ .getSubDiffElements().get(0);
+ assertEquals(holder2, referenceUpdate.getLeftTarget());
+ assertEquals(holder1, referenceUpdate.getRightTarget());
+ MergeService.merge(differences, false);
+ }
+
+ // Check results
+ assertEquals(leaf1.getNoncontainmentHolder(), holder2);
+ }
+
+ /**
+ * Can we find a changed reference correctly? Here the contents of the reference change, however the
+ * reference doesn't stay in it's original resource.
+ *
+ * @throws InterruptedException
+ */
+ public void testContainmentReferenceChange() throws InterruptedException {
+ // Build the left holder
+ ResourceSet holderResourceSet = new ResourceSetImpl();
+ Resource holder1Resource = holderResourceSet.createResource(URI.createFileURI("/tmp/holder1"));
+ StringHolder holder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder1.setName("holder1");
+ holder1Resource.getContents().add(holder1);
+
+ // Build the right holder
+ Resource holder2Resource = holderResourceSet.createResource(URI.createFileURI("/tmp/holder2"));
+ StringHolder holder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder2.setName("holder2");
+ holder2Resource.getContents().add(holder2);
+
+ // Build the left and right models
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1adsf.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ Leaf leaf1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1.setName("leaf");
+ leaf1.setUuid(uuid);
+ leaf1.setContainmentHolder(holder1);
+ nodeResource1.getContents().add(leaf1);
+
+ Leaf leaf2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2.setName("leaf");
+ leaf2.setUuid(uuid);
+ leaf2.setContainmentHolder(holder2);
+ nodeResource2.getContents().add(leaf2);
+
+ // Do the merge test
+ // merge(leaf1, leaf2);
+ MatchResourceSet match = MatchService.doResourceSetMatch(leaf1.eResource().getResourceSet(), leaf2
+ .eResource().getResourceSet(), Collections.<String, Object> emptyMap());
+ assertTrue(match.getUnmatchedModels().isEmpty());
+ DiffResourceSet diff = DiffService.doDiff(match, false);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getOwnedElements());
+ MergeService.merge(differences, false);
+ }
+
+ // Check results
+ assertEquals(holder2.getName(), leaf1.getContainmentHolder().getName());
+ }
+
+ /**
+ * Make sure we can add a new leaf correctly.
+ *
+ * @throws InterruptedException
+ */
+ public void testAddNewLeaf() throws InterruptedException {
+ // Build the non-containment holders
+ ResourceSet holderResourceSet = new ResourceSetImpl();
+ Resource holder1Resource = holderResourceSet.createResource(URI
+ .createFileURI("/tmp/holder1asdfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfasdfasdf")); // Makes
+ // the
+ // URI
+ // Similarity
+ // not
+ // cause
+ // problems
+ StringHolder noncontainmentHolder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ noncontainmentHolder1.setName("non-containment holder1111111111111111111"); // Extra ones to make sure
+ // name comparison fails
+ holder1Resource.getContents().add(noncontainmentHolder1);
+
+ Resource holder2Resource = holderResourceSet.createResource(URI.createFileURI("/tmp/holder2"));
+ StringHolder noncontainmentHolder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ noncontainmentHolder2.setName("non-containment holder2222222222222222222");
+ holder2Resource.getContents().add(noncontainmentHolder2);
+
+ // Build containment holders
+ StringHolder containmentHolder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder1.setName("containment holder 1111111111111111111");
+ StringHolder containmentHolder1v2 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder1v2.setName("containment holder 1111111111111111111");
+ StringHolder containmentHolder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder2.setName("containment holder 2222222222222222222");
+
+ UUID leaf1UUID = UUID.randomUUID();
+ UUID groupUUID = UUID.randomUUID();
+ // Build the left model
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+ // Build leaf 1
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setUuid(leaf1UUID);
+ leaf1v1.setContainmentHolder(containmentHolder1);
+ leaf1v1.setNoncontainmentHolder(noncontainmentHolder1);
+ leaf1v1.setNumber(100);
+ // Build group
+ Group groupv1 = NodesFactory.eINSTANCE.createGroup();
+ groupv1.setName("group");
+ groupv1.setUuid(groupUUID);
+ groupv1.getChildren().add(leaf1v1);
+ // Put it in the resource
+ nodeResource1.getContents().add(groupv1);
+
+ // Build the right model
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ // Build the second version of leaf1
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 1");
+ leaf1v2.setUuid(leaf1UUID);
+ leaf1v2.setContainmentHolder(containmentHolder1v2);
+ leaf1v2.setNoncontainmentHolder(noncontainmentHolder1);
+ leaf1v2.setNumber(100);
+ // We will add leaf 2
+ Leaf leaf2v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v1.setName("leaf 2");
+ leaf2v1.setUuid(UUID.randomUUID());
+ leaf2v1.setContainmentHolder(containmentHolder2);
+ leaf2v1.setNoncontainmentHolder(noncontainmentHolder2);
+ leaf2v1.setNumber(200);
+ // Build the group (v2)
+ Group groupv2 = NodesFactory.eINSTANCE.createGroup();
+ groupv2.setName("group");
+ groupv2.setUuid(groupUUID);
+ groupv2.getChildren().add(leaf1v2);
+ groupv2.getChildren().add(leaf2v1);
+ nodeResource2.getContents().add(groupv2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(groupv1.eResource().getResourceSet(),
+ groupv2.eResource().getResourceSet(), Collections.<String, Object> emptyMap());
+ assertTrue(match.getUnmatchedModels().isEmpty());
+ DiffResourceSet diff = DiffService.doDiff(match, false);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getOwnedElements());
+ MergeService.merge(differences, false);
+ }
+
+ // Check results
+ assertEquals(groupv1.getChildren().size(), 2);
+ for (Node node : groupv1.getChildren()) {
+ if (node == leaf1v1) {
+ assertEquals(containmentHolder1.getName(), leaf1v1.getContainmentHolder().getName());
+ assertEquals(noncontainmentHolder1.getName(), leaf1v1.getNoncontainmentHolder().getName());
+ assertEquals(100, leaf1v1.getNumber());
+ } else if (node instanceof Leaf) {
+ Leaf newLeaf = (Leaf)node;
+ assertNotNull(newLeaf.getContainmentHolder());
+ assertEquals(containmentHolder2.getName(), newLeaf.getContainmentHolder().getName());
+ assertNotNull(newLeaf.getNoncontainmentHolder());
+ assertEquals(noncontainmentHolder2.getName(), newLeaf.getNoncontainmentHolder().getName());
+ assertEquals(200, newLeaf.getNumber());
+ } else
+ fail("Found something we didn't expect:\n" + node);
+ }
+ }
+
+ /**
+ * Can we find a changed attribute correctly?
+ *
+ * @throws InterruptedException
+ */
+ public void testAttributeChange() throws InterruptedException {
+ // Build the containment holder
+ StringHolder holder1Left = ExternalFactory.eINSTANCE.createStringHolder();
+ holder1Left.setName("holder1");
+ StringHolder holder1Right = ExternalFactory.eINSTANCE.createStringHolder();
+ holder1Right.setName("holder1");
+
+ // Build the non-containment holder
+ ResourceSet holderResourceSet = new ResourceSetImpl();
+ Resource holder2Resource = holderResourceSet.createResource(URI.createFileURI("/tmp/holder2"));
+ StringHolder holder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder2.setName("holder2");
+ holder2Resource.getContents().add(holder2);
+
+ // Build the left and right models
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+ Leaf leaf1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1.setName("leaf");
+ leaf1.setUuid(uuid);
+ leaf1.setContainmentHolder(holder1Left);
+ leaf1.setNoncontainmentHolder(holder2);
+ leaf1.setNumber(100);
+ nodeResource1.getContents().add(leaf1);
+
+ Leaf leaf2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2.setName("leaf");
+ leaf2.setUuid(uuid);
+ leaf2.setContainmentHolder(holder1Right);
+ leaf2.setNoncontainmentHolder(holder2);
+ leaf2.setNumber(200);
+ nodeResource2.getContents().add(leaf2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(leaf1.eResource().getResourceSet(), leaf2
+ .eResource().getResourceSet(), Collections.<String, Object> emptyMap());
+ assertTrue(match.getUnmatchedModels().isEmpty());
+ DiffResourceSet diff = DiffService.doDiff(match, false);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getOwnedElements());
+ MergeService.merge(differences, false);
+ }
+
+ // Check results
+ assertEquals(holder1Right.getName(), leaf1.getContainmentHolder().getName());
+ assertEquals(holder2.getName(), leaf1.getNoncontainmentHolder().getName());
+ assertEquals(200, leaf1.getNumber());
+ }
+
+ /**
+ * Adds a group with two leafs under it to an existing group. This is a three way matching test.
+ *
+ * @throws InterruptedException
+ */
+ public void testAddPopulatedGroup() throws InterruptedException {
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(group1v1.getUuid());
+ nodeResource2.getContents().add(group1v2);
+ Group group2v2 = NodesFactory.eINSTANCE.createGroup();
+ group2v2.setName("group 2");
+ group2v2.setUuid(UUID.randomUUID());
+ group1v2.getChildren().add(group2v2);
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 1");
+ leaf1v2.setUuid(UUID.randomUUID());
+ group2v2.getChildren().add(leaf1v2);
+ Leaf leaf2v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v2.setName("leaf 2");
+ leaf2v2.setUuid(UUID.randomUUID());
+ group2v2.getChildren().add(leaf2v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getOwnedElements());
+ MergeService.merge(differences, false);
+ }
+
+ // Check results
+ assertEquals(1, group1v1.getChildren().size());
+ assertTrue(group1v1.getChildren().get(0) instanceof Group);
+ assertEquals(2, ((Group)group1v1.getChildren().get(0)).getChildren().size());
+ for (Node node : ((Group)group1v1.getChildren().get(0)).getChildren()) {
+ assertTrue(node instanceof Leaf);
+ }
+ }
+
+ /**
+ * Two version with a simple parent each have one additional leaf. After the merge, the merged model
+ * should have both leaves.
+ *
+ * @throws InterruptedException
+ */
+ public void testNonConflictingAdds() throws InterruptedException {
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ String leaf1Name = "leaf 1";
+ leaf1v1.setName(leaf1Name);
+ leaf1v1.setUuid(UUID.randomUUID());
+ group1v1.getChildren().add(leaf1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf2v2 = NodesFactory.eINSTANCE.createLeaf();
+ String leaf2Name = "leaf 2";
+ leaf2v2.setName(leaf2Name);
+ leaf2v2.setUuid(UUID.randomUUID());
+ group1v2.getChildren().add(leaf2v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the local changes from the merge service or the merge service
+ // will delete them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote())
+ remoteDifferences.add(difference);
+ }
+ MergeService.merge(remoteDifferences, false);
+ }
+
+ // Check results
+ assertEquals(2, group1v1.getChildren().size());
+ boolean foundLeaf1 = false;
+ boolean foundLeaf2 = false;
+ for (Node node : group1v1.getChildren()) {
+ assertTrue(node instanceof Leaf);
+ if (leaf1Name.equals(node.getName())) {
+ if (foundLeaf1)
+ fail("Found leaf 1 twice!");
+ foundLeaf1 = true;
+ } else if (leaf2Name.equals(node.getName())) {
+ if (foundLeaf2)
+ fail("Found leaf 2 twice!");
+ foundLeaf2 = true;
+ } else
+ fail("Found an unexpected leaf node named '" + node.getName() + "'.");
+ }
+ assertTrue(foundLeaf1);
+ assertTrue(foundLeaf2);
+ }
+
+ /**
+ * We have a original model with a leaf node. The two derivative models have non-conflicting changes to
+ * the leaf node. It should merge correctly without conflict. Problem this test completely misses the
+ * change to the non-containment reference. EMF Compare Defect #295616
+ * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=295616) HDWB Task #5058
+ *
+ * @throws InterruptedException
+ * @throws IOException
+ */
+ public void testNonConflictingAlterations() throws InterruptedException, IOException {
+ final String tmpFolder = getTemporaryDataAbsolutePath();
+
+ // Build the non-containment holders
+ ResourceSet holderResourceSet = new ResourceSetImpl();
+ Resource holder1Resource = holderResourceSet.createResource(URI.createFileURI(tmpFolder
+ + "/holder1asdfasdfasdfasdfasdfasdfasfdasdfasdfasfdasdfasdfasdfasdfasdf")); // Makes the URI
+ // Similarity not
+ // cause problems
+ StringHolder nonContainmentHolder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ nonContainmentHolder1.setName("non holder1");
+ holder1Resource.getContents().add(nonContainmentHolder1);
+ holder1Resource.save(null);
+ Resource holder2Resource = holderResourceSet
+ .createResource(URI.createFileURI(tmpFolder + "/holder2")); // Makes the URI Similarity not
+ // cause problems
+ StringHolder nonContainmentHolder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ nonContainmentHolder2.setName("non holder2");
+ holder2Resource.getContents().add(nonContainmentHolder2);
+ holder2Resource.save(null);
+ // Build a containment holder
+ StringHolder containmentHolder1v0 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder1v0.setName("holder1");
+ StringHolder containmentHolder1v2 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder1v2.setName("holder1");
+ StringHolder containmentHolder2 = ExternalFactory.eINSTANCE.createStringHolder();
+ containmentHolder2.setName("holder2");
+
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI.createFileURI(tmpFolder
+ + "/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI.createFileURI(tmpFolder
+ + "/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI.createFileURI(tmpFolder
+ + "/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setNumber(10);
+ leaf1v0.setContainmentHolder(containmentHolder1v0);
+ StringHolder nonContainmentHolder1v0 = (StringHolder)nodeResourceSetOrig
+ .getResource(nonContainmentHolder1.eResource().getURI(), true).getContents().get(0);
+ leaf1v0.setNoncontainmentHolder(nonContainmentHolder1v0);
+ leaf1v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf1v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setNumber(20);
+ leaf1v1.setContainmentHolder(containmentHolder2);
+ StringHolder nonContainmentHolder1v1 = (StringHolder)nodeResourceSet1
+ .getResource(nonContainmentHolder1.eResource().getURI(), true).getContents().get(0);
+ leaf1v1.setNoncontainmentHolder(nonContainmentHolder1v1);
+ leaf1v1.setUuid(leaf1v0.getUuid());
+ group1v1.getChildren().add(leaf1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 2");
+ leaf1v2.setNumber(10);
+ leaf1v2.setContainmentHolder(containmentHolder1v2);
+ StringHolder nonContainmentHolder2v2 = (StringHolder)nodeResourceSet2
+ .getResource(nonContainmentHolder2.eResource().getURI(), true).getContents().get(0);
+ leaf1v2.setNoncontainmentHolder(nonContainmentHolder2v2);
+ leaf1v2.setUuid(leaf1v0.getUuid());
+ group1v2.getChildren().add(leaf1v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the left changes from the merge service or the merge service
+ // will undo them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote())
+ remoteDifferences.add(difference);
+ }
+ MergeService.merge(remoteDifferences, false);
+ }
+
+ // Check results
+ assertEquals(1, group1v1.getChildren().size());
+ assertTrue(group1v1.getChildren().get(0) instanceof Leaf);
+ Leaf leaf = (Leaf)group1v1.getChildren().get(0);
+ assertTrue(leaf.getName().equals("leaf 2"));
+ assertTrue(leaf.getContainmentHolder().getName().equals("holder2"));
+ assertTrue(leaf.getNoncontainmentHolder().getName().equals("non holder2"));
+ assertTrue(leaf.getNumber() == 20);
+ }
+
+ /**
+ * We start out with two children under the main node and then delete one node in the left model and one
+ * node in the right model. The merged model should have both deletes.
+ *
+ * @throws InterruptedException
+ */
+ public void testNonConflictingDeletes() throws InterruptedException {
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf1v0);
+ Leaf leaf2v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v0.setName("leaf 2");
+ leaf2v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf2v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setUuid(leaf1v0.getUuid());
+ group1v1.getChildren().add(leaf1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf2v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v2.setName("leaf 2");
+ leaf2v2.setUuid(leaf2v0.getUuid());
+ group1v2.getChildren().add(leaf2v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the local changes from the merge service or the merge service
+ // will undo them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote())
+ remoteDifferences.add(difference);
+ }
+ MergeService.merge(remoteDifferences, false);
+ }
+
+ // Check results
+ assertEquals(0, group1v1.getChildren().size());
+ }
+
+ /**
+ * This test results in things being removed that shouldn't be.
+ *
+ * @throws InterruptedException
+ */
+ public void testRemoteAddBeforeRemoteRemove() throws InterruptedException {
+ // Build a regular holder
+ Holder holder1v0 = ExternalFactory.eINSTANCE.createHolder();
+ StringHolder holderHolder1v0 = ExternalFactory.eINSTANCE.createStringHolder();
+ holderHolder1v0.setName("holderHolder1");
+ holder1v0.setStringHolder(holderHolder1v0);
+ Holder holder1v1 = ExternalFactory.eINSTANCE.createHolder();
+ StringHolder holderHolder1v1 = ExternalFactory.eINSTANCE.createStringHolder();
+ holderHolder1v1.setName("holderHolder1");
+ holder1v1.setStringHolder(holderHolder1v1);
+ Holder holder1v2 = ExternalFactory.eINSTANCE.createHolder();
+ StringHolder holderHolder1v2 = ExternalFactory.eINSTANCE.createStringHolder();
+ holderHolder1v2.setName("holderHolder1adsfasdfasdfasdf");
+ holder1v2.setStringHolder(holderHolder1v2);
+
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setNumber(10);
+ leaf1v0.setHolder(holder1v0);
+ leaf1v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf1v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setNumber(10);
+ leaf1v1.setHolder(holder1v1);
+ leaf1v1.setUuid(leaf1v0.getUuid());
+ group1v1.getChildren().add(leaf1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 1");
+ leaf1v2.setNumber(10);
+ leaf1v2.setHolder(holder1v2);
+ leaf1v2.setUuid(leaf1v0.getUuid());
+ group1v2.getChildren().add(leaf1v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the local changes from the merge service or the merge service
+ // will undo them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote())
+ remoteDifferences.add(difference);
+ }
+ // Reverse the order
+ // DiffElement temp = remoteDifferences.get(0);
+ // remoteDifferences.set(0, remoteDifferences.get(1));
+ // remoteDifferences.set(1, temp);
+ // Merge
+ MergeService.merge(remoteDifferences, false);
+ }
+
+ assertEquals("holderHolder1adsfasdfasdfasdf", leaf1v1.getHolder().getStringHolder().getName());
+ }
+
+ /**
+ * Here we have a containment non-EMF attribute set to null on "remote" copy. Eclipse Bug #300004
+ *
+ * @throws InterruptedException
+ */
+ public void testNullDifference() throws InterruptedException {
+ // Build non-EMF String Holders
+ NonEMFStringHolder holder1v0 = new NonEMFStringHolder();
+ holder1v0.setString("non-EMF Holder 1");
+ NonEMFStringHolder holder1v1 = new NonEMFStringHolder();
+ holder1v1.setString("non-EMF Holder 1");
+
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setNumber(10);
+ leaf1v0.setNonEMF(holder1v0);
+ leaf1v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf1v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setNumber(10);
+ leaf1v1.setNonEMF(holder1v1);
+ leaf1v1.setUuid(leaf1v0.getUuid());
+ group1v1.getChildren().add(leaf1v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 1");
+ leaf1v2.setNumber(10);
+ leaf1v2.setUuid(leaf1v0.getUuid());
+ group1v2.getChildren().add(leaf1v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+ assertTrue(diff.getDiffModels().size() > 0);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the local changes from the merge service or the merge service
+ // will undo them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote()) // Comment out this line and the test passes
+ remoteDifferences.add(difference);
+ }
+ // Merge
+ MergeService.merge(remoteDifferences, false);
+ }
+
+ assertNull(leaf1v1.getNonEMF());
+ }
+
+ /**
+ * Here we have a containment non-EMF attribute set to null on "remote" copy.
+ *
+ * @throws InterruptedException
+ */
+ public void testNullDifference2() throws InterruptedException {
+ // Build non-EMF String Holders
+ NonEMFStringHolder holder1v0 = new NonEMFStringHolder();
+ holder1v0.setString("non-EMF Holder 1");
+ NonEMFStringHolder holder2v0 = new NonEMFStringHolder();
+ holder2v0.setString("non-EMF Holder 2.22222222");
+ NonEMFStringHolder holder1v1 = new NonEMFStringHolder();
+ holder1v1.setString("non-EMF Holder 1");
+ NonEMFStringHolder holder2v1 = new NonEMFStringHolder();
+ holder2v1.setString("non-EMF Holder 2.22222222");
+ NonEMFStringHolder holder1v2 = new NonEMFStringHolder();
+ NonEMFStringHolder holder2v2 = new NonEMFStringHolder();
+
+ // Resources and Sets
+ UUID uuid = UUID.randomUUID();
+ ResourceSet nodeResourceSetOrig = new ResourceSetImpl();
+ Resource nodeResourceOrig = nodeResourceSetOrig.createResource(URI
+ .createFileURI("/tmp/referenceChange0.nodes"));
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build original model
+ Group group1v0 = NodesFactory.eINSTANCE.createGroup();
+ group1v0.setName("group 1");
+ group1v0.setUuid(uuid);
+ nodeResourceOrig.getContents().add(group1v0);
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setNumber(10);
+ leaf1v0.setNonEMF(holder1v0);
+ leaf1v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf1v0);
+ Leaf leaf2v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v0.setName("leaf 2");
+ leaf2v0.setNumber(20);
+ leaf2v0.setNonEMF(holder2v0);
+ leaf2v0.setUuid(UUID.randomUUID());
+ group1v0.getChildren().add(leaf2v0);
+
+ // Build the left model
+ Group group1v1 = NodesFactory.eINSTANCE.createGroup();
+ group1v1.setName("group 1");
+ group1v1.setUuid(uuid);
+ nodeResource1.getContents().add(group1v1);
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setNumber(10);
+ leaf1v1.setNonEMF(holder1v1);
+ leaf1v1.setUuid(UUID.fromString(leaf1v0.getUuid().toString()));
+ group1v1.getChildren().add(leaf1v1);
+ Leaf leaf2v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v1.setName("leaf 2");
+ leaf2v1.setNumber(20);
+ leaf2v1.setNonEMF(holder2v1);
+ leaf2v1.setUuid(UUID.fromString(leaf2v0.getUuid().toString()));
+ group1v1.getChildren().add(leaf2v1);
+
+ // Build the right model
+ Group group1v2 = NodesFactory.eINSTANCE.createGroup();
+ group1v2.setName("group 1");
+ group1v2.setUuid(uuid);
+ nodeResource2.getContents().add(group1v2);
+ Leaf leaf1v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v2.setName("leaf 1");
+ leaf1v2.setNumber(10);
+ leaf1v2.setNonEMF(holder1v2);
+ leaf1v2.setUuid(UUID.fromString(leaf1v0.getUuid().toString()));
+ group1v2.getChildren().add(leaf1v2);
+ Leaf leaf2v2 = NodesFactory.eINSTANCE.createLeaf();
+ leaf2v2.setName("leaf 2");
+ leaf2v2.setNumber(20);
+ leaf2v2.setNonEMF(holder2v2);
+ leaf2v2.setUuid(UUID.fromString(leaf2v0.getUuid().toString()));
+ group1v2.getChildren().add(leaf2v2);
+
+ // Do the merge test
+ MatchResourceSet match = MatchService.doResourceSetMatch(group1v1.eResource().getResourceSet(),
+ group1v2.eResource().getResourceSet(), group1v0.eResource().getResourceSet(),
+ Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, true);
+ assertTrue(diff.getDiffModels().size() > 0);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ List<DiffElement> remoteDifferences = new ArrayList<DiffElement>(differences.size());
+ // Merging right to left, so hide the local changes from the merge service or the merge service
+ // will undo them!
+ for (DiffElement difference : differences) {
+ if (difference.isRemote()) // Comment out this line and the test passes
+ remoteDifferences.add(difference);
+ }
+ // Merge
+ MergeService.merge(remoteDifferences, false);
+ }
+ // Check
+ assertNull(leaf2v1.getNonEMF().getString());
+ assertNull(leaf1v1.getNonEMF().getString());
+ }
+
+ /**
+ * This test tries to reproduce a problem where a nest change to containment references causes a
+ * non-containment reference to disappear. This is a two way comparison, not a three way.
+ *
+ * @throws InterruptedException
+ */
+ public void testDisappearingNoncontainmentReference() throws InterruptedException {
+ // Resources and Sets
+ ResourceSet nodeResourceSet1 = new ResourceSetImpl();
+ Resource nodeResource1 = nodeResourceSet1.createResource(URI
+ .createFileURI("/tmp/referenceChange1.nodes"));
+ ResourceSet nodeResourceSet2 = new ResourceSetImpl();
+ Resource nodeResource2 = nodeResourceSet2.createResource(URI
+ .createFileURI("/tmp/referenceChange2.nodes"));
+
+ // Build the left holder
+ ResourceSet nonHolderResourceSet = new ResourceSetImpl();
+ Resource nonHolder1Resource = nonHolderResourceSet.createResource(URI
+ .createFileURI("/tmp/holder1asdfasdfasdfasdfasdfasdfadsfasdfasdfasdfasdfasdfasdfasdf")); // Makes
+ // the
+ // URI
+ // Similarity
+ // not
+ // cause
+ // problems
+ StringHolder nonHolder1 = ExternalFactory.eINSTANCE.createStringHolder();
+ String nonHolderName = "non-holder1";
+ nonHolder1.setName(nonHolderName);
+ nonHolder1Resource.getContents().add(nonHolder1);
+
+ // Build contained holders
+ StringHolder holder1v0 = ExternalFactory.eINSTANCE.createStringHolder();
+ holder1v0.setName("holder 1");
+ StringHolder holder1v1 = ExternalFactory.eINSTANCE.createStringHolder();
+ String name2 = "something completely different";
+ holder1v1.setName(name2);
+ // Build the noncontainment holder
+ NoncontainmentHolder noncontainmentHolder1v0 = ExternalFactory.eINSTANCE.createNoncontainmentHolder();
+ NoncontainmentHolder noncontainmentHolder1v1 = ExternalFactory.eINSTANCE.createNoncontainmentHolder();
+ noncontainmentHolder1v0.setStringHolder(nonHolder1);
+ noncontainmentHolder1v1.setStringHolder(nonHolder1);
+ // The code commented out below makes this unit test pass
+ // Resource nonHolder2Resource =
+ // nonHolderResourceSet.createResource(URI.createFileURI("/tmp/holder1asdfasdfasdfasdfasdfasdfa")); //
+ // Makes the URI Similarity not cause problems
+ // Resource nonHolder3Resource =
+ // nonHolderResourceSet.createResource(URI.createFileURI("/tmp/holder1asdfasdfasdfkjljlkjlkjlkjlkjsdfasdfasdfasdf"));
+ // // Makes the URI Similarity not cause problems
+ // HolderHolder holderHolder0 = ExternalFactory.eINSTANCE.createHolderHolder();
+ // HolderHolder holderHolder1 = ExternalFactory.eINSTANCE.createHolderHolder();
+ // holderHolder0.setHolder(noncontainmentHolder1v0);
+ // holderHolder1.setHolder(noncontainmentHolder1v1);
+ // nonHolder2Resource.getContents().add(holderHolder0);
+ // nonHolder3Resource.getContents().add(holderHolder1);
+
+ // Build the initial (left) model.
+ Leaf leaf1v0 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v0.setName("leaf 1");
+ leaf1v0.setNoncontainmentNoncontainmentHolder(noncontainmentHolder1v0);
+ leaf1v0.setContainmentHolder(holder1v0);
+ leaf1v0.setUuid(UUID.randomUUID());
+ nodeResource1.getContents().add(leaf1v0);
+
+ // Build the new (right) model.
+ Leaf leaf1v1 = NodesFactory.eINSTANCE.createLeaf();
+ leaf1v1.setName("leaf 1");
+ leaf1v1.setNoncontainmentNoncontainmentHolder(noncontainmentHolder1v1);
+ leaf1v1.setContainmentHolder(holder1v1);
+ leaf1v1.setUuid(leaf1v0.getUuid());
+ nodeResource2.getContents().add(leaf1v1);
+
+ // Merge and cry havoc!
+ MatchResourceSet match = MatchService.doResourceSetMatch(leaf1v0.eResource().getResourceSet(),
+ leaf1v1.eResource().getResourceSet(), Collections.<String, Object> emptyMap());
+ DiffResourceSet diff = DiffService.doDiff(match, false);
+ assertTrue(diff.getDiffModels().size() > 0);
+
+ for (DiffModel resourceDiff : diff.getDiffModels()) {
+ List<DiffElement> differences = new ArrayList<DiffElement>(resourceDiff.getDifferences());
+ MergeService.merge(differences, false);
+ }
+ // Check
+ assertTrue(name2.equals(leaf1v0.getContainmentHolder().getName()));
+ assertNotNull(leaf1v0.getNoncontainmentNoncontainmentHolder());
+ assertNotNull(leaf1v0.getNoncontainmentNoncontainmentHolder().getStringHolder());
+ assertTrue(nonHolderName.equals(leaf1v0.getNoncontainmentNoncontainmentHolder().getStringHolder()
+ .getName()));
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ try {
+ final File temporaryFolder = new File(getTemporaryDataAbsolutePath());
+ if (temporaryFolder.exists() && temporaryFolder.isDirectory()) {
+ deleteAllChildren(temporaryFolder);
+ }
+ } catch (IOException e) {
+ // swallow
+ }
+ super.tearDown();
+ }
+
+ private void deleteAllChildren(File folder) {
+ for (File child : folder.listFiles()) {
+ if (child.isDirectory())
+ deleteAllChildren(child);
+ child.delete();
+ }
+ }
+
+ private String getTemporaryDataAbsolutePath() throws IOException {
+ return FileLocator.toFileURL(
+ EMFCompareTestPlugin.getDefault().getBundle().getEntry(TEMPORARY_DATA_FOLDER)).getFile();
+
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalFactory.java
new file mode 100644
index 000000000..5218e2767
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalFactory.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage
+ * @generated
+ */
+public interface ExternalFactory extends EFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ExternalFactory eINSTANCE = org.eclipse.emf.compare.tests.external.impl.ExternalFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>String Holder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>String Holder</em>'.
+ * @generated
+ */
+ StringHolder createStringHolder();
+
+ /**
+ * Returns a new object of class '<em>Holder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Holder</em>'.
+ * @generated
+ */
+ Holder createHolder();
+
+ /**
+ * Returns a new object of class '<em>Noncontainment Holder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Noncontainment Holder</em>'.
+ * @generated
+ */
+ NoncontainmentHolder createNoncontainmentHolder();
+
+ /**
+ * Returns a new object of class '<em>Holder Holder</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Holder Holder</em>'.
+ * @generated
+ */
+ HolderHolder createHolderHolder();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ExternalPackage getExternalPackage();
+
+} //ExternalFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalPackage.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalPackage.java
new file mode 100644
index 000000000..97df7fece
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/ExternalPackage.java
@@ -0,0 +1,366 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.ExternalFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ExternalPackage extends EPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "external"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "externalURI"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "compare.tests.external"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ExternalPackage eINSTANCE = org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.external.impl.StringHolderImpl <em>String Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.StringHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getStringHolder()
+ * @generated
+ */
+ int STRING_HOLDER = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_HOLDER__NAME = 0;
+
+ /**
+ * The number of structural features of the '<em>String Holder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRING_HOLDER_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.external.impl.HolderImpl <em>Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.HolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getHolder()
+ * @generated
+ */
+ int HOLDER = 1;
+
+ /**
+ * The feature id for the '<em><b>String Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HOLDER__STRING_HOLDER = 0;
+
+ /**
+ * The number of structural features of the '<em>Holder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HOLDER_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.external.impl.NoncontainmentHolderImpl <em>Noncontainment Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.NoncontainmentHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getNoncontainmentHolder()
+ * @generated
+ */
+ int NONCONTAINMENT_HOLDER = 2;
+
+ /**
+ * The feature id for the '<em><b>String Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NONCONTAINMENT_HOLDER__STRING_HOLDER = 0;
+
+ /**
+ * The number of structural features of the '<em>Noncontainment Holder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NONCONTAINMENT_HOLDER_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.external.impl.HolderHolderImpl <em>Holder Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.HolderHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getHolderHolder()
+ * @generated
+ */
+ int HOLDER_HOLDER = 3;
+
+ /**
+ * The feature id for the '<em><b>Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HOLDER_HOLDER__HOLDER = 0;
+
+ /**
+ * The number of structural features of the '<em>Holder Holder</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int HOLDER_HOLDER_FEATURE_COUNT = 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.external.StringHolder <em>String Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>String Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.StringHolder
+ * @generated
+ */
+ EClass getStringHolder();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.external.StringHolder#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.compare.tests.external.StringHolder#getName()
+ * @see #getStringHolder()
+ * @generated
+ */
+ EAttribute getStringHolder_Name();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.external.Holder <em>Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.Holder
+ * @generated
+ */
+ EClass getHolder();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.external.Holder#getStringHolder <em>String Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>String Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.Holder#getStringHolder()
+ * @see #getHolder()
+ * @generated
+ */
+ EReference getHolder_StringHolder();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.external.NoncontainmentHolder <em>Noncontainment Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Noncontainment Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.NoncontainmentHolder
+ * @generated
+ */
+ EClass getNoncontainmentHolder();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.compare.tests.external.NoncontainmentHolder#getStringHolder <em>String Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>String Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.NoncontainmentHolder#getStringHolder()
+ * @see #getNoncontainmentHolder()
+ * @generated
+ */
+ EReference getNoncontainmentHolder_StringHolder();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.external.HolderHolder <em>Holder Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Holder Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.HolderHolder
+ * @generated
+ */
+ EClass getHolderHolder();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.external.HolderHolder#getHolder <em>Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.external.HolderHolder#getHolder()
+ * @see #getHolderHolder()
+ * @generated
+ */
+ EReference getHolderHolder_Holder();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ ExternalFactory getExternalFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.external.impl.StringHolderImpl <em>String Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.StringHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getStringHolder()
+ * @generated
+ */
+ EClass STRING_HOLDER = eINSTANCE.getStringHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STRING_HOLDER__NAME = eINSTANCE.getStringHolder_Name();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.external.impl.HolderImpl <em>Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.HolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getHolder()
+ * @generated
+ */
+ EClass HOLDER = eINSTANCE.getHolder();
+
+ /**
+ * The meta object literal for the '<em><b>String Holder</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference HOLDER__STRING_HOLDER = eINSTANCE.getHolder_StringHolder();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.external.impl.NoncontainmentHolderImpl <em>Noncontainment Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.NoncontainmentHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getNoncontainmentHolder()
+ * @generated
+ */
+ EClass NONCONTAINMENT_HOLDER = eINSTANCE.getNoncontainmentHolder();
+
+ /**
+ * The meta object literal for the '<em><b>String Holder</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NONCONTAINMENT_HOLDER__STRING_HOLDER = eINSTANCE.getNoncontainmentHolder_StringHolder();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.external.impl.HolderHolderImpl <em>Holder Holder</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.impl.HolderHolderImpl
+ * @see org.eclipse.emf.compare.tests.external.impl.ExternalPackageImpl#getHolderHolder()
+ * @generated
+ */
+ EClass HOLDER_HOLDER = eINSTANCE.getHolderHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Holder</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference HOLDER_HOLDER__HOLDER = eINSTANCE.getHolderHolder_Holder();
+
+ }
+
+} //ExternalPackage
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/Holder.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/Holder.java
new file mode 100644
index 000000000..de43fff71
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/Holder.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Holder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.Holder#getStringHolder <em>String Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getHolder()
+ * @model
+ * @generated
+ */
+public interface Holder extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>String Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>String Holder</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>String Holder</em>' containment reference.
+ * @see #setStringHolder(StringHolder)
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getHolder_StringHolder()
+ * @model containment="true"
+ * @generated
+ */
+ StringHolder getStringHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.external.Holder#getStringHolder <em>String Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>String Holder</em>' containment reference.
+ * @see #getStringHolder()
+ * @generated
+ */
+ void setStringHolder(StringHolder value);
+
+} // Holder
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/HolderHolder.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/HolderHolder.java
new file mode 100644
index 000000000..cd1a9d626
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/HolderHolder.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Holder Holder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.HolderHolder#getHolder <em>Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getHolderHolder()
+ * @model
+ * @generated
+ */
+public interface HolderHolder extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Holder</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Holder</em>' containment reference.
+ * @see #setHolder(NoncontainmentHolder)
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getHolderHolder_Holder()
+ * @model containment="true"
+ * @generated
+ */
+ NoncontainmentHolder getHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.external.HolderHolder#getHolder <em>Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Holder</em>' containment reference.
+ * @see #getHolder()
+ * @generated
+ */
+ void setHolder(NoncontainmentHolder value);
+
+} // HolderHolder
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/NoncontainmentHolder.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/NoncontainmentHolder.java
new file mode 100644
index 000000000..0731a47ea
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/NoncontainmentHolder.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Noncontainment Holder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.NoncontainmentHolder#getStringHolder <em>String Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getNoncontainmentHolder()
+ * @model
+ * @generated
+ */
+public interface NoncontainmentHolder extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>String Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>String Holder</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>String Holder</em>' reference.
+ * @see #setStringHolder(StringHolder)
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getNoncontainmentHolder_StringHolder()
+ * @model
+ * @generated
+ */
+ StringHolder getStringHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.external.NoncontainmentHolder#getStringHolder <em>String Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>String Holder</em>' reference.
+ * @see #getStringHolder()
+ * @generated
+ */
+ void setStringHolder(StringHolder value);
+
+} // NoncontainmentHolder
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/StringHolder.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/StringHolder.java
new file mode 100644
index 000000000..5b9254b94
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/StringHolder.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>String Holder</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.StringHolder#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getStringHolder()
+ * @model
+ * @generated
+ */
+public interface StringHolder extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#getStringHolder_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.external.StringHolder#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // StringHolder
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalFactoryImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalFactoryImpl.java
new file mode 100644
index 000000000..2d92ba1fe
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalFactoryImpl.java
@@ -0,0 +1,143 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.compare.tests.external.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ExternalFactoryImpl extends EFactoryImpl implements ExternalFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ExternalFactory init() {
+ try {
+ ExternalFactory theExternalFactory = (ExternalFactory)EPackage.Registry.INSTANCE.getEFactory("externalURI"); //$NON-NLS-1$
+ if (theExternalFactory != null) {
+ return theExternalFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ExternalFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ExternalPackage.STRING_HOLDER: return createStringHolder();
+ case ExternalPackage.HOLDER: return createHolder();
+ case ExternalPackage.NONCONTAINMENT_HOLDER: return createNoncontainmentHolder();
+ case ExternalPackage.HOLDER_HOLDER: return createHolderHolder();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder createStringHolder() {
+ StringHolderImpl stringHolder = new StringHolderImpl();
+ return stringHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Holder createHolder() {
+ HolderImpl holder = new HolderImpl();
+ return holder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NoncontainmentHolder createNoncontainmentHolder() {
+ NoncontainmentHolderImpl noncontainmentHolder = new NoncontainmentHolderImpl();
+ return noncontainmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public HolderHolder createHolderHolder() {
+ HolderHolderImpl holderHolder = new HolderHolderImpl();
+ return holderHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalPackage getExternalPackage() {
+ return (ExternalPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ExternalPackage getPackage() {
+ return ExternalPackage.eINSTANCE;
+ }
+
+} //ExternalFactoryImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalPackageImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalPackageImpl.java
new file mode 100644
index 000000000..46d8f74c5
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/ExternalPackageImpl.java
@@ -0,0 +1,289 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.compare.tests.external.ExternalFactory;
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+import org.eclipse.emf.compare.tests.external.Holder;
+import org.eclipse.emf.compare.tests.external.HolderHolder;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ExternalPackageImpl extends EPackageImpl implements ExternalPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stringHolderEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass holderEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass noncontainmentHolderEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass holderHolderEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ExternalPackageImpl() {
+ super(eNS_URI, ExternalFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link ExternalPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static ExternalPackage init() {
+ if (isInited) return (ExternalPackage)EPackage.Registry.INSTANCE.getEPackage(ExternalPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ExternalPackageImpl theExternalPackage = (ExternalPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ExternalPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ExternalPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theExternalPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theExternalPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theExternalPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ExternalPackage.eNS_URI, theExternalPackage);
+ return theExternalPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStringHolder() {
+ return stringHolderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getStringHolder_Name() {
+ return (EAttribute)stringHolderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getHolder() {
+ return holderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getHolder_StringHolder() {
+ return (EReference)holderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNoncontainmentHolder() {
+ return noncontainmentHolderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNoncontainmentHolder_StringHolder() {
+ return (EReference)noncontainmentHolderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getHolderHolder() {
+ return holderHolderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getHolderHolder_Holder() {
+ return (EReference)holderHolderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalFactory getExternalFactory() {
+ return (ExternalFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ stringHolderEClass = createEClass(STRING_HOLDER);
+ createEAttribute(stringHolderEClass, STRING_HOLDER__NAME);
+
+ holderEClass = createEClass(HOLDER);
+ createEReference(holderEClass, HOLDER__STRING_HOLDER);
+
+ noncontainmentHolderEClass = createEClass(NONCONTAINMENT_HOLDER);
+ createEReference(noncontainmentHolderEClass, NONCONTAINMENT_HOLDER__STRING_HOLDER);
+
+ holderHolderEClass = createEClass(HOLDER_HOLDER);
+ createEReference(holderHolderEClass, HOLDER_HOLDER__HOLDER);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(stringHolderEClass, StringHolder.class, "StringHolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getStringHolder_Name(), ecorePackage.getEString(), "name", null, 0, 1, StringHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(holderEClass, Holder.class, "Holder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getHolder_StringHolder(), this.getStringHolder(), null, "stringHolder", null, 0, 1, Holder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(noncontainmentHolderEClass, NoncontainmentHolder.class, "NoncontainmentHolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getNoncontainmentHolder_StringHolder(), this.getStringHolder(), null, "stringHolder", null, 0, 1, NoncontainmentHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(holderHolderEClass, HolderHolder.class, "HolderHolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getHolderHolder_Holder(), this.getNoncontainmentHolder(), null, "holder", null, 0, 1, HolderHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //ExternalPackageImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderHolderImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderHolderImpl.java
new file mode 100644
index 000000000..04518b05d
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderHolderImpl.java
@@ -0,0 +1,191 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+import org.eclipse.emf.compare.tests.external.HolderHolder;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Holder Holder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.impl.HolderHolderImpl#getHolder <em>Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class HolderHolderImpl extends EObjectImpl implements HolderHolder {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getHolder() <em>Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHolder()
+ * @generated
+ * @ordered
+ */
+ protected NoncontainmentHolder holder;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected HolderHolderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExternalPackage.Literals.HOLDER_HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NoncontainmentHolder getHolder() {
+ return holder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetHolder(NoncontainmentHolder newHolder, NotificationChain msgs) {
+ NoncontainmentHolder oldHolder = holder;
+ holder = newHolder;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExternalPackage.HOLDER_HOLDER__HOLDER, oldHolder, newHolder);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHolder(NoncontainmentHolder newHolder) {
+ if (newHolder != holder) {
+ NotificationChain msgs = null;
+ if (holder != null)
+ msgs = ((InternalEObject)holder).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExternalPackage.HOLDER_HOLDER__HOLDER, null, msgs);
+ if (newHolder != null)
+ msgs = ((InternalEObject)newHolder).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExternalPackage.HOLDER_HOLDER__HOLDER, null, msgs);
+ msgs = basicSetHolder(newHolder, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExternalPackage.HOLDER_HOLDER__HOLDER, newHolder, newHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER_HOLDER__HOLDER:
+ return basicSetHolder(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER_HOLDER__HOLDER:
+ return getHolder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER_HOLDER__HOLDER:
+ setHolder((NoncontainmentHolder)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER_HOLDER__HOLDER:
+ setHolder((NoncontainmentHolder)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER_HOLDER__HOLDER:
+ return holder != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //HolderHolderImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderImpl.java
new file mode 100644
index 000000000..b8c58de72
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/HolderImpl.java
@@ -0,0 +1,191 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+import org.eclipse.emf.compare.tests.external.Holder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Holder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.impl.HolderImpl#getStringHolder <em>String Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class HolderImpl extends EObjectImpl implements Holder {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getStringHolder() <em>String Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStringHolder()
+ * @generated
+ * @ordered
+ */
+ protected StringHolder stringHolder;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected HolderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExternalPackage.Literals.HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder getStringHolder() {
+ return stringHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetStringHolder(StringHolder newStringHolder, NotificationChain msgs) {
+ StringHolder oldStringHolder = stringHolder;
+ stringHolder = newStringHolder;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ExternalPackage.HOLDER__STRING_HOLDER, oldStringHolder, newStringHolder);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStringHolder(StringHolder newStringHolder) {
+ if (newStringHolder != stringHolder) {
+ NotificationChain msgs = null;
+ if (stringHolder != null)
+ msgs = ((InternalEObject)stringHolder).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ExternalPackage.HOLDER__STRING_HOLDER, null, msgs);
+ if (newStringHolder != null)
+ msgs = ((InternalEObject)newStringHolder).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ExternalPackage.HOLDER__STRING_HOLDER, null, msgs);
+ msgs = basicSetStringHolder(newStringHolder, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExternalPackage.HOLDER__STRING_HOLDER, newStringHolder, newStringHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER__STRING_HOLDER:
+ return basicSetStringHolder(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER__STRING_HOLDER:
+ return getStringHolder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER__STRING_HOLDER:
+ setStringHolder((StringHolder)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER__STRING_HOLDER:
+ setStringHolder((StringHolder)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.HOLDER__STRING_HOLDER:
+ return stringHolder != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //HolderImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/NoncontainmentHolderImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/NoncontainmentHolderImpl.java
new file mode 100644
index 000000000..98824423e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/NoncontainmentHolderImpl.java
@@ -0,0 +1,172 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Noncontainment Holder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.impl.NoncontainmentHolderImpl#getStringHolder <em>String Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NoncontainmentHolderImpl extends EObjectImpl implements NoncontainmentHolder {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getStringHolder() <em>String Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStringHolder()
+ * @generated
+ * @ordered
+ */
+ protected StringHolder stringHolder;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NoncontainmentHolderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExternalPackage.Literals.NONCONTAINMENT_HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder getStringHolder() {
+ if (stringHolder != null && stringHolder.eIsProxy()) {
+ InternalEObject oldStringHolder = (InternalEObject)stringHolder;
+ stringHolder = (StringHolder)eResolveProxy(oldStringHolder);
+ if (stringHolder != oldStringHolder) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER, oldStringHolder, stringHolder));
+ }
+ }
+ return stringHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder basicGetStringHolder() {
+ return stringHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStringHolder(StringHolder newStringHolder) {
+ StringHolder oldStringHolder = stringHolder;
+ stringHolder = newStringHolder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER, oldStringHolder, stringHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER:
+ if (resolve) return getStringHolder();
+ return basicGetStringHolder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER:
+ setStringHolder((StringHolder)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER:
+ setStringHolder((StringHolder)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.NONCONTAINMENT_HOLDER__STRING_HOLDER:
+ return stringHolder != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //NoncontainmentHolderImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/StringHolderImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/StringHolderImpl.java
new file mode 100644
index 000000000..0bcf2d95f
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/impl/StringHolderImpl.java
@@ -0,0 +1,178 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>String Holder</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.external.impl.StringHolderImpl#getName <em>Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StringHolderImpl extends EObjectImpl implements StringHolder {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StringHolderImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ExternalPackage.Literals.STRING_HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ExternalPackage.STRING_HOLDER__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ExternalPackage.STRING_HOLDER__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ExternalPackage.STRING_HOLDER__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.STRING_HOLDER__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ExternalPackage.STRING_HOLDER__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StringHolderImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalAdapterFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalAdapterFactory.java
new file mode 100644
index 000000000..ccaf4c686
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalAdapterFactory.java
@@ -0,0 +1,189 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.compare.tests.external.*;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage
+ * @generated
+ */
+public class ExternalAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ExternalPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ExternalPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExternalSwitch<Adapter> modelSwitch =
+ new ExternalSwitch<Adapter>() {
+ @Override
+ public Adapter caseStringHolder(StringHolder object) {
+ return createStringHolderAdapter();
+ }
+ @Override
+ public Adapter caseHolder(Holder object) {
+ return createHolderAdapter();
+ }
+ @Override
+ public Adapter caseNoncontainmentHolder(NoncontainmentHolder object) {
+ return createNoncontainmentHolderAdapter();
+ }
+ @Override
+ public Adapter caseHolderHolder(HolderHolder object) {
+ return createHolderHolderAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.external.StringHolder <em>String Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.external.StringHolder
+ * @generated
+ */
+ public Adapter createStringHolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.external.Holder <em>Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.external.Holder
+ * @generated
+ */
+ public Adapter createHolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.external.NoncontainmentHolder <em>Noncontainment Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.external.NoncontainmentHolder
+ * @generated
+ */
+ public Adapter createNoncontainmentHolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.external.HolderHolder <em>Holder Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.external.HolderHolder
+ * @generated
+ */
+ public Adapter createHolderHolderAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //ExternalAdapterFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalSwitch.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalSwitch.java
new file mode 100644
index 000000000..4b31434fa
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/external/util/ExternalSwitch.java
@@ -0,0 +1,204 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.external.util;
+
+import java.util.List;
+
+import org.eclipse.emf.compare.tests.external.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.external.ExternalPackage
+ * @generated
+ */
+public class ExternalSwitch<T> {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ExternalPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExternalSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ExternalPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ExternalPackage.STRING_HOLDER: {
+ StringHolder stringHolder = (StringHolder)theEObject;
+ T result = caseStringHolder(stringHolder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ExternalPackage.HOLDER: {
+ Holder holder = (Holder)theEObject;
+ T result = caseHolder(holder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ExternalPackage.NONCONTAINMENT_HOLDER: {
+ NoncontainmentHolder noncontainmentHolder = (NoncontainmentHolder)theEObject;
+ T result = caseNoncontainmentHolder(noncontainmentHolder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ExternalPackage.HOLDER_HOLDER: {
+ HolderHolder holderHolder = (HolderHolder)theEObject;
+ T result = caseHolderHolder(holderHolder);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>String Holder</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>String Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStringHolder(StringHolder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Holder</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHolder(Holder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Noncontainment Holder</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Noncontainment Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNoncontainmentHolder(NoncontainmentHolder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Holder Holder</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Holder Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseHolderHolder(HolderHolder object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //ExternalSwitch
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/match/NodeMatchEngine.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/match/NodeMatchEngine.java
new file mode 100644
index 000000000..c034fb870
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/match/NodeMatchEngine.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.match;
+
+import org.eclipse.emf.compare.FactoryException;
+import org.eclipse.emf.compare.match.engine.GenericMatchEngine;
+import org.eclipse.emf.compare.tests.nodes.Node;
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * Matches using UUIDs for nodes
+ * @author smccants
+ *
+ */
+public class NodeMatchEngine extends GenericMatchEngine
+{
+ @Override
+ protected boolean isSimilar(EObject obj1, EObject obj2) throws FactoryException
+ {
+ if(obj1 instanceof Node && obj2 instanceof Node)
+ {
+ Node node1 = (Node) obj1;
+ Node node2 = (Node) obj2;
+ return node1.getUuid().equals(node2.getUuid());
+ }
+ else
+ return super.isSimilar(obj1, obj2);
+ }
+}
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Group.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Group.java
new file mode 100644
index 000000000..b40835087
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Group.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Group</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Group#getChildren <em>Children</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getGroup()
+ * @model
+ * @generated
+ */
+public interface Group extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Children</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Children</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Children</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getGroup_Children()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Node> getChildren();
+
+} // Group
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Leaf.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Leaf.java
new file mode 100644
index 000000000..921165051
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Leaf.java
@@ -0,0 +1,204 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes;
+
+import org.eclipse.emf.compare.tests.external.Holder;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Leaf</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentHolder <em>Noncontainment Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getContainmentHolder <em>Containment Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNumber <em>Number</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getHolder <em>Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNonEMF <em>Non EMF</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentNoncontainmentHolder <em>Noncontainment Noncontainment Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf()
+ * @model
+ * @generated
+ */
+public interface Leaf extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Noncontainment Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Noncontainment Holder</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Noncontainment Holder</em>' reference.
+ * @see #setNoncontainmentHolder(StringHolder)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_NoncontainmentHolder()
+ * @model
+ * @generated
+ */
+ StringHolder getNoncontainmentHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentHolder <em>Noncontainment Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Noncontainment Holder</em>' reference.
+ * @see #getNoncontainmentHolder()
+ * @generated
+ */
+ void setNoncontainmentHolder(StringHolder value);
+
+ /**
+ * Returns the value of the '<em><b>Containment Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Holder</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Containment Holder</em>' containment reference.
+ * @see #setContainmentHolder(StringHolder)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_ContainmentHolder()
+ * @model containment="true"
+ * @generated
+ */
+ StringHolder getContainmentHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getContainmentHolder <em>Containment Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Containment Holder</em>' containment reference.
+ * @see #getContainmentHolder()
+ * @generated
+ */
+ void setContainmentHolder(StringHolder value);
+
+ /**
+ * Returns the value of the '<em><b>Number</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Number</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Number</em>' attribute.
+ * @see #setNumber(int)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_Number()
+ * @model
+ * @generated
+ */
+ int getNumber();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNumber <em>Number</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Number</em>' attribute.
+ * @see #getNumber()
+ * @generated
+ */
+ void setNumber(int value);
+
+ /**
+ * Returns the value of the '<em><b>Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Holder</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Holder</em>' containment reference.
+ * @see #setHolder(Holder)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_Holder()
+ * @model containment="true"
+ * @generated
+ */
+ Holder getHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getHolder <em>Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Holder</em>' containment reference.
+ * @see #getHolder()
+ * @generated
+ */
+ void setHolder(Holder value);
+
+ /**
+ * Returns the value of the '<em><b>Non EMF</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Non EMF</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Non EMF</em>' attribute.
+ * @see #setNonEMF(NonEMFStringHolder)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_NonEMF()
+ * @model dataType="org.eclipse.emf.compare.tests.nodes.NonEMFStringHolder"
+ * @generated
+ */
+ NonEMFStringHolder getNonEMF();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNonEMF <em>Non EMF</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Non EMF</em>' attribute.
+ * @see #getNonEMF()
+ * @generated
+ */
+ void setNonEMF(NonEMFStringHolder value);
+
+ /**
+ * Returns the value of the '<em><b>Noncontainment Noncontainment Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Noncontainment Noncontainment Holder</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Noncontainment Noncontainment Holder</em>' reference.
+ * @see #setNoncontainmentNoncontainmentHolder(NoncontainmentHolder)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getLeaf_NoncontainmentNoncontainmentHolder()
+ * @model
+ * @generated
+ */
+ NoncontainmentHolder getNoncontainmentNoncontainmentHolder();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentNoncontainmentHolder <em>Noncontainment Noncontainment Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Noncontainment Noncontainment Holder</em>' reference.
+ * @see #getNoncontainmentNoncontainmentHolder()
+ * @generated
+ */
+ void setNoncontainmentNoncontainmentHolder(NoncontainmentHolder value);
+
+} // Leaf
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java
new file mode 100644
index 000000000..932de5eae
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes;
+
+import java.util.UUID;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.Node#getUuid <em>Uuid</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode()
+ * @model
+ * @generated
+ */
+public interface Node extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Uuid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Uuid</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Uuid</em>' attribute.
+ * @see #setUuid(UUID)
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_Uuid()
+ * @model dataType="org.eclipse.emf.compare.tests.nodes.UUID"
+ * @generated
+ */
+ UUID getUuid();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Node#getUuid <em>Uuid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Uuid</em>' attribute.
+ * @see #getUuid()
+ * @generated
+ */
+ void setUuid(UUID value);
+
+} // Node
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java
new file mode 100644
index 000000000..1013a0c2e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage
+ * @generated
+ */
+public interface NodesFactory extends EFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ NodesFactory eINSTANCE = org.eclipse.emf.compare.tests.nodes.impl.NodesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Group</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Group</em>'.
+ * @generated
+ */
+ Group createGroup();
+
+ /**
+ * Returns a new object of class '<em>Leaf</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Leaf</em>'.
+ * @generated
+ */
+ Leaf createLeaf();
+
+ /**
+ * Returns a new object of class '<em>Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node</em>'.
+ * @generated
+ */
+ Node createNode();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ NodesPackage getNodesPackage();
+
+} //NodesFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java
new file mode 100644
index 000000000..9f5ed7bff
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java
@@ -0,0 +1,566 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.NodesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface NodesPackage extends EPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "nodes"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "namespaceURI"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "compare.tests"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ NodesPackage eINSTANCE = org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodeImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNode()
+ * @generated
+ */
+ int NODE = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Uuid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__UUID = 1;
+
+ /**
+ * The number of structural features of the '<em>Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.GroupImpl <em>Group</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.GroupImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getGroup()
+ * @generated
+ */
+ int GROUP = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Uuid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP__UUID = NODE__UUID;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP__CHILDREN = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Group</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROUP_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl <em>Leaf</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.LeafImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getLeaf()
+ * @generated
+ */
+ int LEAF = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Uuid</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__UUID = NODE__UUID;
+
+ /**
+ * The feature id for the '<em><b>Noncontainment Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__NONCONTAINMENT_HOLDER = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Containment Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__CONTAINMENT_HOLDER = NODE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Number</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__NUMBER = NODE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Holder</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__HOLDER = NODE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Non EMF</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__NON_EMF = NODE_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Noncontainment Noncontainment Holder</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER = NODE_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Leaf</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LEAF_FEATURE_COUNT = NODE_FEATURE_COUNT + 6;
+
+ /**
+ * The meta object id for the '<em>UUID</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.UUID
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getUUID()
+ * @generated
+ */
+ int UUID = 3;
+
+ /**
+ * The meta object id for the '<em>Non EMF String Holder</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNonEMFStringHolder()
+ * @generated
+ */
+ int NON_EMF_STRING_HOLDER = 4;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.Group <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Group</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Group
+ * @generated
+ */
+ EClass getGroup();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.nodes.Group#getChildren <em>Children</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Group#getChildren()
+ * @see #getGroup()
+ * @generated
+ */
+ EReference getGroup_Children();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.Leaf <em>Leaf</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Leaf</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf
+ * @generated
+ */
+ EClass getLeaf();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentHolder <em>Noncontainment Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Noncontainment Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentHolder()
+ * @see #getLeaf()
+ * @generated
+ */
+ EReference getLeaf_NoncontainmentHolder();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getContainmentHolder <em>Containment Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Containment Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getContainmentHolder()
+ * @see #getLeaf()
+ * @generated
+ */
+ EReference getLeaf_ContainmentHolder();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNumber <em>Number</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Number</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getNumber()
+ * @see #getLeaf()
+ * @generated
+ */
+ EAttribute getLeaf_Number();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getHolder <em>Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getHolder()
+ * @see #getLeaf()
+ * @generated
+ */
+ EReference getLeaf_Holder();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNonEMF <em>Non EMF</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Non EMF</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getNonEMF()
+ * @see #getLeaf()
+ * @generated
+ */
+ EAttribute getLeaf_NonEMF();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentNoncontainmentHolder <em>Noncontainment Noncontainment Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Noncontainment Noncontainment Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf#getNoncontainmentNoncontainmentHolder()
+ * @see #getLeaf()
+ * @generated
+ */
+ EReference getLeaf_NoncontainmentNoncontainmentHolder();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.Node <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Node
+ * @generated
+ */
+ EClass getNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.nodes.Node#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Node#getName()
+ * @see #getNode()
+ * @generated
+ */
+ EAttribute getNode_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.nodes.Node#getUuid <em>Uuid</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Uuid</em>'.
+ * @see org.eclipse.emf.compare.tests.nodes.Node#getUuid()
+ * @see #getNode()
+ * @generated
+ */
+ EAttribute getNode_Uuid();
+
+ /**
+ * Returns the meta object for data type '{@link java.util.UUID <em>UUID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>UUID</em>'.
+ * @see java.util.UUID
+ * @model instanceClass="java.util.UUID"
+ * @generated
+ */
+ EDataType getUUID();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder <em>Non EMF String Holder</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Non EMF String Holder</em>'.
+ * @see org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder
+ * @model instanceClass="org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder"
+ * @generated
+ */
+ EDataType getNonEMFStringHolder();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ NodesFactory getNodesFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.GroupImpl <em>Group</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.GroupImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getGroup()
+ * @generated
+ */
+ EClass GROUP = eINSTANCE.getGroup();
+
+ /**
+ * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GROUP__CHILDREN = eINSTANCE.getGroup_Children();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl <em>Leaf</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.LeafImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getLeaf()
+ * @generated
+ */
+ EClass LEAF = eINSTANCE.getLeaf();
+
+ /**
+ * The meta object literal for the '<em><b>Noncontainment Holder</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LEAF__NONCONTAINMENT_HOLDER = eINSTANCE.getLeaf_NoncontainmentHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Containment Holder</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LEAF__CONTAINMENT_HOLDER = eINSTANCE.getLeaf_ContainmentHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Number</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LEAF__NUMBER = eINSTANCE.getLeaf_Number();
+
+ /**
+ * The meta object literal for the '<em><b>Holder</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LEAF__HOLDER = eINSTANCE.getLeaf_Holder();
+
+ /**
+ * The meta object literal for the '<em><b>Non EMF</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LEAF__NON_EMF = eINSTANCE.getLeaf_NonEMF();
+
+ /**
+ * The meta object literal for the '<em><b>Noncontainment Noncontainment Holder</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER = eINSTANCE.getLeaf_NoncontainmentNoncontainmentHolder();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodeImpl
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNode()
+ * @generated
+ */
+ EClass NODE = eINSTANCE.getNode();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NODE__NAME = eINSTANCE.getNode_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Uuid</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NODE__UUID = eINSTANCE.getNode_Uuid();
+
+ /**
+ * The meta object literal for the '<em>UUID</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see java.util.UUID
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getUUID()
+ * @generated
+ */
+ EDataType UUID = eINSTANCE.getUUID();
+
+ /**
+ * The meta object literal for the '<em>Non EMF String Holder</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder
+ * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNonEMFStringHolder()
+ * @generated
+ */
+ EDataType NON_EMF_STRING_HOLDER = eINSTANCE.getNonEMFStringHolder();
+
+ }
+
+} //NodesPackage
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/GroupImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/GroupImpl.java
new file mode 100644
index 000000000..a83ee6e43
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/GroupImpl.java
@@ -0,0 +1,165 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.compare.tests.nodes.Group;
+import org.eclipse.emf.compare.tests.nodes.Node;
+import org.eclipse.emf.compare.tests.nodes.NodesPackage;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Group</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.GroupImpl#getChildren <em>Children</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GroupImpl extends NodeImpl implements Group {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<Node> children;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroupImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NodesPackage.Literals.GROUP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Node> getChildren() {
+ if (children == null) {
+ children = new EObjectContainmentEList<Node>(Node.class, this, NodesPackage.GROUP__CHILDREN);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NodesPackage.GROUP__CHILDREN:
+ return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NodesPackage.GROUP__CHILDREN:
+ return getChildren();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case NodesPackage.GROUP__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends Node>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NodesPackage.GROUP__CHILDREN:
+ getChildren().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NodesPackage.GROUP__CHILDREN:
+ return children != null && !children.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //GroupImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/LeafImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/LeafImpl.java
new file mode 100644
index 000000000..af8f54c60
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/LeafImpl.java
@@ -0,0 +1,503 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.compare.tests.external.Holder;
+import org.eclipse.emf.compare.tests.external.NoncontainmentHolder;
+import org.eclipse.emf.compare.tests.external.StringHolder;
+
+import org.eclipse.emf.compare.tests.nodes.Leaf;
+import org.eclipse.emf.compare.tests.nodes.NodesPackage;
+
+import org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Leaf</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getNoncontainmentHolder <em>Noncontainment Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getContainmentHolder <em>Containment Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getNumber <em>Number</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getHolder <em>Holder</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getNonEMF <em>Non EMF</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.LeafImpl#getNoncontainmentNoncontainmentHolder <em>Noncontainment Noncontainment Holder</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class LeafImpl extends NodeImpl implements Leaf {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getNoncontainmentHolder() <em>Noncontainment Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNoncontainmentHolder()
+ * @generated
+ * @ordered
+ */
+ protected StringHolder noncontainmentHolder;
+
+ /**
+ * The cached value of the '{@link #getContainmentHolder() <em>Containment Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContainmentHolder()
+ * @generated
+ * @ordered
+ */
+ protected StringHolder containmentHolder;
+
+ /**
+ * The default value of the '{@link #getNumber() <em>Number</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNumber()
+ * @generated
+ * @ordered
+ */
+ protected static final int NUMBER_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getNumber() <em>Number</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNumber()
+ * @generated
+ * @ordered
+ */
+ protected int number = NUMBER_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getHolder() <em>Holder</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getHolder()
+ * @generated
+ * @ordered
+ */
+ protected Holder holder;
+
+ /**
+ * The default value of the '{@link #getNonEMF() <em>Non EMF</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNonEMF()
+ * @generated
+ * @ordered
+ */
+ protected static final NonEMFStringHolder NON_EMF_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getNonEMF() <em>Non EMF</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNonEMF()
+ * @generated
+ * @ordered
+ */
+ protected NonEMFStringHolder nonEMF = NON_EMF_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getNoncontainmentNoncontainmentHolder() <em>Noncontainment Noncontainment Holder</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNoncontainmentNoncontainmentHolder()
+ * @generated
+ * @ordered
+ */
+ protected NoncontainmentHolder noncontainmentNoncontainmentHolder;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LeafImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NodesPackage.Literals.LEAF;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder getNoncontainmentHolder() {
+ if (noncontainmentHolder != null && noncontainmentHolder.eIsProxy()) {
+ InternalEObject oldNoncontainmentHolder = (InternalEObject)noncontainmentHolder;
+ noncontainmentHolder = (StringHolder)eResolveProxy(oldNoncontainmentHolder);
+ if (noncontainmentHolder != oldNoncontainmentHolder) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodesPackage.LEAF__NONCONTAINMENT_HOLDER, oldNoncontainmentHolder, noncontainmentHolder));
+ }
+ }
+ return noncontainmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder basicGetNoncontainmentHolder() {
+ return noncontainmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNoncontainmentHolder(StringHolder newNoncontainmentHolder) {
+ StringHolder oldNoncontainmentHolder = noncontainmentHolder;
+ noncontainmentHolder = newNoncontainmentHolder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__NONCONTAINMENT_HOLDER, oldNoncontainmentHolder, noncontainmentHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StringHolder getContainmentHolder() {
+ return containmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetContainmentHolder(StringHolder newContainmentHolder, NotificationChain msgs) {
+ StringHolder oldContainmentHolder = containmentHolder;
+ containmentHolder = newContainmentHolder;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__CONTAINMENT_HOLDER, oldContainmentHolder, newContainmentHolder);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setContainmentHolder(StringHolder newContainmentHolder) {
+ if (newContainmentHolder != containmentHolder) {
+ NotificationChain msgs = null;
+ if (containmentHolder != null)
+ msgs = ((InternalEObject)containmentHolder).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NodesPackage.LEAF__CONTAINMENT_HOLDER, null, msgs);
+ if (newContainmentHolder != null)
+ msgs = ((InternalEObject)newContainmentHolder).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NodesPackage.LEAF__CONTAINMENT_HOLDER, null, msgs);
+ msgs = basicSetContainmentHolder(newContainmentHolder, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__CONTAINMENT_HOLDER, newContainmentHolder, newContainmentHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getNumber() {
+ return number;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNumber(int newNumber) {
+ int oldNumber = number;
+ number = newNumber;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__NUMBER, oldNumber, number));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Holder getHolder() {
+ return holder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetHolder(Holder newHolder, NotificationChain msgs) {
+ Holder oldHolder = holder;
+ holder = newHolder;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__HOLDER, oldHolder, newHolder);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHolder(Holder newHolder) {
+ if (newHolder != holder) {
+ NotificationChain msgs = null;
+ if (holder != null)
+ msgs = ((InternalEObject)holder).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NodesPackage.LEAF__HOLDER, null, msgs);
+ if (newHolder != null)
+ msgs = ((InternalEObject)newHolder).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NodesPackage.LEAF__HOLDER, null, msgs);
+ msgs = basicSetHolder(newHolder, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__HOLDER, newHolder, newHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NonEMFStringHolder getNonEMF() {
+ return nonEMF;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNonEMF(NonEMFStringHolder newNonEMF) {
+ NonEMFStringHolder oldNonEMF = nonEMF;
+ nonEMF = newNonEMF;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__NON_EMF, oldNonEMF, nonEMF));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NoncontainmentHolder getNoncontainmentNoncontainmentHolder() {
+ if (noncontainmentNoncontainmentHolder != null && noncontainmentNoncontainmentHolder.eIsProxy()) {
+ InternalEObject oldNoncontainmentNoncontainmentHolder = (InternalEObject)noncontainmentNoncontainmentHolder;
+ noncontainmentNoncontainmentHolder = (NoncontainmentHolder)eResolveProxy(oldNoncontainmentNoncontainmentHolder);
+ if (noncontainmentNoncontainmentHolder != oldNoncontainmentNoncontainmentHolder) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER, oldNoncontainmentNoncontainmentHolder, noncontainmentNoncontainmentHolder));
+ }
+ }
+ return noncontainmentNoncontainmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NoncontainmentHolder basicGetNoncontainmentNoncontainmentHolder() {
+ return noncontainmentNoncontainmentHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNoncontainmentNoncontainmentHolder(NoncontainmentHolder newNoncontainmentNoncontainmentHolder) {
+ NoncontainmentHolder oldNoncontainmentNoncontainmentHolder = noncontainmentNoncontainmentHolder;
+ noncontainmentNoncontainmentHolder = newNoncontainmentNoncontainmentHolder;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER, oldNoncontainmentNoncontainmentHolder, noncontainmentNoncontainmentHolder));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NodesPackage.LEAF__CONTAINMENT_HOLDER:
+ return basicSetContainmentHolder(null, msgs);
+ case NodesPackage.LEAF__HOLDER:
+ return basicSetHolder(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NodesPackage.LEAF__NONCONTAINMENT_HOLDER:
+ if (resolve) return getNoncontainmentHolder();
+ return basicGetNoncontainmentHolder();
+ case NodesPackage.LEAF__CONTAINMENT_HOLDER:
+ return getContainmentHolder();
+ case NodesPackage.LEAF__NUMBER:
+ return getNumber();
+ case NodesPackage.LEAF__HOLDER:
+ return getHolder();
+ case NodesPackage.LEAF__NON_EMF:
+ return getNonEMF();
+ case NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER:
+ if (resolve) return getNoncontainmentNoncontainmentHolder();
+ return basicGetNoncontainmentNoncontainmentHolder();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case NodesPackage.LEAF__NONCONTAINMENT_HOLDER:
+ setNoncontainmentHolder((StringHolder)newValue);
+ return;
+ case NodesPackage.LEAF__CONTAINMENT_HOLDER:
+ setContainmentHolder((StringHolder)newValue);
+ return;
+ case NodesPackage.LEAF__NUMBER:
+ setNumber((Integer)newValue);
+ return;
+ case NodesPackage.LEAF__HOLDER:
+ setHolder((Holder)newValue);
+ return;
+ case NodesPackage.LEAF__NON_EMF:
+ setNonEMF((NonEMFStringHolder)newValue);
+ return;
+ case NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER:
+ setNoncontainmentNoncontainmentHolder((NoncontainmentHolder)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NodesPackage.LEAF__NONCONTAINMENT_HOLDER:
+ setNoncontainmentHolder((StringHolder)null);
+ return;
+ case NodesPackage.LEAF__CONTAINMENT_HOLDER:
+ setContainmentHolder((StringHolder)null);
+ return;
+ case NodesPackage.LEAF__NUMBER:
+ setNumber(NUMBER_EDEFAULT);
+ return;
+ case NodesPackage.LEAF__HOLDER:
+ setHolder((Holder)null);
+ return;
+ case NodesPackage.LEAF__NON_EMF:
+ setNonEMF(NON_EMF_EDEFAULT);
+ return;
+ case NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER:
+ setNoncontainmentNoncontainmentHolder((NoncontainmentHolder)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NodesPackage.LEAF__NONCONTAINMENT_HOLDER:
+ return noncontainmentHolder != null;
+ case NodesPackage.LEAF__CONTAINMENT_HOLDER:
+ return containmentHolder != null;
+ case NodesPackage.LEAF__NUMBER:
+ return number != NUMBER_EDEFAULT;
+ case NodesPackage.LEAF__HOLDER:
+ return holder != null;
+ case NodesPackage.LEAF__NON_EMF:
+ return NON_EMF_EDEFAULT == null ? nonEMF != null : !NON_EMF_EDEFAULT.equals(nonEMF);
+ case NodesPackage.LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER:
+ return noncontainmentNoncontainmentHolder != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (number: "); //$NON-NLS-1$
+ result.append(number);
+ result.append(", nonEMF: "); //$NON-NLS-1$
+ result.append(nonEMF);
+ result.append(')');
+ return result.toString();
+ }
+
+} //LeafImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java
new file mode 100644
index 000000000..e25b84823
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java
@@ -0,0 +1,234 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.impl;
+
+import java.util.UUID;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.compare.tests.nodes.Node;
+import org.eclipse.emf.compare.tests.nodes.NodesPackage;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl#getUuid <em>Uuid</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeImpl extends EObjectImpl implements Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getUuid() <em>Uuid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUuid()
+ * @generated
+ * @ordered
+ */
+ protected static final UUID UUID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getUuid() <em>Uuid</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUuid()
+ * @generated
+ * @ordered
+ */
+ protected UUID uuid = UUID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return NodesPackage.Literals.NODE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.NODE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UUID getUuid() {
+ return uuid;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUuid(UUID newUuid) {
+ UUID oldUuid = uuid;
+ uuid = newUuid;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.NODE__UUID, oldUuid, uuid));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case NodesPackage.NODE__NAME:
+ return getName();
+ case NodesPackage.NODE__UUID:
+ return getUuid();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case NodesPackage.NODE__NAME:
+ setName((String)newValue);
+ return;
+ case NodesPackage.NODE__UUID:
+ setUuid((UUID)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case NodesPackage.NODE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case NodesPackage.NODE__UUID:
+ setUuid(UUID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case NodesPackage.NODE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case NodesPackage.NODE__UUID:
+ return UUID_EDEFAULT == null ? uuid != null : !UUID_EDEFAULT.equals(uuid);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: "); //$NON-NLS-1$
+ result.append(name);
+ result.append(", uuid: "); //$NON-NLS-1$
+ result.append(uuid);
+ result.append(')');
+ return result.toString();
+ }
+
+} //NodeImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java
new file mode 100644
index 000000000..ea71dbde8
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java
@@ -0,0 +1,207 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.impl;
+
+import java.util.UUID;
+
+import org.eclipse.emf.compare.tests.nodes.*;
+
+import org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NodesFactoryImpl extends EFactoryImpl implements NodesFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static NodesFactory init() {
+ try {
+ NodesFactory theNodesFactory = (NodesFactory)EPackage.Registry.INSTANCE.getEFactory("namespaceURI"); //$NON-NLS-1$
+ if (theNodesFactory != null) {
+ return theNodesFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new NodesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case NodesPackage.GROUP: return createGroup();
+ case NodesPackage.LEAF: return createLeaf();
+ case NodesPackage.NODE: return createNode();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case NodesPackage.UUID:
+ return createUUIDFromString(eDataType, initialValue);
+ case NodesPackage.NON_EMF_STRING_HOLDER:
+ return createNonEMFStringHolderFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case NodesPackage.UUID:
+ return convertUUIDToString(eDataType, instanceValue);
+ case NodesPackage.NON_EMF_STRING_HOLDER:
+ return convertNonEMFStringHolderToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Group createGroup() {
+ GroupImpl group = new GroupImpl();
+ return group;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Leaf createLeaf() {
+ LeafImpl leaf = new LeafImpl();
+ return leaf;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node createNode() {
+ NodeImpl node = new NodeImpl();
+ return node;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public UUID createUUIDFromString(EDataType eDataType, String initialValue) {
+ return (UUID)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertUUIDToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NonEMFStringHolder createNonEMFStringHolderFromString(EDataType eDataType, String initialValue) {
+ return (NonEMFStringHolder)super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertNonEMFStringHolderToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodesPackage getNodesPackage() {
+ return (NodesPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static NodesPackage getPackage() {
+ return NodesPackage.eINSTANCE;
+ }
+
+} //NodesFactoryImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java
new file mode 100644
index 000000000..796ef5375
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java
@@ -0,0 +1,376 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.impl;
+
+import org.eclipse.emf.compare.tests.external.ExternalPackage;
+
+import org.eclipse.emf.compare.tests.nodes.Group;
+import org.eclipse.emf.compare.tests.nodes.Leaf;
+import org.eclipse.emf.compare.tests.nodes.Node;
+import org.eclipse.emf.compare.tests.nodes.NodesFactory;
+import org.eclipse.emf.compare.tests.nodes.NodesPackage;
+
+import org.eclipse.emf.compare.tests.nonemf.NonEMFStringHolder;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class NodesPackageImpl extends EPackageImpl implements NodesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass groupEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass leafEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType uuidEDataType = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType nonEMFStringHolderEDataType = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private NodesPackageImpl() {
+ super(eNS_URI, NodesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link NodesPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static NodesPackage init() {
+ if (isInited) return (NodesPackage)EPackage.Registry.INSTANCE.getEPackage(NodesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ NodesPackageImpl theNodesPackage = (NodesPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof NodesPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new NodesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ ExternalPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theNodesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theNodesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theNodesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(NodesPackage.eNS_URI, theNodesPackage);
+ return theNodesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGroup() {
+ return groupEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGroup_Children() {
+ return (EReference)groupEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLeaf() {
+ return leafEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLeaf_NoncontainmentHolder() {
+ return (EReference)leafEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLeaf_ContainmentHolder() {
+ return (EReference)leafEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLeaf_Number() {
+ return (EAttribute)leafEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLeaf_Holder() {
+ return (EReference)leafEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLeaf_NonEMF() {
+ return (EAttribute)leafEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLeaf_NoncontainmentNoncontainmentHolder() {
+ return (EReference)leafEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNode() {
+ return nodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNode_Name() {
+ return (EAttribute)nodeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNode_Uuid() {
+ return (EAttribute)nodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getUUID() {
+ return uuidEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getNonEMFStringHolder() {
+ return nonEMFStringHolderEDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodesFactory getNodesFactory() {
+ return (NodesFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ groupEClass = createEClass(GROUP);
+ createEReference(groupEClass, GROUP__CHILDREN);
+
+ leafEClass = createEClass(LEAF);
+ createEReference(leafEClass, LEAF__NONCONTAINMENT_HOLDER);
+ createEReference(leafEClass, LEAF__CONTAINMENT_HOLDER);
+ createEAttribute(leafEClass, LEAF__NUMBER);
+ createEReference(leafEClass, LEAF__HOLDER);
+ createEAttribute(leafEClass, LEAF__NON_EMF);
+ createEReference(leafEClass, LEAF__NONCONTAINMENT_NONCONTAINMENT_HOLDER);
+
+ nodeEClass = createEClass(NODE);
+ createEAttribute(nodeEClass, NODE__NAME);
+ createEAttribute(nodeEClass, NODE__UUID);
+
+ // Create data types
+ uuidEDataType = createEDataType(UUID);
+ nonEMFStringHolderEDataType = createEDataType(NON_EMF_STRING_HOLDER);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ExternalPackage theExternalPackage = (ExternalPackage)EPackage.Registry.INSTANCE.getEPackage(ExternalPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ groupEClass.getESuperTypes().add(this.getNode());
+ leafEClass.getESuperTypes().add(this.getNode());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(groupEClass, Group.class, "Group", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getGroup_Children(), this.getNode(), null, "children", null, 0, -1, Group.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(leafEClass, Leaf.class, "Leaf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getLeaf_NoncontainmentHolder(), theExternalPackage.getStringHolder(), null, "noncontainmentHolder", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLeaf_ContainmentHolder(), theExternalPackage.getStringHolder(), null, "containmentHolder", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getLeaf_Number(), ecorePackage.getEInt(), "number", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLeaf_Holder(), theExternalPackage.getHolder(), null, "holder", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getLeaf_NonEMF(), this.getNonEMFStringHolder(), "nonEMF", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getLeaf_NoncontainmentNoncontainmentHolder(), theExternalPackage.getNoncontainmentHolder(), null, "noncontainmentNoncontainmentHolder", null, 0, 1, Leaf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getNode_Name(), ecorePackage.getEString(), "name", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getNode_Uuid(), this.getUUID(), "uuid", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Initialize data types
+ initEDataType(uuidEDataType, java.util.UUID.class, "UUID", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEDataType(nonEMFStringHolderEDataType, NonEMFStringHolder.class, "NonEMFStringHolder", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //NodesPackageImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java
new file mode 100644
index 000000000..0e2c274d6
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java
@@ -0,0 +1,171 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.compare.tests.nodes.*;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage
+ * @generated
+ */
+public class NodesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static NodesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = NodesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodesSwitch<Adapter> modelSwitch =
+ new NodesSwitch<Adapter>() {
+ @Override
+ public Adapter caseGroup(Group object) {
+ return createGroupAdapter();
+ }
+ @Override
+ public Adapter caseLeaf(Leaf object) {
+ return createLeafAdapter();
+ }
+ @Override
+ public Adapter caseNode(Node object) {
+ return createNodeAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.Group <em>Group</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.nodes.Group
+ * @generated
+ */
+ public Adapter createGroupAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.Leaf <em>Leaf</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.nodes.Leaf
+ * @generated
+ */
+ public Adapter createLeafAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.Node <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.compare.tests.nodes.Node
+ * @generated
+ */
+ public Adapter createNodeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //NodesAdapterFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java
new file mode 100644
index 000000000..82bad87bf
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nodes.util;
+
+import java.util.List;
+
+import org.eclipse.emf.compare.tests.nodes.*;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.nodes.NodesPackage
+ * @generated
+ */
+public class NodesSwitch<T> {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2009, 2012 IBM Corporation and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\n \r\nContributors:\r\n Stephen McCants - Initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static NodesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = NodesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case NodesPackage.GROUP: {
+ Group group = (Group)theEObject;
+ T result = caseGroup(group);
+ if (result == null) result = caseNode(group);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NodesPackage.LEAF: {
+ Leaf leaf = (Leaf)theEObject;
+ T result = caseLeaf(leaf);
+ if (result == null) result = caseNode(leaf);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case NodesPackage.NODE: {
+ Node node = (Node)theEObject;
+ T result = caseNode(node);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Group</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Group</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGroup(Group object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Leaf</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Leaf</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLeaf(Leaf object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Node</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNode(Node object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //NodesSwitch
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nonemf/NonEMFStringHolder.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nonemf/NonEMFStringHolder.java
new file mode 100644
index 000000000..998866cca
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nonemf/NonEMFStringHolder.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) 2009, 2012 IBM Corporation 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:
+ * Stephen McCants - Initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.nonemf;
+
+/**
+ * This is a Non-EMF object that we will use with our models.
+ *
+ * @author smccants
+ */
+public class NonEMFStringHolder {
+ private String string;
+
+ public void setString(String string) {
+ this.string = string;
+ }
+
+ public String getString() {
+ return string;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj instanceof NonEMFStringHolder) {
+ final NonEMFStringHolder other = (NonEMFStringHolder)obj;
+ return other.string == string || other.string != null && other.string.equals(string);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ if (string != null)
+ return string.hashCode();
+ return super.hashCode();
+ }
+}

Back to the top