Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-10 00:03:21 -0400
committerEike Stepper2006-08-10 00:03:21 -0400
commit0dc0e081796856373a370adf238732e19bb6bbfb (patch)
treec045c439d256c8a4bd718b68c9c74ac46e982e34 /plugins/org.eclipse.emf.cdo.tests/src/testmodel1
parent1211f45fea16de8e7bad80dcdb5368e03c6298ee (diff)
downloadcdo-0dc0e081796856373a370adf238732e19bb6bbfb.tar.gz
cdo-0dc0e081796856373a370adf238732e19bb6bbfb.tar.xz
cdo-0dc0e081796856373a370adf238732e19bb6bbfb.zip
*** empty log message ***
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests/src/testmodel1')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java49
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java300
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java180
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java113
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java281
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java511
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java176
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java180
8 files changed, 1790 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java
new file mode 100644
index 0000000000..a2254ecfcc
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java
@@ -0,0 +1,49 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1;
+
+
+import org.eclipse.emf.ecore.EFactory;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see testmodel1.TestModel1Package
+ * @generated
+ */
+public interface TestModel1Factory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TestModel1Factory eINSTANCE = testmodel1.impl.TestModel1FactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Tree Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Tree Node</em>'.
+ * @generated
+ */
+ TreeNode createTreeNode();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ TestModel1Package getTestModel1Package();
+
+} //TestModel1Factory
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
new file mode 100644
index 0000000000..35c5fee80a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
@@ -0,0 +1,300 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1;
+
+
+import org.eclipse.emf.cdo.client.CDOPackage;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see testmodel1.TestModel1Factory
+ * @model kind="package"
+ * @generated
+ */
+public interface TestModel1Package extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "testmodel1";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/emf/cdo/2006/TestModel1";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "testmodel1";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ TestModel1Package eINSTANCE = testmodel1.impl.TestModel1PackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link testmodel1.impl.TreeNodeImpl <em>Tree Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testmodel1.impl.TreeNodeImpl
+ * @see testmodel1.impl.TestModel1PackageImpl#getTreeNode()
+ * @generated
+ */
+ int TREE_NODE = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__PARENT = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__CHILDREN = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>References</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__REFERENCES = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__BOOLEAN_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Int Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__INT_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>String Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__STRING_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Tree Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE_FEATURE_COUNT = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 6;
+
+ /**
+ * Returns the meta object for class '{@link testmodel1.TreeNode <em>Tree Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Tree Node</em>'.
+ * @see testmodel1.TreeNode
+ * @generated
+ */
+ EClass getTreeNode();
+
+ /**
+ * Returns the meta object for the container reference '{@link testmodel1.TreeNode#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see testmodel1.TreeNode#getParent()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_Parent();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link testmodel1.TreeNode#getChildren <em>Children</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @see testmodel1.TreeNode#getChildren()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_Children();
+
+ /**
+ * Returns the meta object for the reference list '{@link testmodel1.TreeNode#getReferences <em>References</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>References</em>'.
+ * @see testmodel1.TreeNode#getReferences()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_References();
+
+ /**
+ * Returns the meta object for the attribute '{@link testmodel1.TreeNode#isBooleanFeature <em>Boolean Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Boolean Feature</em>'.
+ * @see testmodel1.TreeNode#isBooleanFeature()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EAttribute getTreeNode_BooleanFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link testmodel1.TreeNode#getIntFeature <em>Int Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Int Feature</em>'.
+ * @see testmodel1.TreeNode#getIntFeature()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EAttribute getTreeNode_IntFeature();
+
+ /**
+ * Returns the meta object for the attribute '{@link testmodel1.TreeNode#getStringFeature <em>String Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>String Feature</em>'.
+ * @see testmodel1.TreeNode#getStringFeature()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EAttribute getTreeNode_StringFeature();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ TestModel1Factory getTestModel1Factory();
+
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link testmodel1.impl.TreeNodeImpl <em>Tree Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testmodel1.impl.TreeNodeImpl
+ * @see testmodel1.impl.TestModel1PackageImpl#getTreeNode()
+ * @generated
+ */
+ EClass TREE_NODE = eINSTANCE.getTreeNode();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__PARENT = eINSTANCE.getTreeNode_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Children</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__CHILDREN = eINSTANCE.getTreeNode_Children();
+
+ /**
+ * The meta object literal for the '<em><b>References</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__REFERENCES = eINSTANCE.getTreeNode_References();
+
+ /**
+ * The meta object literal for the '<em><b>Boolean Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TREE_NODE__BOOLEAN_FEATURE = eINSTANCE.getTreeNode_BooleanFeature();
+
+ /**
+ * The meta object literal for the '<em><b>Int Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TREE_NODE__INT_FEATURE = eINSTANCE.getTreeNode_IntFeature();
+
+ /**
+ * The meta object literal for the '<em><b>String Feature</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute TREE_NODE__STRING_FEATURE = eINSTANCE.getTreeNode_StringFeature();
+
+ }
+
+} //TestModel1Package
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
new file mode 100644
index 0000000000..95e0fb5eeb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1;
+
+
+import org.eclipse.emf.cdo.client.CDOPersistent;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Tree Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link testmodel1.TreeNode#getParent <em>Parent</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getChildren <em>Children</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getReferences <em>References</em>}</li>
+ * <li>{@link testmodel1.TreeNode#isBooleanFeature <em>Boolean Feature</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getIntFeature <em>Int Feature</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getStringFeature <em>String Feature</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see testmodel1.TestModel1Package#getTreeNode()
+ * @model
+ * @generated
+ */
+public interface TreeNode extends CDOPersistent
+{
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link testmodel1.TreeNode#getChildren <em>Children</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent</em>' container reference.
+ * @see #setParent(TreeNode)
+ * @see testmodel1.TestModel1Package#getTreeNode_Parent()
+ * @see testmodel1.TreeNode#getChildren
+ * @model opposite="children"
+ * @generated
+ */
+ TreeNode getParent();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getParent <em>Parent</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(TreeNode value);
+
+ /**
+ * Returns the value of the '<em><b>Children</b></em>' containment reference list.
+ * The list contents are of type {@link testmodel1.TreeNode}.
+ * It is bidirectional and its opposite is '{@link testmodel1.TreeNode#getParent <em>Parent</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Children</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Children</em>' containment reference list.
+ * @see testmodel1.TestModel1Package#getTreeNode_Children()
+ * @see testmodel1.TreeNode#getParent
+ * @model type="testmodel1.TreeNode" opposite="parent" containment="true"
+ * @generated
+ */
+ EList getChildren();
+
+ /**
+ * Returns the value of the '<em><b>References</b></em>' reference list.
+ * The list contents are of type {@link testmodel1.TreeNode}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>References</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>References</em>' reference list.
+ * @see testmodel1.TestModel1Package#getTreeNode_References()
+ * @model type="testmodel1.TreeNode"
+ * @generated
+ */
+ EList getReferences();
+
+ /**
+ * Returns the value of the '<em><b>Boolean Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Boolean Feature</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Boolean Feature</em>' attribute.
+ * @see #setBooleanFeature(boolean)
+ * @see testmodel1.TestModel1Package#getTreeNode_BooleanFeature()
+ * @model
+ * @generated
+ */
+ boolean isBooleanFeature();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#isBooleanFeature <em>Boolean Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Boolean Feature</em>' attribute.
+ * @see #isBooleanFeature()
+ * @generated
+ */
+ void setBooleanFeature(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Int Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Int Feature</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Int Feature</em>' attribute.
+ * @see #setIntFeature(int)
+ * @see testmodel1.TestModel1Package#getTreeNode_IntFeature()
+ * @model
+ * @generated
+ */
+ int getIntFeature();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getIntFeature <em>Int Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Int Feature</em>' attribute.
+ * @see #getIntFeature()
+ * @generated
+ */
+ void setIntFeature(int value);
+
+ /**
+ * Returns the value of the '<em><b>String Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>String Feature</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>String Feature</em>' attribute.
+ * @see #setStringFeature(String)
+ * @see testmodel1.TestModel1Package#getTreeNode_StringFeature()
+ * @model
+ * @generated
+ */
+ String getStringFeature();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getStringFeature <em>String Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>String Feature</em>' attribute.
+ * @see #getStringFeature()
+ * @generated
+ */
+ void setStringFeature(String value);
+
+} // TreeNode \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java
new file mode 100644
index 0000000000..d3684d8b95
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java
@@ -0,0 +1,113 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.impl;
+
+
+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;
+
+import testmodel1.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestModel1FactoryImpl extends EFactoryImpl implements TestModel1Factory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static TestModel1Factory init()
+ {
+ try
+ {
+ TestModel1Factory theTestModel1Factory = (TestModel1Factory) EPackage.Registry.INSTANCE
+ .getEFactory("http://www.eclipse.org/emf/cdo/2006/TestModel1");
+ if (theTestModel1Factory != null)
+ {
+ return theTestModel1Factory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new TestModel1FactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModel1FactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case TestModel1Package.TREE_NODE:
+ return createTreeNode();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName()
+ + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode createTreeNode()
+ {
+ TreeNodeImpl treeNode = new TreeNodeImpl();
+ return treeNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModel1Package getTestModel1Package()
+ {
+ return (TestModel1Package) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ public static TestModel1Package getPackage()
+ {
+ return TestModel1Package.eINSTANCE;
+ }
+
+} //TestModel1FactoryImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
new file mode 100644
index 0000000000..d9b692e9eb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
@@ -0,0 +1,281 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.impl;
+
+
+import org.eclipse.emf.cdo.client.CDOPackage;
+
+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;
+
+import testmodel1.TestModel1Factory;
+import testmodel1.TestModel1Package;
+import testmodel1.TreeNode;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Package
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass treeNodeEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see testmodel1.TestModel1Package#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private TestModel1PackageImpl()
+ {
+ super(eNS_URI, TestModel1Factory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static TestModel1Package init()
+ {
+ if (isInited)
+ return (TestModel1Package) EPackage.Registry.INSTANCE.getEPackage(TestModel1Package.eNS_URI);
+
+ // Obtain or create and register package
+ TestModel1PackageImpl theTestModel1Package = (TestModel1PackageImpl) (EPackage.Registry.INSTANCE
+ .getEPackage(eNS_URI) instanceof TestModel1PackageImpl ? EPackage.Registry.INSTANCE
+ .getEPackage(eNS_URI) : new TestModel1PackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ CDOPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theTestModel1Package.createPackageContents();
+
+ // Initialize created meta-data
+ theTestModel1Package.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theTestModel1Package.freeze();
+
+ return theTestModel1Package;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getTreeNode()
+ {
+ return treeNodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTreeNode_Parent()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTreeNode_Children()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTreeNode_References()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTreeNode_BooleanFeature()
+ {
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTreeNode_IntFeature()
+ {
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getTreeNode_StringFeature()
+ {
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModel1Factory getTestModel1Factory()
+ {
+ return (TestModel1Factory) getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ treeNodeEClass = createEClass(TREE_NODE);
+ createEReference(treeNodeEClass, TREE_NODE__PARENT);
+ createEReference(treeNodeEClass, TREE_NODE__CHILDREN);
+ createEReference(treeNodeEClass, TREE_NODE__REFERENCES);
+ createEAttribute(treeNodeEClass, TREE_NODE__BOOLEAN_FEATURE);
+ createEAttribute(treeNodeEClass, TREE_NODE__INT_FEATURE);
+ createEAttribute(treeNodeEClass, TREE_NODE__STRING_FEATURE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ CDOPackage theCDOPackage = (CDOPackage) EPackage.Registry.INSTANCE
+ .getEPackage(CDOPackage.eNS_URI);
+
+ // Add supertypes to classes
+ treeNodeEClass.getESuperTypes().add(theCDOPackage.getCDOPersistent());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(treeNodeEClass, TreeNode.class, "TreeNode", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTreeNode_Parent(), this.getTreeNode(), this.getTreeNode_Children(), "parent",
+ null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTreeNode_Children(), this.getTreeNode(), this.getTreeNode_Parent(),
+ "children", null, 0, -1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTreeNode_References(), this.getTreeNode(), null, "references", null, 0, -1,
+ TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTreeNode_BooleanFeature(), ecorePackage.getEBoolean(), "booleanFeature",
+ null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
+ !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTreeNode_IntFeature(), ecorePackage.getEInt(), "intFeature", null, 0, 1,
+ TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getTreeNode_StringFeature(), ecorePackage.getEString(), "stringFeature", null,
+ 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //TestModel1PackageImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
new file mode 100644
index 0000000000..4a084bd976
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
@@ -0,0 +1,511 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.cdo.client.impl.CDOPersistentImpl;
+
+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.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.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import testmodel1.TestModel1Package;
+import testmodel1.TreeNode;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Tree Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getReferences <em>References</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#isBooleanFeature <em>Boolean Feature</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getIntFeature <em>Int Feature</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getStringFeature <em>String Feature</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
+{
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList children = null;
+
+ /**
+ * The cached value of the '{@link #getReferences() <em>References</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReferences()
+ * @generated
+ * @ordered
+ */
+ protected EList references = null;
+
+ /**
+ * The default value of the '{@link #isBooleanFeature() <em>Boolean Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isBooleanFeature()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean BOOLEAN_FEATURE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isBooleanFeature() <em>Boolean Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isBooleanFeature()
+ * @generated
+ * @ordered
+ */
+ protected boolean booleanFeature = BOOLEAN_FEATURE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getIntFeature() <em>Int Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIntFeature()
+ * @generated
+ * @ordered
+ */
+ protected static final int INT_FEATURE_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getIntFeature() <em>Int Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIntFeature()
+ * @generated
+ * @ordered
+ */
+ protected int intFeature = INT_FEATURE_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getStringFeature() <em>String Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStringFeature()
+ * @generated
+ * @ordered
+ */
+ protected static final String STRING_FEATURE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getStringFeature() <em>String Feature</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStringFeature()
+ * @generated
+ * @ordered
+ */
+ protected String stringFeature = STRING_FEATURE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TreeNodeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass()
+ {
+ return TestModel1Package.Literals.TREE_NODE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode getParent()
+ {
+
+ if (eContainerFeatureID != TestModel1Package.TREE_NODE__PARENT) return null;
+ return (TreeNode) eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParent(TreeNode newParent, NotificationChain msgs)
+ {
+ cdoLoad();
+ msgs = eBasicSetContainer((InternalEObject) newParent, TestModel1Package.TREE_NODE__PARENT,
+ msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParent(TreeNode newParent)
+ {
+
+ if (newParent != eInternalContainer()
+ || (eContainerFeatureID != TestModel1Package.TREE_NODE__PARENT && newParent != null))
+ {
+ if (EcoreUtil.isAncestor(this, newParent))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs);
+ if (newParent != null)
+ msgs = ((InternalEObject) newParent).eInverseAdd(this,
+ TestModel1Package.TREE_NODE__CHILDREN, TreeNode.class, msgs);
+ msgs = basicSetParent(newParent, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestModel1Package.TREE_NODE__PARENT,
+ newParent, newParent));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList getChildren()
+ {
+
+ cdoLoad();
+ if (children == null)
+ {
+ children = new EObjectContainmentWithInverseEList(TreeNode.class, this,
+ TestModel1Package.TREE_NODE__CHILDREN, TestModel1Package.TREE_NODE__PARENT);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList getReferences()
+ {
+
+ cdoLoad();
+ if (references == null)
+ {
+ references = new EObjectResolvingEList(TreeNode.class, this,
+ TestModel1Package.TREE_NODE__REFERENCES);
+ }
+ return references;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isBooleanFeature()
+ {
+
+ cdoLoad();
+ return booleanFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBooleanFeature(boolean newBooleanFeature)
+ {
+
+ cdoLoad();
+ boolean oldBooleanFeature = booleanFeature;
+ booleanFeature = newBooleanFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__BOOLEAN_FEATURE, oldBooleanFeature, booleanFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getIntFeature()
+ {
+
+ cdoLoad();
+ return intFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIntFeature(int newIntFeature)
+ {
+
+ cdoLoad();
+ int oldIntFeature = intFeature;
+ intFeature = newIntFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__INT_FEATURE, oldIntFeature, intFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getStringFeature()
+ {
+
+ cdoLoad();
+ return stringFeature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStringFeature(String newStringFeature)
+ {
+
+ cdoLoad();
+ String oldStringFeature = stringFeature;
+ stringFeature = newStringFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__STRING_FEATURE, oldStringFeature, stringFeature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID,
+ NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetParent((TreeNode) otherEnd, msgs);
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ return ((InternalEList) getChildren()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID,
+ NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ return basicSetParent(null, msgs);
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ return ((InternalEList) getChildren()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)
+ {
+ switch (eContainerFeatureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ return eInternalContainer().eInverseRemove(this, TestModel1Package.TREE_NODE__CHILDREN,
+ TreeNode.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ return getParent();
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ return getChildren();
+ case TestModel1Package.TREE_NODE__REFERENCES:
+ return getReferences();
+ case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
+ return isBooleanFeature() ? Boolean.TRUE : Boolean.FALSE;
+ case TestModel1Package.TREE_NODE__INT_FEATURE:
+ return new Integer(getIntFeature());
+ case TestModel1Package.TREE_NODE__STRING_FEATURE:
+ return getStringFeature();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ setParent((TreeNode) newValue);
+ return;
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection) newValue);
+ return;
+ case TestModel1Package.TREE_NODE__REFERENCES:
+ getReferences().clear();
+ getReferences().addAll((Collection) newValue);
+ return;
+ case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
+ setBooleanFeature(((Boolean) newValue).booleanValue());
+ return;
+ case TestModel1Package.TREE_NODE__INT_FEATURE:
+ setIntFeature(((Integer) newValue).intValue());
+ return;
+ case TestModel1Package.TREE_NODE__STRING_FEATURE:
+ setStringFeature((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ setParent((TreeNode) null);
+ return;
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ getChildren().clear();
+ return;
+ case TestModel1Package.TREE_NODE__REFERENCES:
+ getReferences().clear();
+ return;
+ case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
+ setBooleanFeature(BOOLEAN_FEATURE_EDEFAULT);
+ return;
+ case TestModel1Package.TREE_NODE__INT_FEATURE:
+ setIntFeature(INT_FEATURE_EDEFAULT);
+ return;
+ case TestModel1Package.TREE_NODE__STRING_FEATURE:
+ setStringFeature(STRING_FEATURE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case TestModel1Package.TREE_NODE__PARENT:
+ return getParent() != null;
+ case TestModel1Package.TREE_NODE__CHILDREN:
+ return children != null && !children.isEmpty();
+ case TestModel1Package.TREE_NODE__REFERENCES:
+ return references != null && !references.isEmpty();
+ case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
+ return booleanFeature != BOOLEAN_FEATURE_EDEFAULT;
+ case TestModel1Package.TREE_NODE__INT_FEATURE:
+ return intFeature != INT_FEATURE_EDEFAULT;
+ case TestModel1Package.TREE_NODE__STRING_FEATURE:
+ return STRING_FEATURE_EDEFAULT == null ? stringFeature != null : !STRING_FEATURE_EDEFAULT
+ .equals(stringFeature);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (booleanFeature: ");
+ result.append(booleanFeature);
+ result.append(", intFeature: ");
+ result.append(intFeature);
+ result.append(", stringFeature: ");
+ result.append(stringFeature);
+ result.append(')');
+ return result.toString();
+ }
+
+} //TreeNodeImpl \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java
new file mode 100644
index 0000000000..dd4732b893
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java
@@ -0,0 +1,176 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.util;
+
+
+import org.eclipse.emf.cdo.client.CDOPersistable;
+import org.eclipse.emf.cdo.client.CDOPersistent;
+
+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.ecore.EObject;
+
+import testmodel1.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see testmodel1.TestModel1Package
+ * @generated
+ */
+public class TestModel1AdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TestModel1Package modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModel1AdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = TestModel1Package.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ public boolean isFactoryForType(Object object)
+ {
+ if (object == modelPackage)
+ {
+ return true;
+ }
+ if (object instanceof EObject)
+ {
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch the delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TestModel1Switch modelSwitch = new TestModel1Switch()
+ {
+ public Object caseTreeNode(TreeNode object)
+ {
+ return createTreeNodeAdapter();
+ }
+
+ public Object caseCDOPersistable(CDOPersistable object)
+ {
+ return createCDOPersistableAdapter();
+ }
+
+ public Object caseCDOPersistent(CDOPersistent object)
+ {
+ return createCDOPersistentAdapter();
+ }
+
+ public Object defaultCase(EObject object)
+ {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ public Adapter createAdapter(Notifier target)
+ {
+ return (Adapter) modelSwitch.doSwitch((EObject) target);
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link testmodel1.TreeNode <em>Tree Node</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see testmodel1.TreeNode
+ * @generated
+ */
+ public Adapter createTreeNodeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.client.CDOPersistable <em>Persistable</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.client.CDOPersistable
+ * @generated
+ */
+ public Adapter createCDOPersistableAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.client.CDOPersistent <em>Persistent</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.client.CDOPersistent
+ * @generated
+ */
+ public Adapter createCDOPersistentAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter()
+ {
+ return null;
+ }
+
+} //TestModel1AdapterFactory
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java
new file mode 100644
index 0000000000..6ed1b9681b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.util;
+
+
+import java.util.List;
+
+import org.eclipse.emf.cdo.client.CDOPersistable;
+import org.eclipse.emf.cdo.client.CDOPersistent;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import testmodel1.*;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see testmodel1.TestModel1Package
+ * @generated
+ */
+public class TestModel1Switch
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static TestModel1Package modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TestModel1Switch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = TestModel1Package.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public Object doSwitch(EObject theEObject)
+ {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected Object 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(
+ (EClass) eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected Object doSwitch(int classifierID, EObject theEObject)
+ {
+ switch (classifierID)
+ {
+ case TestModel1Package.TREE_NODE:
+ {
+ TreeNode treeNode = (TreeNode) theEObject;
+ Object result = caseTreeNode(treeNode);
+ if (result == null) result = caseCDOPersistent(treeNode);
+ if (result == null) result = caseCDOPersistable(treeNode);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Tree Node</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Tree Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseTreeNode(TreeNode object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Persistable</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Persistable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseCDOPersistable(CDOPersistable object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>Persistent</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>Persistent</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseCDOPersistent(CDOPersistent object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpretting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public Object defaultCase(EObject object)
+ {
+ return null;
+ }
+
+} //TestModel1Switch

Back to the top