Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-02-19 08:18:48 +0000
committerEike Stepper2010-02-19 08:18:48 +0000
commit54d7b51c400797617dfa3b6ded279a51ab7d5231 (patch)
tree1d1e8c8bd5ee9f3a002b522422be5689d0a43832 /plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util
parent28274c6e446ea59169074e1ce0541be8e1b853fa (diff)
downloadcdo-54d7b51c400797617dfa3b6ded279a51ab7d5231.tar.gz
cdo-54d7b51c400797617dfa3b6ded279a51ab7d5231.tar.xz
cdo-54d7b51c400797617dfa3b6ded279a51ab7d5231.zip
[303279] Problem with CDOStore's toArray() implementation
https://bugs.eclipse.org/bugs/show_bug.cgi?id=303279
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java26
2 files changed, 47 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java
index 8f5ef64722..ce22ea4669 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.legacy.model3.util;
import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package;
import org.eclipse.emf.cdo.tests.model3.Class1;
import org.eclipse.emf.cdo.tests.model3.MetaRef;
+import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
@@ -90,6 +91,12 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter casePolygon(Polygon object)
+ {
+ return createPolygonAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -139,6 +146,20 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Polygon
+ * <em>Polygon</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.tests.legacy.model3.Polygon
+ * @generated
+ */
+ public Adapter createPolygonAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case. <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
index 07f0e0ab25..0541736405 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.legacy.model3.util;
import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package;
import org.eclipse.emf.cdo.tests.model3.Class1;
import org.eclipse.emf.cdo.tests.model3.MetaRef;
+import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -113,6 +114,16 @@ public class Model3Switch<T>
}
return result;
}
+ case Model3Package.POLYGON:
+ {
+ Polygon polygon = (Polygon)theEObject;
+ T result = casePolygon(polygon);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -149,6 +160,21 @@ public class Model3Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Polygon</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 interpreting the object as an instance of '<em>Polygon</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePolygon(Polygon object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting 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 -->

Back to the top