Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2011-04-27 06:35:59 +0000
committerEike Stepper2011-04-27 06:35:59 +0000
commitfded99cf0741a2c5b6e95dd8b5d3d13c67b0f7d2 (patch)
treecd38e7a9994b2810de7de9d9b73fbaaebc2c1a6d /plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf
parentabb11df5b0d5f912c34d39cf774a8e9cf7bf7e78 (diff)
downloadcdo-fded99cf0741a2c5b6e95dd8b5d3d13c67b0f7d2.tar.gz
cdo-fded99cf0741a2c5b6e95dd8b5d3d13c67b0f7d2.tar.xz
cdo-fded99cf0741a2c5b6e95dd8b5d3d13c67b0f7d2.zip
[343471] CommitIntegrityCheck fails for object moved to different resource
https://bugs.eclipse.org/bugs/show_bug.cgi?id=343471
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java40
1 files changed, 11 insertions, 29 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
index dfe2bcd5b5..bd315a5435 100644
--- a/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.mango/src/org/eclipse/emf/cdo/tests/mango/util/MangoSwitch.java
@@ -15,10 +15,9 @@ import org.eclipse.emf.cdo.tests.mango.MangoParameter;
import org.eclipse.emf.cdo.tests.mango.MangoValue;
import org.eclipse.emf.cdo.tests.mango.MangoValueList;
-import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-
-import java.util.List;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
@@ -29,7 +28,7 @@ import java.util.List;
* @see org.eclipse.emf.cdo.tests.mango.MangoPackage
* @generated
*/
-public class MangoSwitch<T>
+public class MangoSwitch<T> extends Switch<T>
{
/**
* The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -52,35 +51,16 @@ public class MangoSwitch<T>
}
/**
- * 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 T 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 -->
+ * Checks whether this is a switch for the given package. <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
* @generated
*/
- protected T doSwitch(EClass theEClass, EObject theEObject)
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage)
{
- if (theEClass.eContainer() == modelPackage)
- {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else
- {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
+ return ePackage == modelPackage;
}
/**
@@ -90,6 +70,7 @@ public class MangoSwitch<T>
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
+ @Override
protected T doSwitch(int classifierID, EObject theEObject)
{
switch (classifierID)
@@ -179,6 +160,7 @@ public class MangoSwitch<T>
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
+ @Override
public T defaultCase(EObject object)
{
return null;

Back to the top