Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java336
1 files changed, 232 insertions, 104 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java
index f9995e2210f..b20f72db52e 100644
--- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/timing/events/impl/EventFunctionClientServerPortImpl.java
@@ -15,20 +15,21 @@
*****************************************************************************/
package org.eclipse.papyrus.eastadl.timing.events.impl;
-import java.util.Collection;
-
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionClientServerPort;
-import org.eclipse.papyrus.eastadl.structure.functionmodeling.FunctionPrototype;
+import org.eclipse.papyrus.eastadl.infrastructure.EventFunctionClientServerPortInstanceRef;
+import org.eclipse.papyrus.eastadl.infrastructure.datatypes.EADatatype;
+import org.eclipse.papyrus.eastadl.infrastructure.values.EAExpression;
+import org.eclipse.papyrus.eastadl.infrastructure.values.EAValue;
+import org.eclipse.papyrus.eastadl.infrastructure.values.ValuesPackage;
import org.eclipse.papyrus.eastadl.timing.events.EventFunctionClientServerPort;
import org.eclipse.papyrus.eastadl.timing.events.EventFunctionClientServerPortKind;
import org.eclipse.papyrus.eastadl.timing.events.EventsPackage;
import org.eclipse.papyrus.eastadl.timing.impl.EventImpl;
+import org.eclipse.uml2.uml.ValueSpecification;
/**
@@ -38,21 +39,40 @@ import org.eclipse.papyrus.eastadl.timing.impl.EventImpl;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getEventKind <em>Event Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getPort <em>Port</em>}</li>
- * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getPort_path <em>Port path</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getType <em>Type</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getBase_ValueSpecification <em>Base Value Specification</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getEventKind <em>Event Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.timing.events.impl.EventFunctionClientServerPortImpl#getPort <em>Port</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class EventFunctionClientServerPortImpl extends EventImpl implements EventFunctionClientServerPort {
+ /**
+ * The cached value of the '{@link #getType() <em>Type</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getType()
+ * @generated
+ * @ordered
+ */
+ protected EADatatype type;
+
+ /**
+ * The cached value of the '{@link #getBase_ValueSpecification() <em>Base Value Specification</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBase_ValueSpecification()
+ * @generated
+ * @ordered
+ */
+ protected ValueSpecification base_ValueSpecification;
/**
* The default value of the '{@link #getEventKind() <em>Event Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getEventKind()
* @generated
* @ordered
@@ -63,7 +83,6 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
* The cached value of the '{@link #getEventKind() <em>Event Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getEventKind()
* @generated
* @ordered
@@ -71,107 +90,130 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
protected EventFunctionClientServerPortKind eventKind = EVENT_KIND_EDEFAULT;
/**
- * The cached value of the '{@link #getPort() <em>Port</em>}' reference.
+ * The cached value of the '{@link #getPort() <em>Port</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getPort()
* @generated
* @ordered
*/
- protected FunctionClientServerPort port;
+ protected EventFunctionClientServerPortInstanceRef port;
/**
- * The cached value of the '{@link #getPort_path() <em>Port path</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
- * @see #getPort_path()
* @generated
- * @ordered
*/
- protected EList<FunctionPrototype> port_path;
+ protected EventFunctionClientServerPortImpl() {
+ super();
+ }
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- protected EventFunctionClientServerPortImpl() {
- super();
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE:
+ if (resolve) return getType();
+ return basicGetType();
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION:
+ if (resolve) return getBase_ValueSpecification();
+ return basicGetBase_ValueSpecification();
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
+ return getEventKind();
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
+ return getPort();
+ }
+ return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- public FunctionClientServerPort basicGetPort() {
- return port;
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE:
+ return type != null;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION:
+ return base_ValueSpecification != null;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
+ return eventKind != EVENT_KIND_EDEFAULT;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
+ return port != null;
+ }
+ return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
- return getEventKind();
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
- if(resolve)
- return getPort();
- return basicGetPort();
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT_PATH:
- return getPort_path();
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == EAValue.class) {
+ switch (derivedFeatureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE: return ValuesPackage.EA_VALUE__TYPE;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION: return ValuesPackage.EA_VALUE__BASE_VALUE_SPECIFICATION;
+ default: return -1;
+ }
}
- return super.eGet(featureID, resolve, coreType);
+ if (baseClass == EAExpression.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
- public boolean eIsSet(int featureID) {
- switch(featureID) {
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
- return eventKind != EVENT_KIND_EDEFAULT;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
- return port != null;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT_PATH:
- return port_path != null && !port_path.isEmpty();
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == EAValue.class) {
+ switch (baseFeatureID) {
+ case ValuesPackage.EA_VALUE__TYPE: return EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE;
+ case ValuesPackage.EA_VALUE__BASE_VALUE_SPECIFICATION: return EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION;
+ default: return -1;
+ }
}
- return super.eIsSet(featureID);
+ if (baseClass == EAExpression.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
- setEventKind((EventFunctionClientServerPortKind)newValue);
- return;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
- setPort((FunctionClientServerPort)newValue);
- return;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT_PATH:
- getPort_path().clear();
- getPort_path().addAll((Collection<? extends FunctionPrototype>)newValue);
- return;
+ switch (featureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE:
+ setType((EADatatype)newValue);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION:
+ setBase_ValueSpecification((ValueSpecification)newValue);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
+ setEventKind((EventFunctionClientServerPortKind)newValue);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
+ setPort((EventFunctionClientServerPortInstanceRef)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -179,7 +221,6 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -190,21 +231,99 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @generated
+ */
+ public EADatatype getType() {
+ if (type != null && type.eIsProxy()) {
+ InternalEObject oldType = (InternalEObject)type;
+ type = (EADatatype)eResolveProxy(oldType);
+ if (type != oldType) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE, oldType, type));
+ }
+ }
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EADatatype basicGetType() {
+ return type;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setType(EADatatype newType) {
+ EADatatype oldType = type;
+ type = newType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE, oldType, type));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueSpecification getBase_ValueSpecification() {
+ if (base_ValueSpecification != null && base_ValueSpecification.eIsProxy()) {
+ InternalEObject oldBase_ValueSpecification = (InternalEObject)base_ValueSpecification;
+ base_ValueSpecification = (ValueSpecification)eResolveProxy(oldBase_ValueSpecification);
+ if (base_ValueSpecification != oldBase_ValueSpecification) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION, oldBase_ValueSpecification, base_ValueSpecification));
+ }
+ }
+ return base_ValueSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ValueSpecification basicGetBase_ValueSpecification() {
+ return base_ValueSpecification;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setBase_ValueSpecification(ValueSpecification newBase_ValueSpecification) {
+ ValueSpecification oldBase_ValueSpecification = base_ValueSpecification;
+ base_ValueSpecification = newBase_ValueSpecification;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION, oldBase_ValueSpecification, base_ValueSpecification));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
- setEventKind(EVENT_KIND_EDEFAULT);
- return;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
- setPort((FunctionClientServerPort)null);
- return;
- case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT_PATH:
- getPort_path().clear();
- return;
+ switch (featureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__TYPE:
+ setType((EADatatype)null);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__BASE_VALUE_SPECIFICATION:
+ setBase_ValueSpecification((ValueSpecification)null);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND:
+ setEventKind(EVENT_KIND_EDEFAULT);
+ return;
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
+ setPort((EventFunctionClientServerPortInstanceRef)null);
+ return;
}
super.eUnset(featureID);
}
@@ -212,7 +331,6 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public EventFunctionClientServerPortKind getEventKind() {
@@ -222,70 +340,80 @@ public class EventFunctionClientServerPortImpl extends EventImpl implements Even
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- public FunctionClientServerPort getPort() {
- if(port != null && port.eIsProxy()) {
- InternalEObject oldPort = (InternalEObject)port;
- port = (FunctionClientServerPort)eResolveProxy(oldPort);
- if(port != oldPort) {
- if(eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, oldPort, port));
- }
- }
+ public EventFunctionClientServerPortInstanceRef getPort() {
return port;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- public void setEventKind(EventFunctionClientServerPortKind newEventKind) {
- EventFunctionClientServerPortKind oldEventKind = eventKind;
- eventKind = newEventKind == null ? EVENT_KIND_EDEFAULT : newEventKind;
- if(eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND, oldEventKind, eventKind));
+ public NotificationChain basicSetPort(EventFunctionClientServerPortInstanceRef newPort, NotificationChain msgs) {
+ EventFunctionClientServerPortInstanceRef oldPort = port;
+ port = newPort;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, oldPort, newPort);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- public void setPort(FunctionClientServerPort newPort) {
- FunctionClientServerPort oldPort = port;
- port = newPort;
- if(eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, oldPort, port));
+ public void setPort(EventFunctionClientServerPortInstanceRef newPort) {
+ if (newPort != port) {
+ NotificationChain msgs = null;
+ if (port != null)
+ msgs = ((InternalEObject)port).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, null, msgs);
+ if (newPort != null)
+ msgs = ((InternalEObject)newPort).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, null, msgs);
+ msgs = basicSetPort(newPort, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT, newPort, newPort));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
- public EList<FunctionPrototype> getPort_path() {
- if(port_path == null) {
- port_path = new EObjectResolvingEList<FunctionPrototype>(FunctionPrototype.class, this, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT_PATH);
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__PORT:
+ return basicSetPort(null, msgs);
}
- return port_path;
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEventKind(EventFunctionClientServerPortKind newEventKind) {
+ EventFunctionClientServerPortKind oldEventKind = eventKind;
+ eventKind = newEventKind == null ? EVENT_KIND_EDEFAULT : newEventKind;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, EventsPackage.EVENT_FUNCTION_CLIENT_SERVER_PORT__EVENT_KIND, oldEventKind, eventKind));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public String toString() {
- if(eIsProxy())
- return super.toString();
+ if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (eventKind: ");

Back to the top