Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java39
1 files changed, 27 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
index 4424bae36f..7e95d70e13 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf/src-gen/org/eclipse/emf/cdo/dawn/codegen/dawngenmodel/gmf/dawnGmfGenmodel/util/DawnGmfGenmodelSwitch.java
@@ -14,9 +14,10 @@ import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.DawnFragmentGenerator;
import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGMFGenerator;
import org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.util.Switch;
+
+import java.util.List;
/**
* <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
@@ -26,9 +27,8 @@ import org.eclipse.emf.ecore.util.Switch;
*
* @see org.eclipse.emf.cdo.dawn.codegen.dawngenmodel.gmf.dawnGmfGenmodel.DawnGmfGenmodelPackage
* @generated
- * @author Martin Fluegge
*/
-public class DawnGmfGenmodelSwitch<T> extends Switch<T>
+public class DawnGmfGenmodelSwitch<T>
{
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -58,16 +58,33 @@ public class DawnGmfGenmodelSwitch<T> extends Switch<T>
}
/**
- * Checks whether this is a switch for the given package. <!-- begin-user-doc --> <!-- end-user-doc -->
+ * 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 -->
*
- * @parameter ePackage the package in question.
- * @return whether this is a switch for the given package.
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
- @Override
- protected boolean isSwitchFor(EPackage ePackage)
+ public T doSwitch(EObject theEObject)
{
- return ePackage == modelPackage;
+ 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 T doSwitch(EClass theEClass, EObject theEObject)
+ {
+ if (theEClass.eContainer() == modelPackage)
+ {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
}
/**
@@ -77,7 +94,6 @@ public class DawnGmfGenmodelSwitch<T> extends Switch<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)
@@ -143,7 +159,6 @@ public class DawnGmfGenmodelSwitch<T> extends Switch<T>
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
- @Override
public T defaultCase(EObject object)
{
return null;

Back to the top