diff options
Diffstat (limited to 'extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java')
-rw-r--r-- | extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java | 230 |
1 files changed, 148 insertions, 82 deletions
diff --git a/extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java b/extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java index bf214bba8c3..705f3661789 100644 --- a/extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java +++ b/extraplugins/diagram-definition/org.eclipse.papyrus.umldi/src/org/eclipse/papyrus/umldi/util/UMLDISwitch.java @@ -27,21 +27,23 @@ import org.eclipse.papyrus.umldi.*; /** * <!-- 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, + * 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 org.eclipse.papyrus.umldi.UMLDIPackage * @generated */ public class UMLDISwitch<T> extends Switch<T> { + /** * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ protected static UMLDIPackage modelPackage; @@ -50,10 +52,11 @@ public class UMLDISwitch<T> extends Switch<T> { * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public UMLDISwitch() { - if (modelPackage == null) { + if(modelPackage == null) { modelPackage = UMLDIPackage.eINSTANCE; } } @@ -62,6 +65,7 @@ public class UMLDISwitch<T> extends Switch<T> { * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated @@ -75,76 +79,113 @@ public class UMLDISwitch<T> extends Switch<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 */ @Override protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case UMLDIPackage.UML_DIAGRAM: { - UmlDiagram umlDiagram = (UmlDiagram)theEObject; - T result = caseUmlDiagram(umlDiagram); - if (result == null) result = caseUmlShape(umlDiagram); - if (result == null) result = caseDiagram(umlDiagram); - if (result == null) result = caseUmlDiagramElement(umlDiagram); - if (result == null) result = caseShape(umlDiagram); - if (result == null) result = caseDiagramElement(umlDiagram); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_SHAPE: { - UmlShape umlShape = (UmlShape)theEObject; - T result = caseUmlShape(umlShape); - if (result == null) result = caseUmlDiagramElement(umlShape); - if (result == null) result = caseShape(umlShape); - if (result == null) result = caseDiagramElement(umlShape); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_DIAGRAM_ELEMENT: { - UmlDiagramElement umlDiagramElement = (UmlDiagramElement)theEObject; - T result = caseUmlDiagramElement(umlDiagramElement); - if (result == null) result = caseDiagramElement(umlDiagramElement); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_STYLE: { - UmlStyle umlStyle = (UmlStyle)theEObject; - T result = caseUmlStyle(umlStyle); - if (result == null) result = caseStyle(umlStyle); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_EDGE: { - UmlEdge umlEdge = (UmlEdge)theEObject; - T result = caseUmlEdge(umlEdge); - if (result == null) result = caseUmlDiagramElement(umlEdge); - if (result == null) result = caseEdge(umlEdge); - if (result == null) result = caseDiagramElement(umlEdge); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_COMPARTMENT: { - UmlCompartment umlCompartment = (UmlCompartment)theEObject; - T result = caseUmlCompartment(umlCompartment); - if (result == null) result = caseUmlShape(umlCompartment); - if (result == null) result = caseUmlDiagramElement(umlCompartment); - if (result == null) result = caseShape(umlCompartment); - if (result == null) result = caseDiagramElement(umlCompartment); - if (result == null) result = defaultCase(theEObject); - return result; - } - case UMLDIPackage.UML_LABEL: { - UmlLabel umlLabel = (UmlLabel)theEObject; - T result = caseUmlLabel(umlLabel); - if (result == null) result = caseUmlShape(umlLabel); - if (result == null) result = caseUmlDiagramElement(umlLabel); - if (result == null) result = caseShape(umlLabel); - if (result == null) result = caseDiagramElement(umlLabel); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); + switch(classifierID) { + case UMLDIPackage.UML_DIAGRAM: + { + UmlDiagram umlDiagram = (UmlDiagram)theEObject; + T result = caseUmlDiagram(umlDiagram); + if(result == null) + result = caseUmlShape(umlDiagram); + if(result == null) + result = caseDiagram(umlDiagram); + if(result == null) + result = caseUmlDiagramElement(umlDiagram); + if(result == null) + result = caseShape(umlDiagram); + if(result == null) + result = caseDiagramElement(umlDiagram); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_SHAPE: + { + UmlShape umlShape = (UmlShape)theEObject; + T result = caseUmlShape(umlShape); + if(result == null) + result = caseUmlDiagramElement(umlShape); + if(result == null) + result = caseShape(umlShape); + if(result == null) + result = caseDiagramElement(umlShape); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_DIAGRAM_ELEMENT: + { + UmlDiagramElement umlDiagramElement = (UmlDiagramElement)theEObject; + T result = caseUmlDiagramElement(umlDiagramElement); + if(result == null) + result = caseDiagramElement(umlDiagramElement); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_STYLE: + { + UmlStyle umlStyle = (UmlStyle)theEObject; + T result = caseUmlStyle(umlStyle); + if(result == null) + result = caseStyle(umlStyle); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_EDGE: + { + UmlEdge umlEdge = (UmlEdge)theEObject; + T result = caseUmlEdge(umlEdge); + if(result == null) + result = caseUmlDiagramElement(umlEdge); + if(result == null) + result = caseEdge(umlEdge); + if(result == null) + result = caseDiagramElement(umlEdge); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_COMPARTMENT: + { + UmlCompartment umlCompartment = (UmlCompartment)theEObject; + T result = caseUmlCompartment(umlCompartment); + if(result == null) + result = caseUmlShape(umlCompartment); + if(result == null) + result = caseUmlDiagramElement(umlCompartment); + if(result == null) + result = caseShape(umlCompartment); + if(result == null) + result = caseDiagramElement(umlCompartment); + if(result == null) + result = defaultCase(theEObject); + return result; + } + case UMLDIPackage.UML_LABEL: + { + UmlLabel umlLabel = (UmlLabel)theEObject; + T result = caseUmlLabel(umlLabel); + if(result == null) + result = caseUmlShape(umlLabel); + if(result == null) + result = caseUmlDiagramElement(umlLabel); + if(result == null) + result = caseShape(umlLabel); + if(result == null) + result = caseDiagramElement(umlLabel); + if(result == null) + result = defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); } } @@ -154,7 +195,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Diagram</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -169,7 +212,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Diagram Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -184,7 +229,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Style</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -199,7 +246,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Edge</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -214,7 +263,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Compartment</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -229,7 +280,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Label</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -244,7 +297,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Uml Shape</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -259,7 +314,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Diagram Element</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -274,7 +331,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Shape</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -289,7 +348,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Diagram</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -304,7 +365,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Style</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -319,7 +382,9 @@ public class UMLDISwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Edge</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -334,7 +399,9 @@ public class UMLDISwitch<T> extends Switch<T> { * 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. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated @@ -343,5 +410,4 @@ public class UMLDISwitch<T> extends Switch<T> { public T defaultCase(EObject object) { return null; } - } //UMLDISwitch |