Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlgoubet2011-08-02 08:57:41 -0400
committerlgoubet2011-08-02 08:57:41 -0400
commit50a4ed91a8c856797ef04b8b8a22a3bda6329505 (patch)
treeef881d3b37fa25562abdaa52d7bede8084907f15 /plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse
parent94c3141860e7849c3af8570b39c7ee1e394f1866 (diff)
downloadorg.eclipse.emf.compare-50a4ed91a8c856797ef04b8b8a22a3bda6329505.tar.gz
org.eclipse.emf.compare-50a4ed91a8c856797ef04b8b8a22a3bda6329505.tar.xz
org.eclipse.emf.compare-50a4ed91a8c856797ef04b8b8a22a3bda6329505.zip
Create and generate the code of a custom metamodel for the merge tests.
Diffstat (limited to 'plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse')
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergeFactory.java75
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergePackage.java364
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/Node.java84
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeMultipleContainment.java55
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeSingleValueContainment.java64
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergeFactoryImpl.java132
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergePackageImpl.java270
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeImpl.java236
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeMultipleContainmentImpl.java165
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeSingleValueContainmentImpl.java190
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeAdapterFactory.java171
-rw-r--r--plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeSwitch.java169
12 files changed, 1975 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergeFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergeFactory.java
new file mode 100644
index 000000000..bd5267055
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergeFactory.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge;
+
+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.merge.MergePackage
+ * @generated
+ */
+public interface MergeFactory extends EFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MergeFactory eINSTANCE = org.eclipse.emf.compare.tests.merge.impl.MergeFactoryImpl.init();
+
+ /**
+ * 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 a new object of class '<em>Node Multiple Containment</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node Multiple Containment</em>'.
+ * @generated
+ */
+ NodeMultipleContainment createNodeMultipleContainment();
+
+ /**
+ * Returns a new object of class '<em>Node Single Value Containment</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node Single Value Containment</em>'.
+ * @generated
+ */
+ NodeSingleValueContainment createNodeSingleValueContainment();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ MergePackage getMergePackage();
+
+} //MergeFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergePackage.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergePackage.java
new file mode 100644
index 000000000..1753ada89
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/MergePackage.java
@@ -0,0 +1,364 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge;
+
+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.merge.MergeFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface MergePackage extends EPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "merge"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/emf/compare/tests/merge"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "merge"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ MergePackage eINSTANCE = org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.merge.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#getNode()
+ * @generated
+ */
+ int NODE = 0;
+
+ /**
+ * 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>Containment Ref1</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__CONTAINMENT_REF1 = 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.merge.impl.NodeMultipleContainmentImpl <em>Node Multiple Containment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeMultipleContainmentImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#getNodeMultipleContainment()
+ * @generated
+ */
+ int NODE_MULTIPLE_CONTAINMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_MULTIPLE_CONTAINMENT__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Containment Ref1</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1;
+
+ /**
+ * The feature id for the '<em><b>Containment Ref2</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2 = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Node Multiple Containment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_MULTIPLE_CONTAINMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.compare.tests.merge.impl.NodeSingleValueContainmentImpl <em>Node Single Value Containment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeSingleValueContainmentImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#getNodeSingleValueContainment()
+ * @generated
+ */
+ int NODE_SINGLE_VALUE_CONTAINMENT = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_SINGLE_VALUE_CONTAINMENT__NAME = NODE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Containment Ref1</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_SINGLE_VALUE_CONTAINMENT__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1;
+
+ /**
+ * The feature id for the '<em><b>Single Value Containment</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT = NODE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Node Single Value Containment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_SINGLE_VALUE_CONTAINMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 1;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.merge.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.merge.Node
+ * @generated
+ */
+ EClass getNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.merge.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.merge.Node#getName()
+ * @see #getNode()
+ * @generated
+ */
+ EAttribute getNode_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.merge.Node#getContainmentRef1 <em>Containment Ref1</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Containment Ref1</em>'.
+ * @see org.eclipse.emf.compare.tests.merge.Node#getContainmentRef1()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_ContainmentRef1();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.merge.NodeMultipleContainment <em>Node Multiple Containment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node Multiple Containment</em>'.
+ * @see org.eclipse.emf.compare.tests.merge.NodeMultipleContainment
+ * @generated
+ */
+ EClass getNodeMultipleContainment();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.merge.NodeMultipleContainment#getContainmentRef2 <em>Containment Ref2</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Containment Ref2</em>'.
+ * @see org.eclipse.emf.compare.tests.merge.NodeMultipleContainment#getContainmentRef2()
+ * @see #getNodeMultipleContainment()
+ * @generated
+ */
+ EReference getNodeMultipleContainment_ContainmentRef2();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment <em>Node Single Value Containment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node Single Value Containment</em>'.
+ * @see org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment
+ * @generated
+ */
+ EClass getNodeSingleValueContainment();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Single Value Containment</em>'.
+ * @see org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment#getSingleValueContainment()
+ * @see #getNodeSingleValueContainment()
+ * @generated
+ */
+ EReference getNodeSingleValueContainment_SingleValueContainment();
+
+ /**
+ * 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
+ */
+ MergeFactory getMergeFactory();
+
+ /**
+ * <!-- 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.merge.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#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>Containment Ref1</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__CONTAINMENT_REF1 = eINSTANCE.getNode_ContainmentRef1();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.merge.impl.NodeMultipleContainmentImpl <em>Node Multiple Containment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeMultipleContainmentImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#getNodeMultipleContainment()
+ * @generated
+ */
+ EClass NODE_MULTIPLE_CONTAINMENT = eINSTANCE.getNodeMultipleContainment();
+
+ /**
+ * The meta object literal for the '<em><b>Containment Ref2</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2 = eINSTANCE.getNodeMultipleContainment_ContainmentRef2();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.compare.tests.merge.impl.NodeSingleValueContainmentImpl <em>Node Single Value Containment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.compare.tests.merge.impl.NodeSingleValueContainmentImpl
+ * @see org.eclipse.emf.compare.tests.merge.impl.MergePackageImpl#getNodeSingleValueContainment()
+ * @generated
+ */
+ EClass NODE_SINGLE_VALUE_CONTAINMENT = eINSTANCE.getNodeSingleValueContainment();
+
+ /**
+ * The meta object literal for the '<em><b>Single Value Containment</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT = eINSTANCE.getNodeSingleValueContainment_SingleValueContainment();
+
+ }
+
+} //MergePackage
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/Node.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/Node.java
new file mode 100644
index 000000000..80f19c063
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/Node.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge;
+
+import org.eclipse.emf.common.util.EList;
+
+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.merge.Node#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.Node#getContainmentRef1 <em>Containment Ref1</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNode()
+ * @model
+ * @generated
+ */
+public interface Node extends EObject {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - 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.merge.MergePackage#getNode_Name()
+ * @model id="true"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.merge.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>Containment Ref1</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.merge.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Ref1</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>Containment Ref1</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNode_ContainmentRef1()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Node> getContainmentRef1();
+
+} // Node
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeMultipleContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeMultipleContainment.java
new file mode 100644
index 000000000..3f4f7406e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeMultipleContainment.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Multiple Containment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.NodeMultipleContainment#getContainmentRef2 <em>Containment Ref2</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNodeMultipleContainment()
+ * @model
+ * @generated
+ */
+public interface NodeMultipleContainment extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Containment Ref2</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.compare.tests.merge.Node}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Containment Ref2</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>Containment Ref2</em>' containment reference list.
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNodeMultipleContainment_ContainmentRef2()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Node> getContainmentRef2();
+
+} // NodeMultipleContainment
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeSingleValueContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeSingleValueContainment.java
new file mode 100644
index 000000000..5ea576f85
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/NodeSingleValueContainment.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node Single Value Containment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNodeSingleValueContainment()
+ * @model
+ * @generated
+ */
+public interface NodeSingleValueContainment extends Node {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Returns the value of the '<em><b>Single Value Containment</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Single Value Containment</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>Single Value Containment</em>' containment reference.
+ * @see #setSingleValueContainment(Node)
+ * @see org.eclipse.emf.compare.tests.merge.MergePackage#getNodeSingleValueContainment_SingleValueContainment()
+ * @model containment="true"
+ * @generated
+ */
+ Node getSingleValueContainment();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment#getSingleValueContainment <em>Single Value Containment</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Single Value Containment</em>' containment reference.
+ * @see #getSingleValueContainment()
+ * @generated
+ */
+ void setSingleValueContainment(Node value);
+
+} // NodeSingleValueContainment
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergeFactoryImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergeFactoryImpl.java
new file mode 100644
index 000000000..c7d972a4e
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergeFactoryImpl.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.impl;
+
+import org.eclipse.emf.compare.tests.merge.*;
+
+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 MergeFactoryImpl extends EFactoryImpl implements MergeFactory {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static MergeFactory init() {
+ try {
+ MergeFactory theMergeFactory = (MergeFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/compare/tests/merge"); //$NON-NLS-1$
+ if (theMergeFactory != null) {
+ return theMergeFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new MergeFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MergeFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case MergePackage.NODE: return createNode();
+ case MergePackage.NODE_MULTIPLE_CONTAINMENT: return createNodeMultipleContainment();
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT: return createNodeSingleValueContainment();
+ 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 Node createNode() {
+ NodeImpl node = new NodeImpl();
+ return node;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeMultipleContainment createNodeMultipleContainment() {
+ NodeMultipleContainmentImpl nodeMultipleContainment = new NodeMultipleContainmentImpl();
+ return nodeMultipleContainment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeSingleValueContainment createNodeSingleValueContainment() {
+ NodeSingleValueContainmentImpl nodeSingleValueContainment = new NodeSingleValueContainmentImpl();
+ return nodeSingleValueContainment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MergePackage getMergePackage() {
+ return (MergePackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static MergePackage getPackage() {
+ return MergePackage.eINSTANCE;
+ }
+
+} //MergeFactoryImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergePackageImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergePackageImpl.java
new file mode 100644
index 000000000..c8c577a56
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/MergePackageImpl.java
@@ -0,0 +1,270 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.impl;
+
+import org.eclipse.emf.compare.tests.merge.MergeFactory;
+import org.eclipse.emf.compare.tests.merge.MergePackage;
+import org.eclipse.emf.compare.tests.merge.Node;
+import org.eclipse.emf.compare.tests.merge.NodeMultipleContainment;
+
+import org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment;
+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 MergePackageImpl extends EPackageImpl implements MergePackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeMultipleContainmentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeSingleValueContainmentEClass = 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.merge.MergePackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private MergePackageImpl() {
+ super(eNS_URI, MergeFactory.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 MergePackage#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 MergePackage init() {
+ if (isInited) return (MergePackage)EPackage.Registry.INSTANCE.getEPackage(MergePackage.eNS_URI);
+
+ // Obtain or create and register package
+ MergePackageImpl theMergePackage = (MergePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MergePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MergePackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theMergePackage.createPackageContents();
+
+ // Initialize created meta-data
+ theMergePackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theMergePackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(MergePackage.eNS_URI, theMergePackage);
+ return theMergePackage;
+ }
+
+ /**
+ * <!-- 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 EReference getNode_ContainmentRef1() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNodeMultipleContainment() {
+ return nodeMultipleContainmentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeMultipleContainment_ContainmentRef2() {
+ return (EReference)nodeMultipleContainmentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNodeSingleValueContainment() {
+ return nodeSingleValueContainmentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeSingleValueContainment_SingleValueContainment() {
+ return (EReference)nodeSingleValueContainmentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MergeFactory getMergeFactory() {
+ return (MergeFactory)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
+ nodeEClass = createEClass(NODE);
+ createEAttribute(nodeEClass, NODE__NAME);
+ createEReference(nodeEClass, NODE__CONTAINMENT_REF1);
+
+ nodeMultipleContainmentEClass = createEClass(NODE_MULTIPLE_CONTAINMENT);
+ createEReference(nodeMultipleContainmentEClass, NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2);
+
+ nodeSingleValueContainmentEClass = createEClass(NODE_SINGLE_VALUE_CONTAINMENT);
+ createEReference(nodeSingleValueContainmentEClass, NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT);
+ }
+
+ /**
+ * <!-- 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
+ nodeMultipleContainmentEClass.getESuperTypes().add(this.getNode());
+ nodeSingleValueContainmentEClass.getESuperTypes().add(this.getNode());
+
+ // Initialize classes and features; add operations and parameters
+ 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$
+ initEReference(getNode_ContainmentRef1(), this.getNode(), null, "containmentRef1", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(nodeMultipleContainmentEClass, NodeMultipleContainment.class, "NodeMultipleContainment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getNodeMultipleContainment_ContainmentRef2(), this.getNode(), null, "containmentRef2", null, 0, -1, NodeMultipleContainment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(nodeSingleValueContainmentEClass, NodeSingleValueContainment.class, "NodeSingleValueContainment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getNodeSingleValueContainment_SingleValueContainment(), this.getNode(), null, "singleValueContainment", null, 0, 1, NodeSingleValueContainment.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);
+ }
+
+} //MergePackageImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeImpl.java
new file mode 100644
index 000000000..4b6865c52
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeImpl.java
@@ -0,0 +1,236 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.compare.tests.merge.MergePackage;
+import org.eclipse.emf.compare.tests.merge.Node;
+
+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;
+
+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>Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.impl.NodeImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.impl.NodeImpl#getContainmentRef1 <em>Containment Ref1</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) 2011 Obeo.\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 Obeo - 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 cached value of the '{@link #getContainmentRef1() <em>Containment Ref1</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContainmentRef1()
+ * @generated
+ * @ordered
+ */
+ protected EList<Node> containmentRef1;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MergePackage.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, MergePackage.NODE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Node> getContainmentRef1() {
+ if (containmentRef1 == null) {
+ containmentRef1 = new EObjectContainmentEList<Node>(Node.class, this, MergePackage.NODE__CONTAINMENT_REF1);
+ }
+ return containmentRef1;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MergePackage.NODE__CONTAINMENT_REF1:
+ return ((InternalEList<?>)getContainmentRef1()).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 MergePackage.NODE__NAME:
+ return getName();
+ case MergePackage.NODE__CONTAINMENT_REF1:
+ return getContainmentRef1();
+ }
+ 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 MergePackage.NODE__NAME:
+ setName((String)newValue);
+ return;
+ case MergePackage.NODE__CONTAINMENT_REF1:
+ getContainmentRef1().clear();
+ getContainmentRef1().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 MergePackage.NODE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case MergePackage.NODE__CONTAINMENT_REF1:
+ getContainmentRef1().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MergePackage.NODE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case MergePackage.NODE__CONTAINMENT_REF1:
+ return containmentRef1 != null && !containmentRef1.isEmpty();
+ }
+ 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();
+ }
+
+} //NodeImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeMultipleContainmentImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeMultipleContainmentImpl.java
new file mode 100644
index 000000000..9e9443599
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeMultipleContainmentImpl.java
@@ -0,0 +1,165 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.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.merge.MergePackage;
+import org.eclipse.emf.compare.tests.merge.Node;
+import org.eclipse.emf.compare.tests.merge.NodeMultipleContainment;
+
+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>Node Multiple Containment</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.impl.NodeMultipleContainmentImpl#getContainmentRef2 <em>Containment Ref2</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeMultipleContainmentImpl extends NodeImpl implements NodeMultipleContainment {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getContainmentRef2() <em>Containment Ref2</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getContainmentRef2()
+ * @generated
+ * @ordered
+ */
+ protected EList<Node> containmentRef2;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeMultipleContainmentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MergePackage.Literals.NODE_MULTIPLE_CONTAINMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Node> getContainmentRef2() {
+ if (containmentRef2 == null) {
+ containmentRef2 = new EObjectContainmentEList<Node>(Node.class, this, MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2);
+ }
+ return containmentRef2;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2:
+ return ((InternalEList<?>)getContainmentRef2()).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 MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2:
+ return getContainmentRef2();
+ }
+ 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 MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2:
+ getContainmentRef2().clear();
+ getContainmentRef2().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 MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2:
+ getContainmentRef2().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MergePackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2:
+ return containmentRef2 != null && !containmentRef2.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //NodeMultipleContainmentImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeSingleValueContainmentImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeSingleValueContainmentImpl.java
new file mode 100644
index 000000000..c4a13799c
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/impl/NodeSingleValueContainmentImpl.java
@@ -0,0 +1,190 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.compare.tests.merge.MergePackage;
+import org.eclipse.emf.compare.tests.merge.Node;
+import org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment;
+
+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>Node Single Value Containment</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.compare.tests.merge.impl.NodeSingleValueContainmentImpl#getSingleValueContainment <em>Single Value Containment</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeSingleValueContainmentImpl extends NodeImpl implements NodeSingleValueContainment {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached value of the '{@link #getSingleValueContainment() <em>Single Value Containment</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSingleValueContainment()
+ * @generated
+ * @ordered
+ */
+ protected Node singleValueContainment;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeSingleValueContainmentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return MergePackage.Literals.NODE_SINGLE_VALUE_CONTAINMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node getSingleValueContainment() {
+ return singleValueContainment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSingleValueContainment(Node newSingleValueContainment, NotificationChain msgs) {
+ Node oldSingleValueContainment = singleValueContainment;
+ singleValueContainment = newSingleValueContainment;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, oldSingleValueContainment, newSingleValueContainment);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSingleValueContainment(Node newSingleValueContainment) {
+ if (newSingleValueContainment != singleValueContainment) {
+ NotificationChain msgs = null;
+ if (singleValueContainment != null)
+ msgs = ((InternalEObject)singleValueContainment).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, null, msgs);
+ if (newSingleValueContainment != null)
+ msgs = ((InternalEObject)newSingleValueContainment).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, null, msgs);
+ msgs = basicSetSingleValueContainment(newSingleValueContainment, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, newSingleValueContainment, newSingleValueContainment));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT:
+ return basicSetSingleValueContainment(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 MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT:
+ return getSingleValueContainment();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT:
+ setSingleValueContainment((Node)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT:
+ setSingleValueContainment((Node)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT:
+ return singleValueContainment != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //NodeSingleValueContainmentImpl
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeAdapterFactory.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeAdapterFactory.java
new file mode 100644
index 000000000..95ad402a9
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeAdapterFactory.java
@@ -0,0 +1,171 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.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.merge.*;
+
+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.merge.MergePackage
+ * @generated
+ */
+public class MergeAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MergePackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MergeAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = MergePackage.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 MergeSwitch<Adapter> modelSwitch =
+ new MergeSwitch<Adapter>() {
+ @Override
+ public Adapter caseNode(Node object) {
+ return createNodeAdapter();
+ }
+ @Override
+ public Adapter caseNodeMultipleContainment(NodeMultipleContainment object) {
+ return createNodeMultipleContainmentAdapter();
+ }
+ @Override
+ public Adapter caseNodeSingleValueContainment(NodeSingleValueContainment object) {
+ return createNodeSingleValueContainmentAdapter();
+ }
+ @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.merge.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.merge.Node
+ * @generated
+ */
+ public Adapter createNodeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.merge.NodeMultipleContainment <em>Node Multiple Containment</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.merge.NodeMultipleContainment
+ * @generated
+ */
+ public Adapter createNodeMultipleContainmentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.merge.NodeSingleValueContainment <em>Node Single Value Containment</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.merge.NodeSingleValueContainment
+ * @generated
+ */
+ public Adapter createNodeSingleValueContainmentAdapter() {
+ 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;
+ }
+
+} //MergeAdapterFactory
diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeSwitch.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeSwitch.java
new file mode 100644
index 000000000..a1c0d1c40
--- /dev/null
+++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/merge/util/MergeSwitch.java
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2011 Obeo.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ */
+package org.eclipse.emf.compare.tests.merge.util;
+
+import org.eclipse.emf.compare.tests.merge.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+/**
+ * <!-- 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.merge.MergePackage
+ * @generated
+ */
+public class MergeSwitch<T> extends Switch<T> {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final String copyright = "Copyright (c) 2011 Obeo.\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 Obeo - initial API and implementation"; //$NON-NLS-1$
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static MergePackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MergeSwitch() {
+ if (modelPackage == null) {
+ modelPackage = MergePackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * 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
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case MergePackage.NODE: {
+ Node node = (Node)theEObject;
+ T result = caseNode(node);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MergePackage.NODE_MULTIPLE_CONTAINMENT: {
+ NodeMultipleContainment nodeMultipleContainment = (NodeMultipleContainment)theEObject;
+ T result = caseNodeMultipleContainment(nodeMultipleContainment);
+ if (result == null) result = caseNode(nodeMultipleContainment);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case MergePackage.NODE_SINGLE_VALUE_CONTAINMENT: {
+ NodeSingleValueContainment nodeSingleValueContainment = (NodeSingleValueContainment)theEObject;
+ T result = caseNodeSingleValueContainment(nodeSingleValueContainment);
+ if (result == null) result = caseNode(nodeSingleValueContainment);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * 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>Node Multiple Containment</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 Multiple Containment</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNodeMultipleContainment(NodeMultipleContainment object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Node Single Value Containment</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 Single Value Containment</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNodeSingleValueContainment(NodeSingleValueContainment 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
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //MergeSwitch

Back to the top