summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-10 00:03:21 (EDT)
committerEike Stepper2006-08-10 00:03:21 (EDT)
commit0dc0e081796856373a370adf238732e19bb6bbfb (patch)
treec045c439d256c8a4bd718b68c9c74ac46e982e34
parent1211f45fea16de8e7bad80dcdb5368e03c6298ee (diff)
downloadcdo-0dc0e081796856373a370adf238732e19bb6bbfb.zip
cdo-0dc0e081796856373a370adf238732e19bb6bbfb.tar.gz
cdo-0dc0e081796856373a370adf238732e19bb6bbfb.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/.classpath2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.xml65
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.properties55
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.xml126
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.properties3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.xml42
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.properties14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.xml47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.xml63
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/auth.users1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.properties11
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.xml62
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/build.properties4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/IntegrationTest.launch38
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/lib/.cvsignore0
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/model/TestModel1.genmodel21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/plugin.xml15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractIntegrationTest.java83
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractTopology.java91
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java47
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientSeparatedServerTopology.java70
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientServerTopology.java67
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientTopology.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EmbeddedTopology.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ITopology.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IntegrationTest.java62
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java10
-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
43 files changed, 2891 insertions, 54 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/.classpath b/plugins/org.eclipse.emf.cdo.tests/.classpath
index 065ac06..751c8f2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/.classpath
+++ b/plugins/org.eclipse.emf.cdo.tests/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.jdt.core.prefs
index fb74a50..e74445d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,4 @@
-#Mon Mar 13 08:16:19 CET 2006
+#Wed Aug 09 09:49:26 CEST 2006
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
@@ -8,11 +8,6 @@ org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
index 5081e0b..5f41225 100644
--- a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
@@ -1,15 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.emf.cdo.tests;singleton:=true
+Bundle-SymbolicName: org.eclipse.emf.cdo.tests; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.emf.cdo.tests.CDOTestPlugin
Bundle-ClassPath: cdo.tests.jar
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Eclipse-LazyStart: false
-Export-Package: org.eclipse.emf.cdo.tests
+Eclipse-LazyStart: true
Require-Bundle: org.eclipse.core.runtime,
org.junit,
- org.eclipse.emf.cdo.core,
- org.eclipse.net4j.core
+ org.eclipse.emf.cdo.client,
+ org.eclipse.emf.cdo.server,
+ org.eclipse.net4j.embedded,
+ org.eclipse.net4j.socket
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.properties
new file mode 100644
index 0000000..2a939aa
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.properties
@@ -0,0 +1,4 @@
+connector.host=localhost
+connector.port=2036
+#connector.userName=test
+#connector.password=test
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.xml
new file mode 100644
index 0000000..9fd8a55
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/client/cdo-client.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value> plugin:/META-INF/cdo/client/cdo-client.properties </value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="oidEncoder" class="org.eclipse.emf.cdo.core.impl.OIDEncoderImpl">
+ <property name="fragmentBits">
+ <value>48</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="packageManager" class="org.eclipse.emf.cdo.client.impl.PackageManagerImpl">
+ <property name="oidEncoder">
+ <ref bean="oidEncoder"/>
+ </property>
+ <property name="attributeConverter">
+ <ref local="attributeConverter"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="attributeConverter" class="org.eclipse.emf.cdo.client.impl.AttributeConverterImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="clientCDOProtocol" class="org.eclipse.emf.cdo.client.protocol.ClientCDOProtocolImpl">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ <property name="packageManager">
+ <ref local="packageManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="clientCDOResProtocol"
+ class="org.eclipse.emf.cdo.client.protocol.ClientCDOResProtocolImpl">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="resourceManager" class="org.eclipse.emf.cdo.client.impl.ResourceManagerImpl"
+ singleton="false">
+ <property name="connector">
+ <ref bean="connector"/>
+ </property>
+ <property name="packageManager">
+ <ref local="packageManager"/>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.properties
new file mode 100644
index 0000000..08a63f3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.properties
@@ -0,0 +1,55 @@
+###################
+# JDBC PROPERTIES #
+###################
+
+
+#########
+# DERBY #
+#########
+
+#jdbc.dialect=DERBY
+#jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
+#jdbc.url=jdbc:derby:cdoTest;create=true
+#jdbc.username=test
+#jdbc.password=test
+
+##########
+# HSQLDB #
+##########
+
+jdbc.dialect=HSQLDB
+jdbc.driver=org.hsqldb.jdbcDriver
+jdbc.url=jdbc:hsqldb:.
+jdbc.username=sa
+jdbc.password=
+
+#########
+# MYSQL #
+#########
+
+#jdbc.dialect=MYSQL
+#jdbc.driver=org.gjt.mm.mysql.Driver
+#jdbc.url=jdbc:mysql://localhost/cdoTest
+#jdbc.username=test
+#jdbc.password=test
+
+##########
+# ORACLE #
+##########
+
+#jdbc.dialect=oracle
+#jdbc.driver=
+#jdbc.url=
+#jdbc.username=
+#jdbc.password=
+
+#########
+# MIMER #
+#########
+
+#jdbc.dialect=mimer
+#jdbc.driver=
+#jdbc.url=
+#jdbc.username=
+#jdbc.password=
+
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.xml
new file mode 100644
index 0000000..3250abb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/cdo/server/cdo-server.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value> plugin:/META-INF/cdo/server/cdo-server.properties </value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="oidEncoder" class="org.eclipse.emf.cdo.core.impl.OIDEncoderImpl">
+ <property name="fragmentBits">
+ <value>48</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="packageManager" class="org.eclipse.emf.cdo.server.impl.PackageManagerImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="resourceManager" class="org.eclipse.emf.cdo.server.impl.ResourceManagerImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="columnConverter" class="org.eclipse.emf.cdo.server.impl.ColumnConverterImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="serverCDOProtocol" class="org.eclipse.emf.cdo.server.protocol.ServerCDOProtocolImpl">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ <property name="transactionTemplate">
+ <ref local="transactionTemplate"/>
+ </property>
+ <property name="mapper">
+ <ref local="mapper"/>
+ </property>
+ <property name="serverCDOResProtocol">
+ <ref local="serverCDOResProtocol"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="serverCDOResProtocol"
+ class="org.eclipse.emf.cdo.server.protocol.ServerCDOResProtocolImpl">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ <property name="transactionTemplate">
+ <ref local="transactionTemplate"/>
+ </property>
+ <property name="mapper">
+ <ref local="mapper"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="dataSource" class="org.eclipse.net4j.spring.db.ContextClassLoaderDataSource">
+ <property name="driverClassName">
+ <value>${jdbc.driver}</value>
+ </property>
+ <property name="url">
+ <value>${jdbc.url}</value>
+ </property>
+ <property name="username">
+ <value>${jdbc.username}</value>
+ </property>
+ <property name="password">
+ <value>${jdbc.password}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="transactionManager"
+ class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
+ <property name="dataSource">
+ <ref local="dataSource"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="transactionTemplate"
+ class="org.springframework.transaction.support.TransactionTemplate">
+ <property name="transactionManager">
+ <ref local="transactionManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+ <property name="dataSource">
+ <ref local="dataSource"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="mapper" class="org.eclipse.emf.cdo.server.impl.MapperImpl">
+ <property name="columnConverter">
+ <ref local="columnConverter"/>
+ </property>
+ <property name="packageManager">
+ <ref local="packageManager"/>
+ </property>
+ <property name="resourceManager">
+ <ref local="resourceManager"/>
+ </property>
+ <property name="dataSource">
+ <ref local="dataSource"/>
+ </property>
+ <property name="jdbcTemplate">
+ <ref local="jdbcTemplate"/>
+ </property>
+ <property name="oidEncoder" >
+ <ref bean="oidEncoder"/>
+ </property>
+ <property name="sqlDialectName">
+ <value>${jdbc.dialect}</value>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.properties
new file mode 100644
index 0000000..b3dd5ff
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.properties
@@ -0,0 +1,3 @@
+# Connection
+connector.host=localhost
+connector.port=2036 \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.xml
new file mode 100644
index 0000000..0351e76
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/client/net4j-client.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value>plugin:/META-INF/net4j/client/net4j-client.properties</value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="clientControlProtocol" class="org.eclipse.net4j.core.protocol.ClientControlProtocol">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="connector" class="org.eclipse.net4j.socket.impl.ActiveSocketConnectorImpl">
+ <property name="bufferPool">
+ <ref bean="bufferPool"/>
+ </property>
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ <property name="selectorManager">
+ <ref bean="selectorManager"/>
+ </property>
+ <property name="host">
+ <value>${connector.host}</value>
+ </property>
+ <property name="port">
+ <value>${connector.port}</value>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.properties
new file mode 100644
index 0000000..c5cac7c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.properties
@@ -0,0 +1,14 @@
+# Service
+acceptor.listenAddr=0.0.0.0
+acceptor.listenPort=2036
+
+# Authentication
+passiveNegotiator.algorithmName=PBEWithMD5AndDES
+passiveNegotiator.tokenLength=128
+auth.users.file=plugin:/META-INF/auth.users
+
+# Internal
+randomizer.algorithm=SHA1PRNG
+bufferPool.bufferSize=4096
+channel.responseTimeoutMillis=250000
+connectionManager.maxConnections=50
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.xml
new file mode 100644
index 0000000..19e5527
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/embedded/net4j-embedded.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value> plugin:/META-INF/net4j/embedded/net4j-embedded.properties </value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="serverControlProtocol"
+ class="org.eclipse.net4j.core.protocol.ServerControlProtocol">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="clientControlProtocol"
+ class="org.eclipse.net4j.core.protocol.ClientControlProtocol">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="connectionManager"
+ class="org.eclipse.net4j.core.impl.ConnectionManagerImpl">
+ <property name="maxConnections">
+ <value>${connectionManager.maxConnections}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="connector" class="org.eclipse.net4j.embedded.impl.ActiveEmbeddedConnectorImpl">
+ <property name="autoStart">
+ <value>false</value>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.properties
new file mode 100644
index 0000000..3d2f81b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.properties
@@ -0,0 +1,4 @@
+# Internal
+randomizer.algorithm=SHA1PRNG
+bufferPool.bufferSize=4096
+channel.responseTimeoutMillis=250000
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.xml
new file mode 100644
index 0000000..882e28a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/net4j.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value> plugin:/META-INF/net4j/net4j.properties </value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="randomizer" class="org.eclipse.net4j.core.impl.RandomizerImpl">
+ <property name="algorithmName">
+ <value>${randomizer.algorithm}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="bufferPool" class="org.eclipse.net4j.core.impl.BufferPoolImpl">
+ <property name="bufferSize">
+ <value>${bufferPool.bufferSize}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="protocolManager"
+ class="org.eclipse.net4j.core.impl.ProtocolManagerImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="multiplexer" class="org.eclipse.net4j.core.impl.MultiplexerImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="channel" singleton="false"
+ class="org.eclipse.net4j.core.impl.ChannelImpl">
+ <property name="multiplexer">
+ <ref local="multiplexer"/>
+ </property>
+ <property name="responseTimeoutMillis">
+ <value>${channel.responseTimeoutMillis}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="selectorManager"
+ class="org.eclipse.net4j.socket.impl.SelectorManagerImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="releaseExecutor"
+ class="org.eclipse.net4j.core.impl.QueueingExecutorImpl"/>
+
+ <!-- ######################################################## -->
+ <bean id="tempManager" class="org.eclipse.net4j.core.impl.TempManager">
+ <property name="releaseExecutor">
+ <ref local="releaseExecutor"/>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/auth.users b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/auth.users
new file mode 100644
index 0000000..38fac2f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/auth.users
@@ -0,0 +1 @@
+test=test
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.properties b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.properties
new file mode 100644
index 0000000..19955f0
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.properties
@@ -0,0 +1,11 @@
+# Service
+acceptor.listenAddr=0.0.0.0
+acceptor.listenPort=2036
+
+# Authentication
+passiveNegotiator.algorithmName=PBEWithMD5AndDES
+passiveNegotiator.tokenLength=128
+auth.users.file=plugin:/META-INF/net4j/server/auth.users
+
+# Internal
+connectionManager.maxConnections=50
diff --git a/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.xml b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.xml
new file mode 100644
index 0000000..82dcff5
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/net4j/server/net4j-server.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
+ "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+ <!-- ######################################################## -->
+ <bean id="propertyConfigurer"
+ class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="locations">
+ <list>
+ <value> plugin:/META-INF/net4j/server/net4j-server.properties </value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="serverControlProtocol"
+ class="org.eclipse.net4j.core.protocol.ServerControlProtocol">
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="connectionManager"
+ class="org.eclipse.net4j.core.impl.ConnectionManagerImpl">
+ <property name="maxConnections">
+ <value>${connectionManager.maxConnections}</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="acceptor" class="org.eclipse.net4j.socket.impl.SocketAcceptorImpl">
+ <property name="listenAddr">
+ <value>${acceptor.listenAddr}</value>
+ </property>
+ <property name="listenPort">
+ <value>${acceptor.listenPort}</value>
+ </property>
+ <property name="autoStart">
+ <value>false</value>
+ </property>
+ </bean>
+
+ <!-- ######################################################## -->
+ <bean id="slave" singleton="false"
+ class="org.eclipse.net4j.socket.impl.PassiveSocketConnectorImpl">
+ <property name="bufferPool">
+ <ref bean="bufferPool"/>
+ </property>
+ <property name="connectionManager">
+ <ref local="connectionManager"/>
+ </property>
+ <property name="protocolManager">
+ <ref bean="protocolManager"/>
+ </property>
+ <property name="selectorManager">
+ <ref bean="selectorManager"/>
+ </property>
+ </bean>
+
+</beans>
diff --git a/plugins/org.eclipse.emf.cdo.tests/build.properties b/plugins/org.eclipse.emf.cdo.tests/build.properties
index 3b39ee8..1ccdf67 100644
--- a/plugins/org.eclipse.emf.cdo.tests/build.properties
+++ b/plugins/org.eclipse.emf.cdo.tests/build.properties
@@ -8,12 +8,12 @@ bin.includes = plugin.xml,\
test.xml,\
META-INF/,\
epl-v10.html,\
- lib/,\
cdo.tests.jar,\
copyright.txt,\
about.html,\
plugin.properties,\
- license.html
+ license.html,\
+ model/
jars.compile.order = cdo.tests.jar
source.cdo.tests.jar = src/
output.cdo.tests.jar = bin/
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/IntegrationTest.launch b/plugins/org.eclipse.emf.cdo.tests/launches/IntegrationTest.launch
new file mode 100644
index 0000000..00b80d3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/IntegrationTest.launch
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<stringAttribute key="product" value="edu.cmu.sei.aadl.product"/>
+<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.apache.log4j,org.apache.xerces,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="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.core,org.eclipse.emf.cdo.mapping,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="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.IntegrationTest"/>
+<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"/>
+<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/lib/.cvsignore b/plugins/org.eclipse.emf.cdo.tests/lib/.cvsignore
deleted file mode 100644
index e69de29..0000000
--- a/plugins/org.eclipse.emf.cdo.tests/lib/.cvsignore
+++ /dev/null
diff --git a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
new file mode 100644
index 0000000..586af7c
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="testmodel1"
+ nsURI="http://www.eclipse.org/emf/cdo/2006/TestModel1" nsPrefix="testmodel1">
+ <eClassifiers xsi:type="ecore:EClass" name="TreeNode" eSuperTypes="../../org.eclipse.emf.cdo.client/model/client.ecore#//CDOPersistent">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//TreeNode"
+ eOpposite="#//TreeNode/children"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//TreeNode" containment="true" eOpposite="#//TreeNode/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="references" upperBound="-1"
+ eType="#//TreeNode"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="booleanFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="intFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="stringFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.genmodel b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.genmodel
new file mode 100644
index 0000000..f394e46
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.genmodel
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.emf.cdo.tests/src"
+ editDirectory="" editorDirectory="" modelPluginID="org.eclipse.emf.cdo.tests"
+ templateDirectory="platform:resource/org.eclipse.emf.cdo.client/templates" dynamicTemplates="true"
+ modelName="TestModel1" editPluginClass="" editorPluginClass="" codeFormatting="true"
+ testsDirectory="" testSuiteClass="" importerID="org.eclipse.emf.importer.ecore"
+ usedGenPackages="../../org.eclipse.emf.cdo.client/model/client.genmodel#//client">
+ <foreignModel>TestModel1.ecore</foreignModel>
+ <genPackages prefix="TestModel1" disposableProviderFactory="true" ecorePackage="TestModel1.ecore#/">
+ <genClasses ecoreClass="TestModel1.ecore#//TreeNode">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference TestModel1.ecore#//TreeNode/parent"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TestModel1.ecore#//TreeNode/children"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference TestModel1.ecore#//TreeNode/references"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestModel1.ecore#//TreeNode/booleanFeature"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestModel1.ecore#//TreeNode/intFeature"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestModel1.ecore#//TreeNode/stringFeature"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.tests/plugin.properties b/plugins/org.eclipse.emf.cdo.tests/plugin.properties
index f74040e..8b30f2f 100644
--- a/plugins/org.eclipse.emf.cdo.tests/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.tests/plugin.properties
@@ -1,2 +1,4 @@
pluginName = CDO Tests
providerName = Eclipse.org
+# ====================================================================
+
diff --git a/plugins/org.eclipse.emf.cdo.tests/plugin.xml b/plugins/org.eclipse.emf.cdo.tests/plugin.xml
index 8e49b52..586d2ae 100644
--- a/plugins/org.eclipse.emf.cdo.tests/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.tests/plugin.xml
@@ -1,5 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
+
<plugin>
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.eclipse.org/emf/cdo/2006/TestModel1"
+ class = "testmodel1.TestModel1Package"
+ genModel = "model/TestModel1.genmodel" />
+ </extension>
+
+ <extension point="org.eclipse.emf.cdo.client.mappings">
+ <mapping
+ map="META-INF/TestModel1.mapping"
+ uri="http://www.eclipse.org/emf/cdo/2006/TestModel1"/>
+ </extension>
+
</plugin>
+
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractIntegrationTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractIntegrationTest.java
new file mode 100644
index 0000000..4522eda
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractIntegrationTest.java
@@ -0,0 +1,83 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.emf.cdo.client.ResourceManager;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import junit.framework.TestCase;
+
+
+public class AbstractIntegrationTest extends TestCase
+{
+ public static final String CLIENT_SEPARATED_SERVER_MODE = "client-separated-server";
+
+ public static final String CLIENT_SERVER_MODE = "client-server";
+
+ public static final String CLIENT_MODE = "client";
+
+ public static final String EMBEDDED_MODE = "embedded";
+
+ private ITopology topology;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ topology = createTopology();
+ topology.start();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ topology.stop();
+ super.tearDown();
+ }
+
+ protected ResourceManager createResourceManager(ResourceSet resourceSet)
+ {
+ return topology.createResourceManager(resourceSet);
+ }
+
+ protected ITopology createTopology()
+ {
+ String mode = getMode();
+ if (EMBEDDED_MODE.equals(mode))
+ {
+ return new EmbeddedTopology();
+ }
+
+ if (CLIENT_MODE.equals(mode))
+ {
+ return new ClientTopology();
+ }
+
+ if (CLIENT_SERVER_MODE.equals(mode))
+ {
+ return new ClientServerTopology();
+ }
+
+ if (CLIENT_SEPARATED_SERVER_MODE.equals(mode))
+ {
+ return new ClientSeparatedServerTopology();
+ }
+
+ return null;
+ }
+
+ protected String getMode()
+ {
+ return System.getProperty("cdo.test.mode", EMBEDDED_MODE).toLowerCase();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractTopology.java
new file mode 100644
index 0000000..a164f47
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AbstractTopology.java
@@ -0,0 +1,91 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.emf.cdo.client.ResourceManager;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.net4j.spring.Container;
+import org.eclipse.net4j.spring.impl.ContainerImpl;
+
+import org.osgi.framework.Bundle;
+
+import java.net.URL;
+
+
+public abstract class AbstractTopology implements ITopology
+{
+ protected static final String NET4J_LOCATION = "META-INF/net4j/net4j.xml";
+
+ protected static final String NET4J_CLIENT_LOCATION = "META-INF/net4j/client/net4j-client.xml";
+
+ protected static final String NET4J_SERVER_LOCATION = "META-INF/net4j/server/net4j-server.xml";
+
+ protected static final String NET4J_EMBEDDED_LOCATION = "META-INF/net4j/embedded/net4j-embedded.xml";
+
+ protected static final String CDO_CLIENT_LOCATION = "META-INF/cdo/client/cdo-client.xml";
+
+ protected static final String CDO_SERVER_LOCATION = "META-INF/cdo/server/cdo-server.xml";
+
+ private String bundleLocation;
+
+ private Container cdoClient;
+
+ protected AbstractTopology()
+ {
+ }
+
+ public void start() throws Exception
+ {
+ CDOTestPlugin plugin = CDOTestPlugin.getPlugin();
+ Bundle bundle = plugin.getBundle();
+ URL url = bundle.getEntry("/");
+ bundleLocation = FileLocator.toFileURL(url).getFile();
+ }
+
+ public void stop() throws Exception
+ {
+ cdoClient.stop();
+ cdoClient = null;
+ }
+
+ public ResourceManager createResourceManager(ResourceSet resourceSet)
+ {
+ ResourceManager resourceManager = (ResourceManager) cdoClient.getBean("resourceManager");
+ resourceManager.setResourceSet(resourceSet);
+
+ try
+ {
+ resourceManager.start();
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ return null;
+ }
+
+ return resourceManager;
+ }
+
+ protected void createCDOClient(String name, Container parent)
+ {
+ cdoClient = createContainer(name, CDO_CLIENT_LOCATION, parent);
+ }
+
+ protected ContainerImpl createContainer(String name, String location, Container parent)
+ {
+ return new ContainerImpl(bundleLocation, location, name, parent, CDOTestPlugin.class
+ .getClassLoader());
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
index 96cecc3..354db0b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
@@ -1,20 +1,13 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+/***************************************************************************
+ * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: AllSuites.java,v 1.1 2006-05-29 23:06:29 nickb Exp $
- */
-
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
package org.eclipse.emf.cdo.tests;
@@ -58,4 +51,4 @@ public class AllSuites extends TestSuite
addTest(suites[i]);
}
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
index 5defe0c..1b7df5c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTests.java
@@ -1,3 +1,13 @@
+/***************************************************************************
+ * 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;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java
index 83b472d..2cc51f1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/CDOTestPlugin.java
@@ -1,36 +1,31 @@
-/**
- * <copyright>
- *
- * Copyright (c) 2002-2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
+/***************************************************************************
+ * 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:
- * IBM - Initial API and implementation
- *
- * </copyright>
- *
- * $Id: CDOTestPlugin.java,v 1.1 2006-05-29 23:06:29 nickb Exp $
- */
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
package org.eclipse.emf.cdo.tests;
-import org.eclipse.core.runtime.Plugin;
-public class CDOTestPlugin
-extends Plugin
+import org.eclipse.net4j.util.eclipse.AbstractPlugin;
+
+
+public class CDOTestPlugin extends AbstractPlugin
{
- private static CDOTestPlugin instance;
-
- public CDOTestPlugin()
- {
- super();
- instance = this;
- }
+ private static CDOTestPlugin instance;
+
+ public CDOTestPlugin()
+ {
+ super();
+ instance = this;
+ }
- public static CDOTestPlugin getPlugin()
- {
- return instance;
- }
+ public static CDOTestPlugin getPlugin()
+ {
+ return instance;
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientSeparatedServerTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientSeparatedServerTopology.java
new file mode 100644
index 0000000..d2fd35a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientSeparatedServerTopology.java
@@ -0,0 +1,70 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.net4j.core.Acceptor;
+import org.eclipse.net4j.spring.Container;
+
+
+public class ClientSeparatedServerTopology extends AbstractTopology
+{
+ private Container serverNet4j;
+
+ private Container net4jServer;
+
+ private Container cdoServer;
+
+ private Container clientNet4j;
+
+ private Container net4jClient;
+
+ private Acceptor acceptor;
+
+ public ClientSeparatedServerTopology()
+ {
+ }
+
+ public void start() throws Exception
+ {
+ super.start();
+
+ // Start server
+ serverNet4j = createContainer("net4j", NET4J_LOCATION, null);
+ net4jServer = createContainer("server", NET4J_SERVER_LOCATION, serverNet4j);
+ cdoServer = createContainer("cdo", CDO_SERVER_LOCATION, net4jServer);
+
+ acceptor = (Acceptor) cdoServer.getBean("acceptor", Acceptor.class);
+ acceptor.start();
+
+ // Start client
+ clientNet4j = createContainer("net4j", NET4J_LOCATION, null);
+ net4jClient = createContainer("client", NET4J_CLIENT_LOCATION, clientNet4j);
+ createCDOClient("cdo", net4jClient);
+ }
+
+ public void stop() throws Exception
+ {
+ super.stop();
+
+ //Stop client
+ net4jClient.stop();
+ clientNet4j.stop();
+
+ //Stop server
+ acceptor.stop();
+ acceptor = null;
+
+ cdoServer.stop();
+ net4jServer.stop();
+ serverNet4j.stop();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientServerTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientServerTopology.java
new file mode 100644
index 0000000..67e5bdb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientServerTopology.java
@@ -0,0 +1,67 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.net4j.core.Acceptor;
+import org.eclipse.net4j.spring.Container;
+
+
+public class ClientServerTopology extends AbstractTopology
+{
+ private Container net4j;
+
+ private Container net4jServer;
+
+ private Container cdoServer;
+
+ private Container net4jClient;
+
+ private Acceptor acceptor;
+
+ public ClientServerTopology()
+ {
+ }
+
+ public void start() throws Exception
+ {
+ super.start();
+ net4j = createContainer("net4j", NET4J_LOCATION, null);
+
+ // Start server
+ net4jServer = createContainer("server", NET4J_SERVER_LOCATION, net4j);
+ cdoServer = createContainer("cdo", CDO_SERVER_LOCATION, net4jServer);
+
+ acceptor = (Acceptor) cdoServer.getBean("acceptor", Acceptor.class);
+ acceptor.start();
+
+ // Start client
+ net4jClient = createContainer("client", NET4J_CLIENT_LOCATION, net4j);
+ createCDOClient("cdo", net4jClient);
+ }
+
+ public void stop() throws Exception
+ {
+ super.stop();
+
+ //Stop client
+ net4jClient.stop();
+
+ //Stop server
+ acceptor.stop();
+ acceptor = null;
+
+ cdoServer.stop();
+ net4jServer.stop();
+
+ net4j.stop();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientTopology.java
new file mode 100644
index 0000000..ad0e939
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ClientTopology.java
@@ -0,0 +1,27 @@
+/***************************************************************************
+ * 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;
+
+
+public class ClientTopology extends AbstractTopology
+{
+ public ClientTopology()
+ {
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop() throws Exception
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EmbeddedTopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EmbeddedTopology.java
new file mode 100644
index 0000000..2ed0a89
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/EmbeddedTopology.java
@@ -0,0 +1,27 @@
+/***************************************************************************
+ * 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;
+
+
+public class EmbeddedTopology extends AbstractTopology
+{
+ public EmbeddedTopology()
+ {
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop() throws Exception
+ {
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ITopology.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ITopology.java
new file mode 100644
index 0000000..61b5e7a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ITopology.java
@@ -0,0 +1,26 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.emf.cdo.client.ResourceManager;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+
+
+public interface ITopology
+{
+ public void start() throws Exception;
+
+ public void stop() throws Exception;
+
+ public ResourceManager createResourceManager(ResourceSet resourceSet);
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IntegrationTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IntegrationTest.java
new file mode 100644
index 0000000..702294f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/IntegrationTest.java
@@ -0,0 +1,62 @@
+/***************************************************************************
+ * 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;
+
+
+import org.eclipse.emf.cdo.client.CDOResource;
+import org.eclipse.emf.cdo.client.ResourceManager;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+
+import testmodel1.TestModel1Factory;
+import testmodel1.TreeNode;
+
+import java.util.Arrays;
+
+
+public class IntegrationTest extends AbstractIntegrationTest
+{
+ public void testSimple() throws Exception
+ {
+ ResourceSet resourceSet = new ResourceSetImpl();
+ ResourceManager resourceManager = createResourceManager(resourceSet);
+
+ CDOResource resource = (CDOResource) resourceSet.createResource(URI
+ .createURI("cdo:///test/res1"));
+
+ TreeNode node0 = createNode("node0", null);
+ TreeNode node1 = createNode("node1", node0);
+ TreeNode node2 = createNode("node2", node0);
+ TreeNode node3 = createNode("node3", node0);
+
+ resource.getContents().add(node0);
+ resourceManager.commit();
+ resourceManager.stop();
+
+ }
+
+ protected TreeNode createNode(String name, TreeNode parent)
+ {
+ TreeNode node = TestModel1Factory.eINSTANCE.createTreeNode();
+ node.setStringFeature(name);
+ node.setParent(parent);
+ return node;
+ }
+
+ protected TreeNode createNode(String name, TreeNode parent, TreeNode[] references)
+ {
+ TreeNode node = createNode(name, parent);
+ node.getReferences().add(Arrays.asList(references));
+ return node;
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java
index e91d717..dc691c8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/SampleTest.java
@@ -1,3 +1,13 @@
+/***************************************************************************
+ * 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;
import junit.framework.TestCase;
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 0000000..a2254ec
--- /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 0000000..35c5fee
--- /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 0000000..95e0fb5
--- /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 0000000..d3684d8
--- /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 0000000..d9b692e
--- /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 0000000..4a084bd
--- /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 0000000..dd4732b
--- /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 0000000..6ed1b96
--- /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