Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2009-05-07 08:47:11 +0000
committerEike Stepper2009-05-07 08:47:11 +0000
commit094105ef12cce8aed82402a29be2bf5684196e4a (patch)
tree015cb123284232a5ca304670fc2209c887f6b6fa
parentd012ead3b732be8aae58f9bf34ce2f3f9037311e (diff)
downloadcdo-094105ef12cce8aed82402a29be2bf5684196e4a.tar.gz
cdo-094105ef12cce8aed82402a29be2bf5684196e4a.tar.xz
cdo-094105ef12cce8aed82402a29be2bf5684196e4a.zip
[247226] Transparently support legacy models
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247226
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/UMLTest.launch19
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/UMLTest.java88
3 files changed, 1 insertions, 109 deletions
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 75f79d5b1e..089d6834b6 100644
--- a/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests/META-INF/MANIFEST.MF
@@ -24,8 +24,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo.tests.model4interfaces;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.tests.model5;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo.defs;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
- org.junit;bundle-version="[3.8.0,4.0.0)";visibility:=reexport,
- org.eclipse.uml2.uml;bundle-version="[3.0.0,4.0.0)";resolution:=optional
+ org.junit;bundle-version="[3.8.0,4.0.0)";visibility:=reexport
Export-Package: base;version="2.0.0",
base.impl;version="2.0.0",
base.util;version="2.0.0",
diff --git a/plugins/org.eclipse.emf.cdo.tests/UMLTest.launch b/plugins/org.eclipse.emf.cdo.tests/UMLTest.launch
deleted file mode 100644
index fbd3d5b385..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests/UMLTest.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/UMLTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.UMLTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests"/>
-</launchConfiguration>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/UMLTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/UMLTest.java
deleted file mode 100644
index a0b01d522d..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/UMLTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
- * 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.CDOObject;
-import org.eclipse.emf.cdo.CDOState;
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
-
-import org.eclipse.emf.internal.cdo.CDOLegacyWrapper;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.UMLFactory;
-
-/**
- * @author Eike Stepper
- */
-public class UMLTest extends AbstractCDOTest
-{
- public void _testCommit() throws Exception
- {
- Class umlClass = UMLFactory.eINSTANCE.createClass();
- umlClass.setName("TestClass");
- umlClass.setIsAbstract(false);
- // TODO umlClass.setVisibility(VisibilityKind.PUBLIC_LITERAL);
-
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource("/test1");
- resource.getContents().add(umlClass);
- transaction.commit();
-
- CDOObject cdoClass = CDOUtil.getCDOObject(umlClass);
- assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoClass));
- assertEquals(CDOState.CLEAN, cdoClass.cdoState());
- assertEquals(CDOState.CLEAN, resource.cdoState());
- session.close();
- }
-
- public void testLoad() throws Exception
- {
- {
- Class umlClass = UMLFactory.eINSTANCE.createClass();
- umlClass.setName("TestClass");
- umlClass.setIsAbstract(false);
- // TODO umlClass.setVisibility(VisibilityKind.PUBLIC_LITERAL);
-
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource("/test1");
- resource.getContents().add(umlClass);
-
- assertNew(umlClass, transaction);
-
- transaction.commit();
- session.close();
- }
-
- CDOSession session = openSession();
- CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.getResource("/test1");
- EList<EObject> contents = resource.getContents();
-
- Class umlClass = (Class)contents.get(0);
- CDOObject cdoClass = CDOUtil.getCDOObject(umlClass);
- assertEquals(false, CDOLegacyWrapper.isLegacyProxy(cdoClass));
- assertEquals(CDOState.CLEAN, cdoClass.cdoState());
- assertEquals(CDOState.CLEAN, resource.cdoState());
-
- String name = umlClass.getName();
- assertEquals("Mr. Hook", name);
- assertEquals(CDOState.CLEAN, cdoClass.cdoState());
- session.close();
- }
-}

Back to the top