diff options
Diffstat (limited to 'extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/FormalExpressionImpl.java')
-rw-r--r-- | extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/FormalExpressionImpl.java | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/FormalExpressionImpl.java b/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/FormalExpressionImpl.java new file mode 100644 index 00000000000..f2a1ca6db49 --- /dev/null +++ b/extraplugins/bpmn/org.eclipse.papyrus.bpmn/src/org/eclipse/papyrus/bpmn/BPMNProfile/impl/FormalExpressionImpl.java @@ -0,0 +1,209 @@ +/** + */ +package org.eclipse.papyrus.bpmn.BPMNProfile.impl; + +import java.lang.reflect.InvocationTargetException; + +import java.util.Map; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.BasicDiagnostic; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.common.util.DiagnosticChain; +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.emf.ecore.util.EObjectValidator; + +import org.eclipse.papyrus.bpmn.BPMNProfile.BPMNProfilePackage; +import org.eclipse.papyrus.bpmn.BPMNProfile.FormalExpression; +import org.eclipse.papyrus.bpmn.BPMNProfile.ItemDefinition; + +import org.eclipse.papyrus.bpmn.BPMNProfile.util.BPMNProfileValidator; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Formal Expression</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link org.eclipse.papyrus.bpmn.BPMNProfile.impl.FormalExpressionImpl#getEvaluatesToTypeRef <em>Evaluates To Type Ref</em>}</li> + * </ul> + * + * @generated + */ +public class FormalExpressionImpl extends BPMNExpressionImpl implements FormalExpression { + /** + * The cached value of the '{@link #getEvaluatesToTypeRef() <em>Evaluates To Type Ref</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEvaluatesToTypeRef() + * @generated + * @ordered + */ + protected ItemDefinition evaluatesToTypeRef; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FormalExpressionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return BPMNProfilePackage.eINSTANCE.getFormalExpression(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ItemDefinition getEvaluatesToTypeRef() { + if (evaluatesToTypeRef != null && evaluatesToTypeRef.eIsProxy()) { + InternalEObject oldEvaluatesToTypeRef = (InternalEObject)evaluatesToTypeRef; + evaluatesToTypeRef = (ItemDefinition)eResolveProxy(oldEvaluatesToTypeRef); + if (evaluatesToTypeRef != oldEvaluatesToTypeRef) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF, oldEvaluatesToTypeRef, evaluatesToTypeRef)); + } + } + return evaluatesToTypeRef; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ItemDefinition basicGetEvaluatesToTypeRef() { + return evaluatesToTypeRef; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setEvaluatesToTypeRef(ItemDefinition newEvaluatesToTypeRef) { + ItemDefinition oldEvaluatesToTypeRef = evaluatesToTypeRef; + evaluatesToTypeRef = newEvaluatesToTypeRef; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF, oldEvaluatesToTypeRef, evaluatesToTypeRef)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean FormalExpressionevaluatesToTypeRef(DiagnosticChain diagnostics, Map<Object, Object> context) { + // TODO: implement this method + // -> specify the condition that violates the invariant + // -> verify the details of the diagnostic, including severity and message + // Ensure that you remove @generated or mark it @generated NOT + if (false) { + if (diagnostics != null) { + diagnostics.add + (new BasicDiagnostic + (Diagnostic.ERROR, + BPMNProfileValidator.DIAGNOSTIC_SOURCE, + BPMNProfileValidator.FORMAL_EXPRESSION__FORMAL_EXPRESSIONEVALUATES_TO_TYPE_REF, + EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "FormalExpressionevaluatesToTypeRef", EObjectValidator.getObjectLabel(this, context) }), + new Object [] { this })); + } + return false; + } + return true; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF: + if (resolve) return getEvaluatesToTypeRef(); + return basicGetEvaluatesToTypeRef(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF: + setEvaluatesToTypeRef((ItemDefinition)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF: + setEvaluatesToTypeRef((ItemDefinition)null); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case BPMNProfilePackage.FORMAL_EXPRESSION__EVALUATES_TO_TYPE_REF: + return evaluatesToTypeRef != null; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + @SuppressWarnings("unchecked") + public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { + switch (operationID) { + case BPMNProfilePackage.FORMAL_EXPRESSION___FORMAL_EXPRESSIONEVALUATES_TO_TYPE_REF__DIAGNOSTICCHAIN_MAP: + return FormalExpressionevaluatesToTypeRef((DiagnosticChain)arguments.get(0), (Map<Object, Object>)arguments.get(1)); + } + return super.eInvoke(operationID, arguments); + } + +} //FormalExpressionImpl |