From d1535e7d4e71cb6c0e8dae79b71d3ffad3785a16 Mon Sep 17 00:00:00 2001 From: lgoubet Date: Wed, 2 May 2012 15:40:25 +0200 Subject: Contributing test metamodel wit the necessary "specific" features (multiple containment features, single-valued containment, multi-valued attribute...) and its generated code. --- .../org/eclipse/emf/compare/tests/nodes/Node.java | 84 +++ .../tests/nodes/NodeMultiValueReference.java | 55 ++ .../tests/nodes/NodeMultiValuedAttribute.java | 55 ++ .../tests/nodes/NodeMultipleContainment.java | 72 ++ .../tests/nodes/NodeSingleValueAttribute.java | 64 ++ .../tests/nodes/NodeSingleValueContainment.java | 64 ++ .../tests/nodes/NodeSingleValueReference.java | 64 ++ .../emf/compare/tests/nodes/NodesFactory.java | 111 ++++ .../emf/compare/tests/nodes/NodesPackage.java | 733 +++++++++++++++++++++ .../emf/compare/tests/nodes/impl/NodeImpl.java | 236 +++++++ .../nodes/impl/NodeMultiValueReferenceImpl.java | 149 +++++ .../nodes/impl/NodeMultiValuedAttributeImpl.java | 164 +++++ .../nodes/impl/NodeMultipleContainmentImpl.java | 203 ++++++ .../nodes/impl/NodeSingleValueAttributeImpl.java | 179 +++++ .../nodes/impl/NodeSingleValueContainmentImpl.java | 192 ++++++ .../nodes/impl/NodeSingleValueReferenceImpl.java | 173 +++++ .../compare/tests/nodes/impl/NodesFactoryImpl.java | 176 +++++ .../compare/tests/nodes/impl/NodesPackageImpl.java | 413 ++++++++++++ .../tests/nodes/util/NodesAdapterFactory.java | 243 +++++++ .../tests/nodes/util/NodesResourceFactoryImpl.java | 56 ++ .../tests/nodes/util/NodesResourceImpl.java | 54 ++ .../emf/compare/tests/nodes/util/NodesSwitch.java | 275 ++++++++ 22 files changed, 3815 insertions(+) create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValueReferenceImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValuedAttributeImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultipleContainmentImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueAttributeImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueContainmentImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueReferenceImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceFactoryImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceImpl.java create mode 100644 plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java (limited to 'plugins/org.eclipse.emf.compare.tests/src-gen/org') 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..923e95ff3 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/Node.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Node'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode() + * @model + * @generated + */ +public interface Node extends EObject { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_Name() + * @model id="true" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.Node#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Containment Ref1' containment reference list. + * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}. + * + *

+ * If the meaning of the 'Containment Ref1' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Containment Ref1' containment reference list. + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNode_ContainmentRef1() + * @model containment="true" + * @generated + */ + EList getContainmentRef1(); + +} // Node diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java new file mode 100644 index 000000000..b80791f8c --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValueReference.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Node Multi Value Reference'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference() + * @model + * @generated + */ +public interface NodeMultiValueReference extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Multi Valued Reference' reference list. + * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}. + * + *

+ * If the meaning of the 'Multi Valued Reference' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Multi Valued Reference' reference list. + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValueReference_MultiValuedReference() + * @model + * @generated + */ + EList getMultiValuedReference(); + +} // NodeMultiValueReference diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java new file mode 100644 index 000000000..6486107b2 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultiValuedAttribute.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Node Multi Valued Attribute'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute() + * @model + * @generated + */ +public interface NodeMultiValuedAttribute extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Multi Valued Attribute' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Multi Valued Attribute' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Multi Valued Attribute' attribute list. + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultiValuedAttribute_MultiValuedAttribute() + * @model + * @generated + */ + EList getMultiValuedAttribute(); + +} // NodeMultiValuedAttribute diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java new file mode 100644 index 000000000..1a9af841e --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeMultipleContainment.java @@ -0,0 +1,72 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Node Multiple Containment'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef2 Containment Ref2}
  • + *
  • {@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef3 Containment Ref3}
  • + *
+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment() + * @model + * @generated + */ +public interface NodeMultipleContainment extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Containment Ref2' containment reference list. + * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}. + * + *

+ * If the meaning of the 'Containment Ref2' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Containment Ref2' containment reference list. + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef2() + * @model containment="true" + * @generated + */ + EList getContainmentRef2(); + + /** + * Returns the value of the 'Containment Ref3' containment reference list. + * The list contents are of type {@link org.eclipse.emf.compare.tests.nodes.Node}. + * + *

+ * If the meaning of the 'Containment Ref3' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Containment Ref3' containment reference list. + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeMultipleContainment_ContainmentRef3() + * @model containment="true" + * @generated + */ + EList getContainmentRef3(); + +} // NodeMultipleContainment diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java new file mode 100644 index 000000000..c5b7d5898 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueAttribute.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + + +/** + * + * A representation of the model object 'Node Single Value Attribute'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute Single Valued Attribute}
  • + *
+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute() + * @model + * @generated + */ +public interface NodeSingleValueAttribute extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Single Valued Attribute' attribute. + * + *

+ * If the meaning of the 'Single Valued Attribute' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Single Valued Attribute' attribute. + * @see #setSingleValuedAttribute(String) + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueAttribute_SingleValuedAttribute() + * @model + * @generated + */ + String getSingleValuedAttribute(); + + /** + * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute Single Valued Attribute}' attribute. + * + * + * @param value the new value of the 'Single Valued Attribute' attribute. + * @see #getSingleValuedAttribute() + * @generated + */ + void setSingleValuedAttribute(String value); + +} // NodeSingleValueAttribute diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java new file mode 100644 index 000000000..5d2292443 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueContainment.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + + +/** + * + * A representation of the model object 'Node Single Value Containment'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment Single Value Containment}
  • + *
+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment() + * @model + * @generated + */ +public interface NodeSingleValueContainment extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Single Value Containment' containment reference. + * + *

+ * If the meaning of the 'Single Value Containment' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Single Value Containment' containment reference. + * @see #setSingleValueContainment(Node) + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueContainment_SingleValueContainment() + * @model containment="true" + * @generated + */ + Node getSingleValueContainment(); + + /** + * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment Single Value Containment}' containment reference. + * + * + * @param value the new value of the 'Single Value Containment' 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/nodes/NodeSingleValueReference.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java new file mode 100644 index 000000000..e19bbb34f --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodeSingleValueReference.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + + +/** + * + * A representation of the model object 'Node Single Value Reference'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference Single Valued Reference}
  • + *
+ *

+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference() + * @model + * @generated + */ +public interface NodeSingleValueReference extends Node { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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 'Single Valued Reference' reference. + * + *

+ * If the meaning of the 'Single Valued Reference' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Single Valued Reference' reference. + * @see #setSingleValuedReference(Node) + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage#getNodeSingleValueReference_SingleValuedReference() + * @model + * @generated + */ + Node getSingleValuedReference(); + + /** + * Sets the value of the '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference Single Valued Reference}' reference. + * + * + * @param value the new value of the 'Single Valued Reference' reference. + * @see #getSingleValuedReference() + * @generated + */ + void setSingleValuedReference(Node value); + +} // NodeSingleValueReference 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..109134462 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesFactory.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage + * @generated + */ +public interface NodesFactory extends EFactory { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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. + * + * + * @generated + */ + NodesFactory eINSTANCE = org.eclipse.emf.compare.tests.nodes.impl.NodesFactoryImpl.init(); + + /** + * Returns a new object of class 'Node'. + * + * + * @return a new object of class 'Node'. + * @generated + */ + Node createNode(); + + /** + * Returns a new object of class 'Node Multiple Containment'. + * + * + * @return a new object of class 'Node Multiple Containment'. + * @generated + */ + NodeMultipleContainment createNodeMultipleContainment(); + + /** + * Returns a new object of class 'Node Single Value Containment'. + * + * + * @return a new object of class 'Node Single Value Containment'. + * @generated + */ + NodeSingleValueContainment createNodeSingleValueContainment(); + + /** + * Returns a new object of class 'Node Single Value Attribute'. + * + * + * @return a new object of class 'Node Single Value Attribute'. + * @generated + */ + NodeSingleValueAttribute createNodeSingleValueAttribute(); + + /** + * Returns a new object of class 'Node Multi Valued Attribute'. + * + * + * @return a new object of class 'Node Multi Valued Attribute'. + * @generated + */ + NodeMultiValuedAttribute createNodeMultiValuedAttribute(); + + /** + * Returns a new object of class 'Node Single Value Reference'. + * + * + * @return a new object of class 'Node Single Value Reference'. + * @generated + */ + NodeSingleValueReference createNodeSingleValueReference(); + + /** + * Returns a new object of class 'Node Multi Value Reference'. + * + * + * @return a new object of class 'Node Multi Value Reference'. + * @generated + */ + NodeMultiValueReference createNodeMultiValueReference(); + + /** + * Returns the package supported by this factory. + * + * + * @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..6cc980271 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/NodesPackage.java @@ -0,0 +1,733 @@ +/** + * Copyright (c) 2011, 2012 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.nodes; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.eclipse.emf.compare.tests.nodes.NodesFactory + * @model kind="package" + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public interface NodesPackage extends EPackage { + /** + * + * + * @generated + */ + String copyright = "Copyright (c) 2011, 2012 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. + * + * + * @generated + */ + String eNAME = "nodes"; //$NON-NLS-1$ + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.eclipse.org/emf/compare/tests/nodes"; //$NON-NLS-1$ + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "nodes"; //$NON-NLS-1$ + + /** + * The singleton instance of the package. + * + * + * @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 Node}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNode() + * @generated + */ + int NODE = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE__NAME = 0; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE__CONTAINMENT_REF1 = 1; + + /** + * The number of structural features of the 'Node' class. + * + * + * @generated + * @ordered + */ + int NODE_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl Node Multiple Containment}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultipleContainment() + * @generated + */ + int NODE_MULTIPLE_CONTAINMENT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_MULTIPLE_CONTAINMENT__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Containment Ref2' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2 = NODE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Containment Ref3' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3 = NODE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Node Multiple Containment' class. + * + * + * @generated + * @ordered + */ + int NODE_MULTIPLE_CONTAINMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueContainmentImpl Node Single Value Containment}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueContainmentImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueContainment() + * @generated + */ + int NODE_SINGLE_VALUE_CONTAINMENT = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_CONTAINMENT__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_CONTAINMENT__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Single Value Containment' containment reference. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT = NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Node Single Value Containment' class. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_CONTAINMENT_FEATURE_COUNT = NODE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueAttributeImpl Node Single Value Attribute}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueAttributeImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueAttribute() + * @generated + */ + int NODE_SINGLE_VALUE_ATTRIBUTE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_ATTRIBUTE__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_ATTRIBUTE__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Single Valued Attribute' attribute. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE = NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Node Single Value Attribute' class. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_ATTRIBUTE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValuedAttributeImpl Node Multi Valued Attribute}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValuedAttributeImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultiValuedAttribute() + * @generated + */ + int NODE_MULTI_VALUED_ATTRIBUTE = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUED_ATTRIBUTE__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUED_ATTRIBUTE__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Multi Valued Attribute' attribute list. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE = NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Node Multi Valued Attribute' class. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUED_ATTRIBUTE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueReferenceImpl Node Single Value Reference}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueReferenceImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueReference() + * @generated + */ + int NODE_SINGLE_VALUE_REFERENCE = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_REFERENCE__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_REFERENCE__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Single Valued Reference' reference. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE = NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Node Single Value Reference' class. + * + * + * @generated + * @ordered + */ + int NODE_SINGLE_VALUE_REFERENCE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValueReferenceImpl Node Multi Value Reference}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValueReferenceImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultiValueReference() + * @generated + */ + int NODE_MULTI_VALUE_REFERENCE = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUE_REFERENCE__NAME = NODE__NAME; + + /** + * The feature id for the 'Containment Ref1' containment reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUE_REFERENCE__CONTAINMENT_REF1 = NODE__CONTAINMENT_REF1; + + /** + * The feature id for the 'Multi Valued Reference' reference list. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE = NODE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Node Multi Value Reference' class. + * + * + * @generated + * @ordered + */ + int NODE_MULTI_VALUE_REFERENCE_FEATURE_COUNT = NODE_FEATURE_COUNT + 1; + + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.Node Node}'. + * + * + * @return the meta object for class 'Node'. + * @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 Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.compare.tests.nodes.Node#getName() + * @see #getNode() + * @generated + */ + EAttribute getNode_Name(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.nodes.Node#getContainmentRef1 Containment Ref1}'. + * + * + * @return the meta object for the containment reference list 'Containment Ref1'. + * @see org.eclipse.emf.compare.tests.nodes.Node#getContainmentRef1() + * @see #getNode() + * @generated + */ + EReference getNode_ContainmentRef1(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment Node Multiple Containment}'. + * + * + * @return the meta object for class 'Node Multiple Containment'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment + * @generated + */ + EClass getNodeMultipleContainment(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef2 Containment Ref2}'. + * + * + * @return the meta object for the containment reference list 'Containment Ref2'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef2() + * @see #getNodeMultipleContainment() + * @generated + */ + EReference getNodeMultipleContainment_ContainmentRef2(); + + /** + * Returns the meta object for the containment reference list '{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef3 Containment Ref3}'. + * + * + * @return the meta object for the containment reference list 'Containment Ref3'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment#getContainmentRef3() + * @see #getNodeMultipleContainment() + * @generated + */ + EReference getNodeMultipleContainment_ContainmentRef3(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment Node Single Value Containment}'. + * + * + * @return the meta object for class 'Node Single Value Containment'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment + * @generated + */ + EClass getNodeSingleValueContainment(); + + /** + * Returns the meta object for the containment reference '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment Single Value Containment}'. + * + * + * @return the meta object for the containment reference 'Single Value Containment'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment#getSingleValueContainment() + * @see #getNodeSingleValueContainment() + * @generated + */ + EReference getNodeSingleValueContainment_SingleValueContainment(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute Node Single Value Attribute}'. + * + * + * @return the meta object for class 'Node Single Value Attribute'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute + * @generated + */ + EClass getNodeSingleValueAttribute(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute Single Valued Attribute}'. + * + * + * @return the meta object for the attribute 'Single Valued Attribute'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute#getSingleValuedAttribute() + * @see #getNodeSingleValueAttribute() + * @generated + */ + EAttribute getNodeSingleValueAttribute_SingleValuedAttribute(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute Node Multi Valued Attribute}'. + * + * + * @return the meta object for class 'Node Multi Valued Attribute'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute + * @generated + */ + EClass getNodeMultiValuedAttribute(); + + /** + * Returns the meta object for the attribute list '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute#getMultiValuedAttribute Multi Valued Attribute}'. + * + * + * @return the meta object for the attribute list 'Multi Valued Attribute'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute#getMultiValuedAttribute() + * @see #getNodeMultiValuedAttribute() + * @generated + */ + EAttribute getNodeMultiValuedAttribute_MultiValuedAttribute(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference Node Single Value Reference}'. + * + * + * @return the meta object for class 'Node Single Value Reference'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference + * @generated + */ + EClass getNodeSingleValueReference(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference Single Valued Reference}'. + * + * + * @return the meta object for the reference 'Single Valued Reference'. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference#getSingleValuedReference() + * @see #getNodeSingleValueReference() + * @generated + */ + EReference getNodeSingleValueReference_SingleValuedReference(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference Node Multi Value Reference}'. + * + * + * @return the meta object for class 'Node Multi Value Reference'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference + * @generated + */ + EClass getNodeMultiValueReference(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference#getMultiValuedReference Multi Valued Reference}'. + * + * + * @return the meta object for the reference list 'Multi Valued Reference'. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference#getMultiValuedReference() + * @see #getNodeMultiValueReference() + * @generated + */ + EReference getNodeMultiValueReference_MultiValuedReference(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + NodesFactory getNodesFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl Node}' class. + * + * + * @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 'Name' attribute feature. + * + * + * @generated + */ + EAttribute NODE__NAME = eINSTANCE.getNode_Name(); + + /** + * The meta object literal for the 'Containment Ref1' containment reference list feature. + * + * + * @generated + */ + EReference NODE__CONTAINMENT_REF1 = eINSTANCE.getNode_ContainmentRef1(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl Node Multiple Containment}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultipleContainment() + * @generated + */ + EClass NODE_MULTIPLE_CONTAINMENT = eINSTANCE.getNodeMultipleContainment(); + + /** + * The meta object literal for the 'Containment Ref2' containment reference list feature. + * + * + * @generated + */ + EReference NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2 = eINSTANCE.getNodeMultipleContainment_ContainmentRef2(); + + /** + * The meta object literal for the 'Containment Ref3' containment reference list feature. + * + * + * @generated + */ + EReference NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3 = eINSTANCE.getNodeMultipleContainment_ContainmentRef3(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueContainmentImpl Node Single Value Containment}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueContainmentImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueContainment() + * @generated + */ + EClass NODE_SINGLE_VALUE_CONTAINMENT = eINSTANCE.getNodeSingleValueContainment(); + + /** + * The meta object literal for the 'Single Value Containment' containment reference feature. + * + * + * @generated + */ + EReference NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT = eINSTANCE.getNodeSingleValueContainment_SingleValueContainment(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueAttributeImpl Node Single Value Attribute}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueAttributeImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueAttribute() + * @generated + */ + EClass NODE_SINGLE_VALUE_ATTRIBUTE = eINSTANCE.getNodeSingleValueAttribute(); + + /** + * The meta object literal for the 'Single Valued Attribute' attribute feature. + * + * + * @generated + */ + EAttribute NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE = eINSTANCE.getNodeSingleValueAttribute_SingleValuedAttribute(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValuedAttributeImpl Node Multi Valued Attribute}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValuedAttributeImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultiValuedAttribute() + * @generated + */ + EClass NODE_MULTI_VALUED_ATTRIBUTE = eINSTANCE.getNodeMultiValuedAttribute(); + + /** + * The meta object literal for the 'Multi Valued Attribute' attribute list feature. + * + * + * @generated + */ + EAttribute NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE = eINSTANCE.getNodeMultiValuedAttribute_MultiValuedAttribute(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueReferenceImpl Node Single Value Reference}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueReferenceImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeSingleValueReference() + * @generated + */ + EClass NODE_SINGLE_VALUE_REFERENCE = eINSTANCE.getNodeSingleValueReference(); + + /** + * The meta object literal for the 'Single Valued Reference' reference feature. + * + * + * @generated + */ + EReference NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE = eINSTANCE.getNodeSingleValueReference_SingleValuedReference(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValueReferenceImpl Node Multi Value Reference}' class. + * + * + * @see org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValueReferenceImpl + * @see org.eclipse.emf.compare.tests.nodes.impl.NodesPackageImpl#getNodeMultiValueReference() + * @generated + */ + EClass NODE_MULTI_VALUE_REFERENCE = eINSTANCE.getNodeMultiValueReference(); + + /** + * The meta object literal for the 'Multi Valued Reference' reference list feature. + * + * + * @generated + */ + EReference NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE = eINSTANCE.getNodeMultiValueReference_MultiValuedReference(); + + } + +} //NodesPackage 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..80ced9bf3 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeImpl.java @@ -0,0 +1,236 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.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.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.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Node'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeImpl#getContainmentRef1 Containment Ref1}
  • + *
+ *

+ * + * @generated + */ +public class NodeImpl extends EObjectImpl implements Node { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getContainmentRef1() Containment Ref1}' containment reference list. + * + * + * @see #getContainmentRef1() + * @generated + * @ordered + */ + protected EList containmentRef1; + + /** + * + * + * @generated + */ + protected NodeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.NODE__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public EList getContainmentRef1() { + if (containmentRef1 == null) { + containmentRef1 = new EObjectContainmentEList(Node.class, this, NodesPackage.NODE__CONTAINMENT_REF1); + } + return containmentRef1; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case NodesPackage.NODE__CONTAINMENT_REF1: + return ((InternalEList)getContainmentRef1()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE__NAME: + return getName(); + case NodesPackage.NODE__CONTAINMENT_REF1: + return getContainmentRef1(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE__NAME: + setName((String)newValue); + return; + case NodesPackage.NODE__CONTAINMENT_REF1: + getContainmentRef1().clear(); + getContainmentRef1().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE__NAME: + setName(NAME_EDEFAULT); + return; + case NodesPackage.NODE__CONTAINMENT_REF1: + getContainmentRef1().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @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__CONTAINMENT_REF1: + return containmentRef1 != null && !containmentRef1.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @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/nodes/impl/NodeMultiValueReferenceImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValueReferenceImpl.java new file mode 100644 index 000000000..3b924fffa --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValueReferenceImpl.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.compare.tests.nodes.Node; +import org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference; +import org.eclipse.emf.compare.tests.nodes.NodesPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * + * An implementation of the model object 'Node Multi Value Reference'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValueReferenceImpl#getMultiValuedReference Multi Valued Reference}
  • + *
+ *

+ * + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeMultiValueReferenceImpl extends NodeImpl implements NodeMultiValueReference { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 #getMultiValuedReference() Multi Valued Reference}' reference list. + * + * + * @see #getMultiValuedReference() + * @generated + * @ordered + */ + protected EList multiValuedReference; + + /** + * + * + * @generated + */ + protected NodeMultiValueReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_MULTI_VALUE_REFERENCE; + } + + /** + * + * + * @generated + */ + public EList getMultiValuedReference() { + if (multiValuedReference == null) { + multiValuedReference = new EObjectResolvingEList(Node.class, this, NodesPackage.NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE); + } + return multiValuedReference; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE: + return getMultiValuedReference(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE: + getMultiValuedReference().clear(); + getMultiValuedReference().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE: + getMultiValuedReference().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE: + return multiValuedReference != null && !multiValuedReference.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //NodeMultiValueReferenceImpl diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValuedAttributeImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValuedAttributeImpl.java new file mode 100644 index 000000000..21715586f --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultiValuedAttributeImpl.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute; +import org.eclipse.emf.compare.tests.nodes.NodesPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; + +/** + * + * An implementation of the model object 'Node Multi Valued Attribute'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultiValuedAttributeImpl#getMultiValuedAttribute Multi Valued Attribute}
  • + *
+ *

+ * + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeMultiValuedAttributeImpl extends NodeImpl implements NodeMultiValuedAttribute { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 #getMultiValuedAttribute() Multi Valued Attribute}' attribute list. + * + * + * @see #getMultiValuedAttribute() + * @generated + * @ordered + */ + protected EList multiValuedAttribute; + + /** + * + * + * @generated + */ + protected NodeMultiValuedAttributeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_MULTI_VALUED_ATTRIBUTE; + } + + /** + * + * + * @generated + */ + public EList getMultiValuedAttribute() { + if (multiValuedAttribute == null) { + multiValuedAttribute = new EDataTypeUniqueEList(String.class, this, NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE); + } + return multiValuedAttribute; + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE: + return getMultiValuedAttribute(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE: + getMultiValuedAttribute().clear(); + getMultiValuedAttribute().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE: + getMultiValuedAttribute().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE: + return multiValuedAttribute != null && !multiValuedAttribute.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (multiValuedAttribute: "); //$NON-NLS-1$ + result.append(multiValuedAttribute); + result.append(')'); + return result.toString(); + } + +} //NodeMultiValuedAttributeImpl diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultipleContainmentImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultipleContainmentImpl.java new file mode 100644 index 000000000..2e5a47835 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeMultipleContainmentImpl.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2011, 2012 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.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.Node; +import org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment; +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; + +/** + * + * An implementation of the model object 'Node Multiple Containment'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl#getContainmentRef2 Containment Ref2}
  • + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeMultipleContainmentImpl#getContainmentRef3 Containment Ref3}
  • + *
+ *

+ * + * @generated + */ +// Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeMultipleContainmentImpl extends NodeImpl implements NodeMultipleContainment { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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() Containment Ref2}' containment reference list. + * + * + * @see #getContainmentRef2() + * @generated + * @ordered + */ + protected EList containmentRef2; + + /** + * The cached value of the '{@link #getContainmentRef3() Containment Ref3}' containment reference list. + * + * + * @see #getContainmentRef3() + * @generated + * @ordered + */ + protected EList containmentRef3; + + /** + * + * + * @generated + */ + protected NodeMultipleContainmentImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_MULTIPLE_CONTAINMENT; + } + + /** + * + * + * @generated + */ + public EList getContainmentRef2() { + if (containmentRef2 == null) { + containmentRef2 = new EObjectContainmentEList(Node.class, this, NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2); + } + return containmentRef2; + } + + /** + * + * + * @generated + */ + public EList getContainmentRef3() { + if (containmentRef3 == null) { + containmentRef3 = new EObjectContainmentEList(Node.class, this, NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3); + } + return containmentRef3; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2: + return ((InternalEList)getContainmentRef2()).basicRemove(otherEnd, msgs); + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3: + return ((InternalEList)getContainmentRef3()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2: + return getContainmentRef2(); + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3: + return getContainmentRef3(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2: + getContainmentRef2().clear(); + getContainmentRef2().addAll((Collection)newValue); + return; + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3: + getContainmentRef3().clear(); + getContainmentRef3().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2: + getContainmentRef2().clear(); + return; + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3: + getContainmentRef3().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF2: + return containmentRef2 != null && !containmentRef2.isEmpty(); + case NodesPackage.NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3: + return containmentRef3 != null && !containmentRef3.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //NodeMultipleContainmentImpl diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueAttributeImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueAttributeImpl.java new file mode 100644 index 000000000..506204c9f --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueAttributeImpl.java @@ -0,0 +1,179 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute; +import org.eclipse.emf.compare.tests.nodes.NodesPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Node Single Value Attribute'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueAttributeImpl#getSingleValuedAttribute Single Valued Attribute}
  • + *
+ *

+ * + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeSingleValueAttributeImpl extends NodeImpl implements NodeSingleValueAttribute { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 #getSingleValuedAttribute() Single Valued Attribute}' attribute. + * + * + * @see #getSingleValuedAttribute() + * @generated + * @ordered + */ + protected static final String SINGLE_VALUED_ATTRIBUTE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSingleValuedAttribute() Single Valued Attribute}' attribute. + * + * + * @see #getSingleValuedAttribute() + * @generated + * @ordered + */ + protected String singleValuedAttribute = SINGLE_VALUED_ATTRIBUTE_EDEFAULT; + + /** + * + * + * @generated + */ + protected NodeSingleValueAttributeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_SINGLE_VALUE_ATTRIBUTE; + } + + /** + * + * + * @generated + */ + public String getSingleValuedAttribute() { + return singleValuedAttribute; + } + + /** + * + * + * @generated + */ + public void setSingleValuedAttribute(String newSingleValuedAttribute) { + String oldSingleValuedAttribute = singleValuedAttribute; + singleValuedAttribute = newSingleValuedAttribute; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE, oldSingleValuedAttribute, singleValuedAttribute)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE: + return getSingleValuedAttribute(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE: + setSingleValuedAttribute((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE: + setSingleValuedAttribute(SINGLE_VALUED_ATTRIBUTE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE: + return SINGLE_VALUED_ATTRIBUTE_EDEFAULT == null ? singleValuedAttribute != null : !SINGLE_VALUED_ATTRIBUTE_EDEFAULT.equals(singleValuedAttribute); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (singleValuedAttribute: "); //$NON-NLS-1$ + result.append(singleValuedAttribute); + result.append(')'); + return result.toString(); + } + +} //NodeSingleValueAttributeImpl diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueContainmentImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueContainmentImpl.java new file mode 100644 index 000000000..b788a735b --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueContainmentImpl.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.compare.tests.nodes.Node; +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment; +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.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Node Single Value Containment'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueContainmentImpl#getSingleValueContainment Single Value Containment}
  • + *
+ *

+ * + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeSingleValueContainmentImpl extends NodeImpl implements NodeSingleValueContainment { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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() Single Value Containment}' containment reference. + * + * + * @see #getSingleValueContainment() + * @generated + * @ordered + */ + protected Node singleValueContainment; + + /** + * + * + * @generated + */ + protected NodeSingleValueContainmentImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_SINGLE_VALUE_CONTAINMENT; + } + + /** + * + * + * @generated + */ + public Node getSingleValueContainment() { + return singleValueContainment; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSingleValueContainment(Node newSingleValueContainment, NotificationChain msgs) { + Node oldSingleValueContainment = singleValueContainment; + singleValueContainment = newSingleValueContainment; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, oldSingleValueContainment, newSingleValueContainment); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setSingleValueContainment(Node newSingleValueContainment) { + if (newSingleValueContainment != singleValueContainment) { + NotificationChain msgs = null; + if (singleValueContainment != null) + msgs = ((InternalEObject)singleValueContainment).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, null, msgs); + if (newSingleValueContainment != null) + msgs = ((InternalEObject)newSingleValueContainment).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NodesPackage.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, NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT, newSingleValueContainment, newSingleValueContainment)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT: + return basicSetSingleValueContainment(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT: + return getSingleValueContainment(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT: + setSingleValueContainment((Node)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT: + setSingleValueContainment((Node)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.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/nodes/impl/NodeSingleValueReferenceImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueReferenceImpl.java new file mode 100644 index 000000000..2889333a5 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodeSingleValueReferenceImpl.java @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.compare.tests.nodes.Node; +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference; +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.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Node Single Value Reference'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.compare.tests.nodes.impl.NodeSingleValueReferenceImpl#getSingleValuedReference Single Valued Reference}
  • + *
+ *

+ * + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodeSingleValueReferenceImpl extends NodeImpl implements NodeSingleValueReference { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 #getSingleValuedReference() Single Valued Reference}' reference. + * + * + * @see #getSingleValuedReference() + * @generated + * @ordered + */ + protected Node singleValuedReference; + + /** + * + * + * @generated + */ + protected NodeSingleValueReferenceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return NodesPackage.Literals.NODE_SINGLE_VALUE_REFERENCE; + } + + /** + * + * + * @generated + */ + public Node getSingleValuedReference() { + if (singleValuedReference != null && singleValuedReference.eIsProxy()) { + InternalEObject oldSingleValuedReference = (InternalEObject)singleValuedReference; + singleValuedReference = (Node)eResolveProxy(oldSingleValuedReference); + if (singleValuedReference != oldSingleValuedReference) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, singleValuedReference)); + } + } + return singleValuedReference; + } + + /** + * + * + * @generated + */ + public Node basicGetSingleValuedReference() { + return singleValuedReference; + } + + /** + * + * + * @generated + */ + public void setSingleValuedReference(Node newSingleValuedReference) { + Node oldSingleValuedReference = singleValuedReference; + singleValuedReference = newSingleValuedReference; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE, oldSingleValuedReference, singleValuedReference)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE: + if (resolve) return getSingleValuedReference(); + return basicGetSingleValuedReference(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE: + setSingleValuedReference((Node)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE: + setSingleValuedReference((Node)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE: + return singleValuedReference != null; + } + return super.eIsSet(featureID); + } + +} //NodeSingleValueReferenceImpl 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..5797691bd --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesFactoryImpl.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import org.eclipse.emf.compare.tests.nodes.*; + +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; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class NodesFactoryImpl extends EFactoryImpl implements NodesFactory { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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. + * + * + * @generated + */ + public static NodesFactory init() { + try { + NodesFactory theNodesFactory = (NodesFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/compare/tests/nodes"); //$NON-NLS-1$ + if (theNodesFactory != null) { + return theNodesFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new NodesFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public NodesFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case NodesPackage.NODE: return createNode(); + case NodesPackage.NODE_MULTIPLE_CONTAINMENT: return createNodeMultipleContainment(); + case NodesPackage.NODE_SINGLE_VALUE_CONTAINMENT: return createNodeSingleValueContainment(); + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE: return createNodeSingleValueAttribute(); + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE: return createNodeMultiValuedAttribute(); + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE: return createNodeSingleValueReference(); + case NodesPackage.NODE_MULTI_VALUE_REFERENCE: return createNodeMultiValueReference(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + /** + * + * + * @generated + */ + public Node createNode() { + NodeImpl node = new NodeImpl(); + return node; + } + + /** + * + * + * @generated + */ + public NodeMultipleContainment createNodeMultipleContainment() { + NodeMultipleContainmentImpl nodeMultipleContainment = new NodeMultipleContainmentImpl(); + return nodeMultipleContainment; + } + + /** + * + * + * @generated + */ + public NodeSingleValueContainment createNodeSingleValueContainment() { + NodeSingleValueContainmentImpl nodeSingleValueContainment = new NodeSingleValueContainmentImpl(); + return nodeSingleValueContainment; + } + + /** + * + * + * @generated + */ + public NodeSingleValueAttribute createNodeSingleValueAttribute() { + NodeSingleValueAttributeImpl nodeSingleValueAttribute = new NodeSingleValueAttributeImpl(); + return nodeSingleValueAttribute; + } + + /** + * + * + * @generated + */ + public NodeMultiValuedAttribute createNodeMultiValuedAttribute() { + NodeMultiValuedAttributeImpl nodeMultiValuedAttribute = new NodeMultiValuedAttributeImpl(); + return nodeMultiValuedAttribute; + } + + /** + * + * + * @generated + */ + public NodeSingleValueReference createNodeSingleValueReference() { + NodeSingleValueReferenceImpl nodeSingleValueReference = new NodeSingleValueReferenceImpl(); + return nodeSingleValueReference; + } + + /** + * + * + * @generated + */ + public NodeMultiValueReference createNodeMultiValueReference() { + NodeMultiValueReferenceImpl nodeMultiValueReference = new NodeMultiValueReferenceImpl(); + return nodeMultiValueReference; + } + + /** + * + * + * @generated + */ + public NodesPackage getNodesPackage() { + return (NodesPackage)getEPackage(); + } + + /** + * + * + * @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..c7ccf74f7 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/impl/NodesPackageImpl.java @@ -0,0 +1,413 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.impl; + +import org.eclipse.emf.compare.tests.nodes.Node; +import org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference; +import org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute; +import org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment; +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute; +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment; +import org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference; +import org.eclipse.emf.compare.tests.nodes.NodesFactory; +import org.eclipse.emf.compare.tests.nodes.NodesPackage; + +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; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class NodesPackageImpl extends EPackageImpl implements NodesPackage { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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$ + + /** + * + * + * @generated + */ + private EClass nodeEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeMultipleContainmentEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeSingleValueContainmentEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeSingleValueAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeMultiValuedAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeSingleValueReferenceEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeMultiValueReferenceEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

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. + * + * + * @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); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

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. + * + * + * @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; + + // 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; + } + + /** + * + * + * @generated + */ + public EClass getNode() { + return nodeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNode_Name() { + return (EAttribute)nodeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNode_ContainmentRef1() { + return (EReference)nodeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getNodeMultipleContainment() { + return nodeMultipleContainmentEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeMultipleContainment_ContainmentRef2() { + return (EReference)nodeMultipleContainmentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNodeMultipleContainment_ContainmentRef3() { + return (EReference)nodeMultipleContainmentEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getNodeSingleValueContainment() { + return nodeSingleValueContainmentEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeSingleValueContainment_SingleValueContainment() { + return (EReference)nodeSingleValueContainmentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getNodeSingleValueAttribute() { + return nodeSingleValueAttributeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNodeSingleValueAttribute_SingleValuedAttribute() { + return (EAttribute)nodeSingleValueAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getNodeMultiValuedAttribute() { + return nodeMultiValuedAttributeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNodeMultiValuedAttribute_MultiValuedAttribute() { + return (EAttribute)nodeMultiValuedAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getNodeSingleValueReference() { + return nodeSingleValueReferenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeSingleValueReference_SingleValuedReference() { + return (EReference)nodeSingleValueReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getNodeMultiValueReference() { + return nodeMultiValueReferenceEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeMultiValueReference_MultiValuedReference() { + return (EReference)nodeMultiValueReferenceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public NodesFactory getNodesFactory() { + return (NodesFactory)getEFactoryInstance(); + } + + /** + * + * + * @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. + * + * + * @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); + createEReference(nodeMultipleContainmentEClass, NODE_MULTIPLE_CONTAINMENT__CONTAINMENT_REF3); + + nodeSingleValueContainmentEClass = createEClass(NODE_SINGLE_VALUE_CONTAINMENT); + createEReference(nodeSingleValueContainmentEClass, NODE_SINGLE_VALUE_CONTAINMENT__SINGLE_VALUE_CONTAINMENT); + + nodeSingleValueAttributeEClass = createEClass(NODE_SINGLE_VALUE_ATTRIBUTE); + createEAttribute(nodeSingleValueAttributeEClass, NODE_SINGLE_VALUE_ATTRIBUTE__SINGLE_VALUED_ATTRIBUTE); + + nodeMultiValuedAttributeEClass = createEClass(NODE_MULTI_VALUED_ATTRIBUTE); + createEAttribute(nodeMultiValuedAttributeEClass, NODE_MULTI_VALUED_ATTRIBUTE__MULTI_VALUED_ATTRIBUTE); + + nodeSingleValueReferenceEClass = createEClass(NODE_SINGLE_VALUE_REFERENCE); + createEReference(nodeSingleValueReferenceEClass, NODE_SINGLE_VALUE_REFERENCE__SINGLE_VALUED_REFERENCE); + + nodeMultiValueReferenceEClass = createEClass(NODE_MULTI_VALUE_REFERENCE); + createEReference(nodeMultiValueReferenceEClass, NODE_MULTI_VALUE_REFERENCE__MULTI_VALUED_REFERENCE); + } + + /** + * + * + * @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. + * + * + * @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()); + nodeSingleValueAttributeEClass.getESuperTypes().add(this.getNode()); + nodeMultiValuedAttributeEClass.getESuperTypes().add(this.getNode()); + nodeSingleValueReferenceEClass.getESuperTypes().add(this.getNode()); + nodeMultiValueReferenceEClass.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$ + initEReference(getNodeMultipleContainment_ContainmentRef3(), this.getNode(), null, "containmentRef3", 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$ + + initEClass(nodeSingleValueAttributeEClass, NodeSingleValueAttribute.class, "NodeSingleValueAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getNodeSingleValueAttribute_SingleValuedAttribute(), ecorePackage.getEString(), "singleValuedAttribute", null, 0, 1, NodeSingleValueAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(nodeMultiValuedAttributeEClass, NodeMultiValuedAttribute.class, "NodeMultiValuedAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEAttribute(getNodeMultiValuedAttribute_MultiValuedAttribute(), ecorePackage.getEString(), "multiValuedAttribute", null, 0, -1, NodeMultiValuedAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(nodeSingleValueReferenceEClass, NodeSingleValueReference.class, "NodeSingleValueReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getNodeSingleValueReference_SingleValuedReference(), this.getNode(), null, "singleValuedReference", null, 0, 1, NodeSingleValueReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ + + initEClass(nodeMultiValueReferenceEClass, NodeMultiValueReference.class, "NodeMultiValueReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference(getNodeMultiValueReference_MultiValuedReference(), this.getNode(), null, "multiValuedReference", null, 0, -1, NodeMultiValueReference.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); + } + +} //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..95b7cbf41 --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesAdapterFactory.java @@ -0,0 +1,243 @@ +/** + * Copyright (c) 2011, 2012 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.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; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage + * @generated + */ +public class NodesAdapterFactory extends AdapterFactoryImpl { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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. + * + * + * @generated + */ + protected static NodesPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public NodesAdapterFactory() { + if (modelPackage == null) { + modelPackage = NodesPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @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 createXXX methods. + * + * + * @generated + */ + protected NodesSwitch modelSwitch = + new NodesSwitch() { + @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 caseNodeSingleValueAttribute(NodeSingleValueAttribute object) { + return createNodeSingleValueAttributeAdapter(); + } + @Override + public Adapter caseNodeMultiValuedAttribute(NodeMultiValuedAttribute object) { + return createNodeMultiValuedAttributeAdapter(); + } + @Override + public Adapter caseNodeSingleValueReference(NodeSingleValueReference object) { + return createNodeSingleValueReferenceAdapter(); + } + @Override + public Adapter caseNodeMultiValueReference(NodeMultiValueReference object) { + return createNodeMultiValueReferenceAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @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.Node Node}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.Node + * @generated + */ + public Adapter createNodeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment Node Multiple Containment}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultipleContainment + * @generated + */ + public Adapter createNodeMultipleContainmentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment Node Single Value Containment}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueContainment + * @generated + */ + public Adapter createNodeSingleValueContainmentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute Node Single Value Attribute}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueAttribute + * @generated + */ + public Adapter createNodeSingleValueAttributeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute Node Multi Valued Attribute}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValuedAttribute + * @generated + */ + public Adapter createNodeMultiValuedAttributeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference Node Single Value Reference}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeSingleValueReference + * @generated + */ + public Adapter createNodeSingleValueReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference Node Multi Value Reference}'. + * + * 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. + * + * @return the new adapter. + * @see org.eclipse.emf.compare.tests.nodes.NodeMultiValueReference + * @generated + */ + public Adapter createNodeMultiValueReferenceAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @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/NodesResourceFactoryImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceFactoryImpl.java new file mode 100644 index 000000000..968e031cb --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceFactoryImpl.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.resource.Resource; + +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; + +/** + * + * The Resource Factory associated with the package. + * + * @see org.eclipse.emf.compare.tests.nodes.util.NodesResourceImpl + * @generated + */ +public class NodesResourceFactoryImpl extends ResourceFactoryImpl { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 an instance of the resource factory. + * + * + * @generated + */ + public NodesResourceFactoryImpl() { + super(); + } + + /** + * Creates an instance of the resource. + * + * + * @generated + */ + @Override + public Resource createResource(URI uri) { + Resource result = new NodesResourceImpl(uri); + return result; + } + +} //NodesResourceFactoryImpl diff --git a/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceImpl.java b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceImpl.java new file mode 100644 index 000000000..e49d5655d --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesResourceImpl.java @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2011, 2012 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.nodes.util; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl; + +/** + * + * The Resource associated with the package. + * + * @see org.eclipse.emf.compare.tests.nodes.util.NodesResourceFactoryImpl + * @generated + */ +public class NodesResourceImpl extends XMIResourceImpl { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 an instance of the resource. + * + * + * @param uri the URI of the new resource. + * @generated + */ + public NodesResourceImpl(URI uri) { + super(uri); + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#useUUIDs() + * @generated NOT + */ + @Override + protected boolean useUUIDs() { + return true; + } + +} //NodesResourceImpl 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..bdaeb35fb --- /dev/null +++ b/plugins/org.eclipse.emf.compare.tests/src-gen/org/eclipse/emf/compare/tests/nodes/util/NodesSwitch.java @@ -0,0 +1,275 @@ +/** + * Copyright (c) 2011, 2012 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.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; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX 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. + * + * @see org.eclipse.emf.compare.tests.nodes.NodesPackage + * @generated + */ +//Generated code, suppressing all warnings +@SuppressWarnings("all") +public class NodesSwitch { + /** + * + * + * @generated + */ + public static final String copyright = "Copyright (c) 2011, 2012 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 + * + * + * @generated + */ + protected static NodesPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public NodesSwitch() { + if (modelPackage == null) { + modelPackage = NodesPackage.eINSTANCE; + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + public T doSwitch(EObject theEObject) { + return doSwitch(theEObject.eClass(), theEObject); + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(EClass theEClass, EObject theEObject) { + if (theEClass.eContainer() == modelPackage) { + return doSwitch(theEClass.getClassifierID(), theEObject); + } + else { + List eSuperTypes = theEClass.getESuperTypes(); + return + eSuperTypes.isEmpty() ? + defaultCase(theEObject) : + doSwitch(eSuperTypes.get(0), theEObject); + } + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case NodesPackage.NODE: { + Node node = (Node)theEObject; + T result = caseNode(node); + if (result == null) result = defaultCase(theEObject); + return result; + } + case NodesPackage.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 NodesPackage.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; + } + case NodesPackage.NODE_SINGLE_VALUE_ATTRIBUTE: { + NodeSingleValueAttribute nodeSingleValueAttribute = (NodeSingleValueAttribute)theEObject; + T result = caseNodeSingleValueAttribute(nodeSingleValueAttribute); + if (result == null) result = caseNode(nodeSingleValueAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case NodesPackage.NODE_MULTI_VALUED_ATTRIBUTE: { + NodeMultiValuedAttribute nodeMultiValuedAttribute = (NodeMultiValuedAttribute)theEObject; + T result = caseNodeMultiValuedAttribute(nodeMultiValuedAttribute); + if (result == null) result = caseNode(nodeMultiValuedAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case NodesPackage.NODE_SINGLE_VALUE_REFERENCE: { + NodeSingleValueReference nodeSingleValueReference = (NodeSingleValueReference)theEObject; + T result = caseNodeSingleValueReference(nodeSingleValueReference); + if (result == null) result = caseNode(nodeSingleValueReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + case NodesPackage.NODE_MULTI_VALUE_REFERENCE: { + NodeMultiValueReference nodeMultiValueReference = (NodeMultiValueReference)theEObject; + T result = caseNodeMultiValueReference(nodeMultiValueReference); + if (result == null) result = caseNode(nodeMultiValueReference); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Node'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node'. + * @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 'Node Multiple Containment'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Multiple Containment'. + * @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 'Node Single Value Containment'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Single Value Containment'. + * @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 'Node Single Value Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Single Value Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeSingleValueAttribute(NodeSingleValueAttribute object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node Multi Valued Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Multi Valued Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeMultiValuedAttribute(NodeMultiValuedAttribute object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node Single Value Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Single Value Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeSingleValueReference(NodeSingleValueReference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node Multi Value Reference'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Node Multi Value Reference'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeMultiValueReference(NodeMultiValueReference object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + public T defaultCase(EObject object) { + return null; + } + +} //NodesSwitch -- cgit v1.2.3