summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-20 05:34:24 (EDT)
committerEike Stepper2006-08-20 05:34:24 (EDT)
commitf3b24fde9eac46af2b49314ffeac98bedebf1327 (patch)
tree5ee84d34faf98534a24b716b0aa8c30cd824b6b3
parenta7b05434dcd682b3a5f6cba5f1d9589e9ae5168c (diff)
downloadcdo-f3b24fde9eac46af2b49314ffeac98bedebf1327.zip
cdo-f3b24fde9eac46af2b49314ffeac98bedebf1327.tar.gz
cdo-f3b24fde9eac46af2b49314ffeac98bedebf1327.tar.bz2
[154389] attributes in super class returned by server, ignored by client
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154389
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/CDO Basic Test.launch6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/CDO Bugzilla Test.launch38
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AbstractModel1Test.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java118
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/EmptyNode.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java93
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/EmptyNodeImpl.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/ExtendedNodeImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java35
16 files changed, 448 insertions, 28 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/CDO Basic Test.launch b/plugins/org.eclipse.emf.cdo.tests/launches/CDO Basic Test.launch
index 81b2aef..76bd8ec 100644
--- a/plugins/org.eclipse.emf.cdo.tests/launches/CDO Basic Test.launch
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/CDO Basic Test.launch
@@ -15,15 +15,15 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<booleanAttribute key="automaticAdd" value="false"/>
<stringAttribute key="checked" value="[NONE]"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="clearws" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.model1.BasicTest"/>
<stringAttribute key="pde.version" value="3.2a"/>
-<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcdo.test.mode=client-separated-server"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="default" value="false"/>
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/CDO Bugzilla Test.launch b/plugins/org.eclipse.emf.cdo.tests/launches/CDO Bugzilla Test.launch
new file mode 100644
index 0000000..8d18ba7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/CDO Bugzilla Test.launch
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<stringAttribute key="bootstrap" value=""/>
+<booleanAttribute key="useProduct" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.net4j.examples.mvc.swt,org.eclipse.net4j.examples.prov.client.ui,org.eclipse.net4j.examples.mvc,org.eclipse.net4j.examples.prov.server,org.eclipse.emf.cdo.dbgen.edit,org.eclipse.emf.cdo.examples.library,org.eclipse.emf.cdo.examples.library.ui,org.eclipse.emf.cdo.analysis.gmf,org.eclipse.emf.cdo.mapping.editor,org.eclipse.net4j.examples.server,org.eclipse.net4j.tests,org.eclipse.emf.cdo.doc,org.eclipse.datatools.enablement.mysql,org.eclipse.net4j.spring.tests,org.eclipse.emf.cdo,org.eclipse.emf.cdo.dbgen.editor,org.eclipse.net4j.examples.prov.edit,org.eclipse.emf.cdo.utilities.migrator,org.eclipse.emf.cdo.analysis,org.eclipse.emf.cdo.examples.server,org.eclipse.datatools.enablement.mysql.dbdefinition,org.eclipse.net4j.examples.prov,org.eclipse.emf.cdo.examples.client,org.eclipse.emf.cdo.examples.ui,org.eclipse.net4j.examples.client.ui,org.eclipse.net4j.examples.client,org.eclipse.net4j.doc,org.eclipse.net4j.examples.prov.client,org.eclipse.net4j.examples.prov.editor,org.eclipse.net4j"/>
+<booleanAttribute key="tracing" value="false"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+</listAttribute>
+<stringAttribute key="selected_target_plugins" value="org.apache.ant,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.osgi,org.eclipse.update.configurator,org.junit"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="automaticValidate" value="true"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<stringAttribute key="checked" value="[NONE]"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.model1.Bugzilla154389Test"/>
+<stringAttribute key="pde.version" value="3.2a"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcdo.test.mode=client-separated-server"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
index 75145e3..63cd1f5 100644
--- a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
@@ -21,4 +21,5 @@
eType="#//ExtendedNode" eOpposite="#//ExtendedNode/bidiSource"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="stringFeature2" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EmptyNode" eSuperTypes="#//TreeNode"/>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AbstractModel1Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AbstractModel1Test.java
index aaa61eb..f777564 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AbstractModel1Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AbstractModel1Test.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.springframework.jdbc.core.JdbcTemplate;
+import testmodel1.EmptyNode;
import testmodel1.ExtendedNode;
import testmodel1.TestModel1Factory;
import testmodel1.TreeNode;
@@ -140,6 +141,19 @@ public abstract class AbstractModel1Test extends AbstractTopologyTest
return node;
}
+ protected EmptyNode createEmpty(String name)
+ {
+ return createEmpty(name, null);
+ }
+
+ protected EmptyNode createEmpty(String name, TreeNode parent)
+ {
+ EmptyNode node = TestModel1Factory.eINSTANCE.createEmptyNode();
+ node.setStringFeature(name);
+ node.setParent(parent);
+ return node;
+ }
+
protected TreeNode findChild(String name, TreeNode parent)
{
return findNode(name, parent.getChildren());
@@ -179,6 +193,7 @@ public abstract class AbstractModel1Test extends AbstractTopologyTest
{
super.wipeDatabase(jdbc);
dropTable(jdbc, "TREE_NODE");
+ dropTable(jdbc, "EMPTY_NODE");
dropTable(jdbc, "EXTENDED_NODE");
}
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java
new file mode 100644
index 0000000..d8358bb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla154389Test.java
@@ -0,0 +1,118 @@
+/***************************************************************************
+ * Copyright (c) 2004, 2005, 2006 Eike Stepper, Fuggerstr. 39, 10777 Berlin, Germany.
+ * 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:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.emf.cdo.tests.model1;
+
+
+import testmodel1.EmptyNode;
+import testmodel1.TreeNode;
+
+
+/**
+ * attributes in super class returned by server, ignored by client.
+ *
+ * The issue occurs when an object is loaded that has no attributes.
+ * All the attributes are in the super class.
+ *
+ * When the object is loaded the server transmits all of the attributes,
+ * which include the super class attributes. The client side ignored the
+ * attributes and mis-interpreted the message containing the attributes as
+ * the next object. From this point on nothing will work...
+ *
+ * So, it looks like the client and server don't match here.
+ *
+ * Both client and server are current with CVS as of today.
+ *
+ * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=154389
+ */
+public class Bugzilla154389Test extends AbstractModel1Test
+{
+ public void testEmptyRoot() throws Exception
+ {
+ final String RESOURCE = "/test/res";
+ final String ROOT = "root";
+ final boolean BOOLEAN_VALUE = true;
+ final int INT_VALUE = 12345;
+
+ { // Execution
+ TreeNode root = createEmpty(ROOT);
+ root.setBooleanFeature(BOOLEAN_VALUE);
+ root.setIntFeature(INT_VALUE);
+ saveRoot(root, RESOURCE);
+ }
+
+ { // Verification
+ TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ assertNode(ROOT, root);
+ assertEquals(BOOLEAN_VALUE, root.isBooleanFeature());
+ assertEquals(INT_VALUE, root.getIntFeature());
+ }
+ }
+
+ public void testEmptyChild() throws Exception
+ {
+ final String RESOURCE = "/test/res";
+ final String ROOT = "root";
+ final String CHILD = "child";
+ final boolean BOOLEAN_VALUE = true;
+ final int INT_VALUE = 12345;
+
+ { // Execution
+ TreeNode root = createEmpty(ROOT);
+ EmptyNode child = createEmpty(CHILD, root);
+ child.setBooleanFeature(BOOLEAN_VALUE);
+ child.setIntFeature(INT_VALUE);
+ saveRoot(root, RESOURCE);
+ }
+
+ { // Verification
+ TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ assertNode(ROOT, root);
+
+ TreeNode child = findChild(CHILD, root);
+ assertEquals(BOOLEAN_VALUE, child.isBooleanFeature());
+ assertEquals(INT_VALUE, child.getIntFeature());
+ }
+ }
+
+ public void testEmptyXRef() throws Exception
+ {
+ final String RESOURCE = "/test/res";
+ final String ROOT = "root";
+ final String CHILD_A = "a";
+ final String CHILD_B = "b";
+ final boolean BOOLEAN_VALUE = true;
+ final int INT_VALUE = 12345;
+
+ { // Execution
+ TreeNode root = createNode(ROOT);
+ TreeNode a = createNode(CHILD_A, root);
+ TreeNode b = createEmpty(CHILD_B, root);
+ b.setBooleanFeature(BOOLEAN_VALUE);
+ b.setIntFeature(INT_VALUE);
+
+ a.getReferences().add(b);
+ saveRoot(root, RESOURCE);
+ }
+
+ { // Verification
+ TreeNode root = (TreeNode) loadRoot(RESOURCE);
+ assertNode(ROOT, root);
+
+ TreeNode a = (TreeNode )root.getChildren().get(0);
+ assertNode(CHILD_A, a);
+
+ TreeNode b = (TreeNode) a.getReferences().get(0);
+ assertNode(CHILD_B, b);
+ assertEquals(BOOLEAN_VALUE, b.isBooleanFeature());
+ assertEquals(INT_VALUE, b.getIntFeature());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/EmptyNode.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/EmptyNode.java
new file mode 100644
index 0000000..475a9b6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/EmptyNode.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Empty Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see testmodel1.TestModel1Package#getEmptyNode()
+ * @model
+ * @generated
+ */
+public interface EmptyNode extends TreeNode
+{
+} // EmptyNode \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java
index b500ad6..c151bdd 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Factory.java
@@ -47,6 +47,15 @@ public interface TestModel1Factory extends EFactory
ExtendedNode createExtendedNode();
/**
+ * Returns a new object of class '<em>Empty Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Empty Node</em>'.
+ * @generated
+ */
+ EmptyNode createEmptyNode();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
index f1e0b91..d4e191c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
@@ -238,6 +238,79 @@ public interface TestModel1Package extends EPackage
int EXTENDED_NODE_FEATURE_COUNT = TREE_NODE_FEATURE_COUNT + 3;
/**
+ * The meta object id for the '{@link testmodel1.impl.EmptyNodeImpl <em>Empty Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testmodel1.impl.EmptyNodeImpl
+ * @see testmodel1.impl.TestModel1PackageImpl#getEmptyNode()
+ * @generated
+ */
+ int EMPTY_NODE = 2;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__PARENT = TREE_NODE__PARENT;
+
+ /**
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__CHILDREN = TREE_NODE__CHILDREN;
+
+ /**
+ * The feature id for the '<em><b>References</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__REFERENCES = TREE_NODE__REFERENCES;
+
+ /**
+ * The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__BOOLEAN_FEATURE = TREE_NODE__BOOLEAN_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>Int Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__INT_FEATURE = TREE_NODE__INT_FEATURE;
+
+ /**
+ * The feature id for the '<em><b>String Feature</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__STRING_FEATURE = TREE_NODE__STRING_FEATURE;
+
+ /**
+ * The number of structural features of the '<em>Empty Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE_FEATURE_COUNT = TREE_NODE_FEATURE_COUNT + 0;
+
+ /**
* Returns the meta object for class '{@link testmodel1.TreeNode <em>Tree Node</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -357,6 +430,16 @@ public interface TestModel1Package extends EPackage
EAttribute getExtendedNode_StringFeature2();
/**
+ * Returns the meta object for class '{@link testmodel1.EmptyNode <em>Empty Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Empty Node</em>'.
+ * @see testmodel1.EmptyNode
+ * @generated
+ */
+ EClass getEmptyNode();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -472,6 +555,16 @@ public interface TestModel1Package extends EPackage
*/
EAttribute EXTENDED_NODE__STRING_FEATURE2 = eINSTANCE.getExtendedNode_StringFeature2();
+ /**
+ * The meta object literal for the '{@link testmodel1.impl.EmptyNodeImpl <em>Empty Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see testmodel1.impl.EmptyNodeImpl
+ * @see testmodel1.impl.TestModel1PackageImpl#getEmptyNode()
+ * @generated
+ */
+ EClass EMPTY_NODE = eINSTANCE.getEmptyNode();
+
}
} //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
index 95e0fb5..ca1f0e1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
@@ -11,8 +11,6 @@ import org.eclipse.emf.cdo.client.CDOPersistent;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
/**
* <!-- begin-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/EmptyNodeImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/EmptyNodeImpl.java
new file mode 100644
index 0000000..bf6b370
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/EmptyNodeImpl.java
@@ -0,0 +1,47 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package testmodel1.impl;
+
+
+import org.eclipse.emf.ecore.EClass;
+
+import testmodel1.EmptyNode;
+import testmodel1.TestModel1Package;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Empty Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class EmptyNodeImpl extends TreeNodeImpl implements EmptyNode
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmptyNodeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EClass eStaticClass()
+ {
+ return TestModel1Package.Literals.EMPTY_NODE;
+ }
+
+} //EmptyNodeImpl \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/ExtendedNodeImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/ExtendedNodeImpl.java
index 8d920c5..2610d19 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/ExtendedNodeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/ExtendedNodeImpl.java
@@ -7,24 +7,20 @@
package testmodel1.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.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
-
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import testmodel1.ExtendedNode;
import testmodel1.TestModel1Package;
+import java.util.Collection;
+
/**
* <!-- begin-user-doc -->
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
index ad05d25..81b1a78 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1FactoryImpl.java
@@ -10,12 +10,14 @@ 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.*;
+import testmodel1.EmptyNode;
+import testmodel1.ExtendedNode;
+import testmodel1.TestModel1Factory;
+import testmodel1.TestModel1Package;
+import testmodel1.TreeNode;
/**
@@ -74,6 +76,8 @@ public class TestModel1FactoryImpl extends EFactoryImpl implements TestModel1Fac
return createTreeNode();
case TestModel1Package.EXTENDED_NODE:
return createExtendedNode();
+ case TestModel1Package.EMPTY_NODE:
+ return createEmptyNode();
default:
throw new IllegalArgumentException("The class '" + eClass.getName()
+ "' is not a valid classifier");
@@ -107,6 +111,17 @@ public class TestModel1FactoryImpl extends EFactoryImpl implements TestModel1Fac
* <!-- end-user-doc -->
* @generated
*/
+ public EmptyNode createEmptyNode()
+ {
+ EmptyNodeImpl emptyNode = new EmptyNodeImpl();
+ return emptyNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public TestModel1Package getTestModel1Package()
{
return (TestModel1Package) getEPackage();
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
index d3d0f1a..a9a0414 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
@@ -13,9 +13,9 @@ 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.EmptyNode;
import testmodel1.ExtendedNode;
import testmodel1.TestModel1Factory;
import testmodel1.TestModel1Package;
@@ -45,6 +45,13 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
private EClass extendedNodeEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass emptyNodeEClass = 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.
@@ -235,6 +242,16 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getEmptyNode()
+ {
+ return emptyNodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public TestModel1Factory getTestModel1Factory()
{
return (TestModel1Factory) getEFactoryInstance();
@@ -272,6 +289,8 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
createEReference(extendedNodeEClass, EXTENDED_NODE__BIDI_SOURCE);
createEReference(extendedNodeEClass, EXTENDED_NODE__BIDI_TARGET);
createEAttribute(extendedNodeEClass, EXTENDED_NODE__STRING_FEATURE2);
+
+ emptyNodeEClass = createEClass(EMPTY_NODE);
}
/**
@@ -305,6 +324,7 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
// Add supertypes to classes
treeNodeEClass.getESuperTypes().add(theCDOPackage.getCDOPersistent());
extendedNodeEClass.getESuperTypes().add(this.getTreeNode());
+ emptyNodeEClass.getESuperTypes().add(this.getTreeNode());
// Initialize classes and features; add operations and parameters
initEClass(treeNodeEClass, TreeNode.class, "TreeNode", !IS_ABSTRACT, !IS_INTERFACE,
@@ -342,6 +362,9 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
null, 0, 1, ExtendedNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(emptyNodeEClass, EmptyNode.class, "EmptyNode", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+
// Create resource
createResource(eNS_URI);
}
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
index 63b1ab1..b5f4a20 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
@@ -7,21 +7,14 @@
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;
@@ -30,6 +23,8 @@ import org.eclipse.emf.ecore.util.InternalEList;
import testmodel1.TestModel1Package;
import testmodel1.TreeNode;
+import java.util.Collection;
+
/**
* <!-- begin-user-doc -->
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
index ad551f9..936856a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1AdapterFactory.java
@@ -12,12 +12,13 @@ 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.*;
+import testmodel1.EmptyNode;
+import testmodel1.ExtendedNode;
+import testmodel1.TestModel1Package;
+import testmodel1.TreeNode;
/**
@@ -91,6 +92,11 @@ public class TestModel1AdapterFactory extends AdapterFactoryImpl
return createExtendedNodeAdapter();
}
+ public Object caseEmptyNode(EmptyNode object)
+ {
+ return createEmptyNodeAdapter();
+ }
+
public Object caseCDOPersistable(CDOPersistable object)
{
return createCDOPersistableAdapter();
@@ -151,6 +157,21 @@ public class TestModel1AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link testmodel1.EmptyNode <em>Empty 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.EmptyNode
+ * @generated
+ */
+ public Adapter createEmptyNodeAdapter()
+ {
+ 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;
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
index bca801c..3132480 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/util/TestModel1Switch.java
@@ -7,15 +7,18 @@
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.*;
+import testmodel1.EmptyNode;
+import testmodel1.ExtendedNode;
+import testmodel1.TestModel1Package;
+import testmodel1.TreeNode;
+
+import java.util.List;
/**
@@ -118,6 +121,16 @@ public class TestModel1Switch
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case TestModel1Package.EMPTY_NODE:
+ {
+ EmptyNode emptyNode = (EmptyNode) theEObject;
+ Object result = caseEmptyNode(emptyNode);
+ if (result == null) result = caseTreeNode(emptyNode);
+ if (result == null) result = caseCDOPersistent(emptyNode);
+ if (result == null) result = caseCDOPersistable(emptyNode);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -156,6 +169,22 @@ public class TestModel1Switch
}
/**
+ * Returns the result of interpretting the object as an instance of '<em>Empty 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>Empty Node</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public Object caseEmptyNode(EmptyNode object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpretting the object as an instance of '<em>Persistable</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;