Explorar o código

removed EventDirection enum from sruntime and reuse Direction enum

to avoid confusion which enumeration to use
andreas muelder %!s(int64=7) %!d(string=hai) anos
pai
achega
85f639d469

+ 48 - 53
plugins/org.yakindu.sct.model.sruntime/model/sruntime.ecore

@@ -1,53 +1,48 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sruntime" nsURI="http://www.yakindu.org/sct/sruntime/2.0.0"
-    nsPrefix="sruntime">
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionContext" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement #//CompositeSlot">
-    <eOperations name="getRaisedEvents" upperBound="-1" eType="#//ExecutionEvent"/>
-    <eOperations name="getVariable" eType="#//ExecutionVariable">
-      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    </eOperations>
-    <eOperations name="getEvent" eType="#//ExecutionEvent">
-      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    </eOperations>
-    <eOperations name="getAllEvents" upperBound="-1" eType="#//ExecutionEvent"/>
-    <eOperations name="getAllVariables" upperBound="-1" eType="#//ExecutionVariable"/>
-    <eOperations name="getAllSlots" upperBound="-1" eType="#//ExecutionSlot"/>
-    <eOperations name="getSlot" eType="#//ExecutionSlot">
-      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    </eOperations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="activeStates" upperBound="-1"
-        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="executedElements" upperBound="-1"
-        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="suspendedElements" upperBound="-1"
-        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="snapshot" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionEvent" eSuperTypes="#//ExecutionSlot">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="raised" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="#//EventDirection"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionSlot" abstract="true" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//JavaObject"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fqName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="writable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        defaultValueLiteral="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass ../../org.yakindu.base.types/model/types.ecore#//Type"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionVariable" eSuperTypes="#//ExecutionSlot"/>
-  <eClassifiers xsi:type="ecore:EClass" name="CompositeSlot" eSuperTypes="#//ExecutionSlot">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="slots" upperBound="-1"
-        eType="#//ExecutionSlot" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EEnum" name="EventDirection">
-    <eLiterals name="LOCAL"/>
-    <eLiterals name="IN" value="1"/>
-    <eLiterals name="OUT" value="2"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EDataType" name="JavaObject" instanceClassName="java.lang.Object"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ReferenceSlot" eSuperTypes="#//CompositeSlot">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="reference" eType="#//ExecutionSlot"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ExecutionOperation" eSuperTypes="#//ExecutionVariable"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sruntime" nsURI="http://www.yakindu.org/sct/sruntime/2.0.0"
+    nsPrefix="sruntime">
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionContext" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement #//CompositeSlot">
+    <eOperations name="getRaisedEvents" upperBound="-1" eType="#//ExecutionEvent"/>
+    <eOperations name="getVariable" eType="#//ExecutionVariable">
+      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    </eOperations>
+    <eOperations name="getEvent" eType="#//ExecutionEvent">
+      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    </eOperations>
+    <eOperations name="getAllEvents" upperBound="-1" eType="#//ExecutionEvent"/>
+    <eOperations name="getAllVariables" upperBound="-1" eType="#//ExecutionVariable"/>
+    <eOperations name="getAllSlots" upperBound="-1" eType="#//ExecutionSlot"/>
+    <eOperations name="getSlot" eType="#//ExecutionSlot">
+      <eParameters name="qualifiedName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    </eOperations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="activeStates" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="executedElements" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="suspendedElements" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="snapshot" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionEvent" eSuperTypes="#//ExecutionSlot">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="raised" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="ecore:EEnum ../../org.yakindu.base.types/model/types.ecore#//Direction"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionSlot" abstract="true" eSuperTypes="../../org.yakindu.base.types/model/base.ecore#//NamedElement">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//JavaObject"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fqName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="writable" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        defaultValueLiteral="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass ../../org.yakindu.base.types/model/types.ecore#//Type"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionVariable" eSuperTypes="#//ExecutionSlot"/>
+  <eClassifiers xsi:type="ecore:EClass" name="CompositeSlot" eSuperTypes="#//ExecutionSlot">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="slots" upperBound="-1"
+        eType="#//ExecutionSlot" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EDataType" name="JavaObject" instanceClassName="java.lang.Object"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ReferenceSlot" eSuperTypes="#//CompositeSlot">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="reference" eType="#//ExecutionSlot"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ExecutionOperation" eSuperTypes="#//ExecutionVariable"/>
+</ecore:EPackage>

+ 8 - 6
plugins/org.yakindu.sct.model.sruntime/src/org/yakindu/sct/model/sruntime/ExecutionEvent.java

@@ -10,6 +10,8 @@
  */
 package org.yakindu.sct.model.sruntime;
 
+import org.yakindu.base.types.Direction;
+
 
 /**
  * <!-- begin-user-doc -->
@@ -57,7 +59,7 @@ public interface ExecutionEvent extends ExecutionSlot {
 
 	/**
 	 * Returns the value of the '<em><b>Direction</b></em>' attribute.
-	 * The literals are from the enumeration {@link org.yakindu.sct.model.sruntime.EventDirection}.
+	 * The literals are from the enumeration {@link org.yakindu.base.types.Direction}.
 	 * <!-- begin-user-doc -->
 	 * <p>
 	 * If the meaning of the '<em>Direction</em>' attribute isn't clear,
@@ -65,23 +67,23 @@ public interface ExecutionEvent extends ExecutionSlot {
 	 * </p>
 	 * <!-- end-user-doc -->
 	 * @return the value of the '<em>Direction</em>' attribute.
-	 * @see org.yakindu.sct.model.sruntime.EventDirection
-	 * @see #setDirection(EventDirection)
+	 * @see org.yakindu.base.types.Direction
+	 * @see #setDirection(Direction)
 	 * @see org.yakindu.sct.model.sruntime.SRuntimePackage#getExecutionEvent_Direction()
 	 * @model
 	 * @generated
 	 */
-	EventDirection getDirection();
+	Direction getDirection();
 
 	/**
 	 * Sets the value of the '{@link org.yakindu.sct.model.sruntime.ExecutionEvent#getDirection <em>Direction</em>}' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @param value the new value of the '<em>Direction</em>' attribute.
-	 * @see org.yakindu.sct.model.sruntime.EventDirection
+	 * @see org.yakindu.base.types.Direction
 	 * @see #getDirection()
 	 * @generated
 	 */
-	void setDirection(EventDirection value);
+	void setDirection(Direction value);
 
 } // ExecutionEvent

+ 1 - 32
plugins/org.yakindu.sct.model.sruntime/src/org/yakindu/sct/model/sruntime/SRuntimePackage.java

@@ -13,7 +13,6 @@ package org.yakindu.sct.model.sruntime;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.EReference;
 
@@ -605,16 +604,6 @@ public interface SRuntimePackage extends EPackage {
 	 */
 	int EXECUTION_OPERATION_FEATURE_COUNT = EXECUTION_VARIABLE_FEATURE_COUNT + 0;
 
-	/**
-	 * The meta object id for the '{@link org.yakindu.sct.model.sruntime.EventDirection <em>Event Direction</em>}' enum.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see org.yakindu.sct.model.sruntime.EventDirection
-	 * @see org.yakindu.sct.model.sruntime.impl.SRuntimePackageImpl#getEventDirection()
-	 * @generated
-	 */
-	int EVENT_DIRECTION = 7;
-
 	/**
 	 * The meta object id for the '<em>Java Object</em>' data type.
 	 * <!-- begin-user-doc -->
@@ -623,7 +612,7 @@ public interface SRuntimePackage extends EPackage {
 	 * @see org.yakindu.sct.model.sruntime.impl.SRuntimePackageImpl#getJavaObject()
 	 * @generated
 	 */
-	int JAVA_OBJECT = 8;
+	int JAVA_OBJECT = 7;
 
 
 	/**
@@ -828,16 +817,6 @@ public interface SRuntimePackage extends EPackage {
 	 */
 	EClass getExecutionOperation();
 
-	/**
-	 * Returns the meta object for enum '{@link org.yakindu.sct.model.sruntime.EventDirection <em>Event Direction</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for enum '<em>Event Direction</em>'.
-	 * @see org.yakindu.sct.model.sruntime.EventDirection
-	 * @generated
-	 */
-	EEnum getEventDirection();
-
 	/**
 	 * Returns the meta object for data type '{@link java.lang.Object <em>Java Object</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1037,16 +1016,6 @@ public interface SRuntimePackage extends EPackage {
 		 */
 		EClass EXECUTION_OPERATION = eINSTANCE.getExecutionOperation();
 
-		/**
-		 * The meta object literal for the '{@link org.yakindu.sct.model.sruntime.EventDirection <em>Event Direction</em>}' enum.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @see org.yakindu.sct.model.sruntime.EventDirection
-		 * @see org.yakindu.sct.model.sruntime.impl.SRuntimePackageImpl#getEventDirection()
-		 * @generated
-		 */
-		EEnum EVENT_DIRECTION = eINSTANCE.getEventDirection();
-
 		/**
 		 * The meta object literal for the '<em>Java Object</em>' data type.
 		 * <!-- begin-user-doc -->

+ 7 - 7
plugins/org.yakindu.sct.model.sruntime/src/org/yakindu/sct/model/sruntime/impl/ExecutionEventImpl.java

@@ -13,7 +13,7 @@ package org.yakindu.sct.model.sruntime.impl;
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.yakindu.sct.model.sruntime.EventDirection;
+import org.yakindu.base.types.Direction;
 import org.yakindu.sct.model.sruntime.ExecutionEvent;
 import org.yakindu.sct.model.sruntime.SRuntimePackage;
 
@@ -60,7 +60,7 @@ public class ExecutionEventImpl extends ExecutionSlotImpl implements ExecutionEv
 	 * @generated
 	 * @ordered
 	 */
-	protected static final EventDirection DIRECTION_EDEFAULT = EventDirection.LOCAL;
+	protected static final Direction DIRECTION_EDEFAULT = Direction.LOCAL;
 
 	/**
 	 * The cached value of the '{@link #getDirection() <em>Direction</em>}' attribute.
@@ -70,7 +70,7 @@ public class ExecutionEventImpl extends ExecutionSlotImpl implements ExecutionEv
 	 * @generated
 	 * @ordered
 	 */
-	protected EventDirection direction = DIRECTION_EDEFAULT;
+	protected Direction direction = DIRECTION_EDEFAULT;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -117,7 +117,7 @@ public class ExecutionEventImpl extends ExecutionSlotImpl implements ExecutionEv
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EventDirection getDirection() {
+	public Direction getDirection() {
 		return direction;
 	}
 
@@ -126,8 +126,8 @@ public class ExecutionEventImpl extends ExecutionSlotImpl implements ExecutionEv
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public void setDirection(EventDirection newDirection) {
-		EventDirection oldDirection = direction;
+	public void setDirection(Direction newDirection) {
+		Direction oldDirection = direction;
 		direction = newDirection == null ? DIRECTION_EDEFAULT : newDirection;
 		if (eNotificationRequired())
 			eNotify(new ENotificationImpl(this, Notification.SET, SRuntimePackage.EXECUTION_EVENT__DIRECTION, oldDirection, direction));
@@ -161,7 +161,7 @@ public class ExecutionEventImpl extends ExecutionSlotImpl implements ExecutionEv
 				setRaised((Boolean)newValue);
 				return;
 			case SRuntimePackage.EXECUTION_EVENT__DIRECTION:
-				setDirection((EventDirection)newValue);
+				setDirection((Direction)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);

+ 0 - 22
plugins/org.yakindu.sct.model.sruntime/src/org/yakindu/sct/model/sruntime/impl/SRuntimeFactoryImpl.java

@@ -78,8 +78,6 @@ public class SRuntimeFactoryImpl extends EFactoryImpl implements SRuntimeFactory
 	@Override
 	public Object createFromString(EDataType eDataType, String initialValue) {
 		switch (eDataType.getClassifierID()) {
-			case SRuntimePackage.EVENT_DIRECTION:
-				return createEventDirectionFromString(eDataType, initialValue);
 			case SRuntimePackage.JAVA_OBJECT:
 				return createJavaObjectFromString(eDataType, initialValue);
 			default:
@@ -94,8 +92,6 @@ public class SRuntimeFactoryImpl extends EFactoryImpl implements SRuntimeFactory
 	@Override
 	public String convertToString(EDataType eDataType, Object instanceValue) {
 		switch (eDataType.getClassifierID()) {
-			case SRuntimePackage.EVENT_DIRECTION:
-				return convertEventDirectionToString(eDataType, instanceValue);
 			case SRuntimePackage.JAVA_OBJECT:
 				return convertJavaObjectToString(eDataType, instanceValue);
 			default:
@@ -159,24 +155,6 @@ public class SRuntimeFactoryImpl extends EFactoryImpl implements SRuntimeFactory
 		return executionOperation;
 	}
 
-	/**
-	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EventDirection createEventDirectionFromString(EDataType eDataType, String initialValue) {
-		EventDirection result = EventDirection.get(initialValue);
-		if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
-		return result;
-	}
-
-	/**
-	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * @generated
-	 */
-	public String convertEventDirectionToString(EDataType eDataType, Object instanceValue) {
-		return instanceValue == null ? null : instanceValue.toString();
-	}
-
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * 

+ 1 - 28
plugins/org.yakindu.sct.model.sruntime/src/org/yakindu/sct/model/sruntime/impl/SRuntimePackageImpl.java

@@ -13,7 +13,6 @@ package org.yakindu.sct.model.sruntime.impl;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EDataType;
-import org.eclipse.emf.ecore.EEnum;
 import org.eclipse.emf.ecore.EOperation;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.EReference;
@@ -21,7 +20,6 @@ import org.eclipse.emf.ecore.impl.EPackageImpl;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.types.TypesPackage;
 import org.yakindu.sct.model.sruntime.CompositeSlot;
-import org.yakindu.sct.model.sruntime.EventDirection;
 import org.yakindu.sct.model.sruntime.ExecutionContext;
 import org.yakindu.sct.model.sruntime.ExecutionEvent;
 import org.yakindu.sct.model.sruntime.ExecutionOperation;
@@ -87,13 +85,6 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 	 */
 	private EClass executionOperationEClass = null;
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	private EEnum eventDirectionEEnum = null;
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -337,15 +328,6 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 		return executionOperationEClass;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EEnum getEventDirection() {
-		return eventDirectionEEnum;
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -409,9 +391,6 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 
 		executionOperationEClass = createEClass(EXECUTION_OPERATION);
 
-		// Create enums
-		eventDirectionEEnum = createEEnum(EVENT_DIRECTION);
-
 		// Create data types
 		javaObjectEDataType = createEDataType(JAVA_OBJECT);
 	}
@@ -483,7 +462,7 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 
 		initEClass(executionEventEClass, ExecutionEvent.class, "ExecutionEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionEvent_Raised(), ecorePackage.getEBoolean(), "raised", null, 0, 1, ExecutionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getExecutionEvent_Direction(), this.getEventDirection(), "direction", null, 0, 1, ExecutionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEAttribute(getExecutionEvent_Direction(), theTypesPackage.getDirection(), "direction", null, 0, 1, ExecutionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(executionSlotEClass, ExecutionSlot.class, "ExecutionSlot", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getExecutionSlot_Value(), this.getJavaObject(), "value", null, 0, 1, ExecutionSlot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -501,12 +480,6 @@ public class SRuntimePackageImpl extends EPackageImpl implements SRuntimePackage
 
 		initEClass(executionOperationEClass, ExecutionOperation.class, "ExecutionOperation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
-		// Initialize enums and add enum literals
-		initEEnum(eventDirectionEEnum, EventDirection.class, "EventDirection");
-		addEEnumLiteral(eventDirectionEEnum, EventDirection.LOCAL);
-		addEEnumLiteral(eventDirectionEEnum, EventDirection.IN);
-		addEEnumLiteral(eventDirectionEEnum, EventDirection.OUT);
-
 		// Initialize data types
 		initEDataType(javaObjectEDataType, Object.class, "JavaObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
 

+ 2 - 2
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/DefaultExecutionContextInitializer.xtend

@@ -19,6 +19,7 @@ import org.eclipse.xtext.EcoreUtil2
 import org.eclipse.xtext.naming.IQualifiedNameProvider
 import org.yakindu.base.expressions.expressions.ElementReferenceExpression
 import org.yakindu.base.types.Declaration
+import org.yakindu.base.types.Direction
 import org.yakindu.base.types.Package
 import org.yakindu.base.types.inferrer.ITypeSystemInferrer
 import org.yakindu.base.types.typesystem.ITypeSystem
@@ -30,7 +31,6 @@ import org.yakindu.sct.model.sgraph.ImportDeclaration
 import org.yakindu.sct.model.sgraph.Scope
 import org.yakindu.sct.model.sgraph.Statechart
 import org.yakindu.sct.model.sruntime.CompositeSlot
-import org.yakindu.sct.model.sruntime.EventDirection
 import org.yakindu.sct.model.sruntime.ExecutionContext
 import org.yakindu.sct.model.sruntime.ExecutionSlot
 import org.yakindu.sct.model.sruntime.SRuntimeFactory
@@ -167,7 +167,7 @@ class DefaultExecutionContextInitializer implements IExecutionContextInitializer
 			fqName = event.fullyQualifiedName.toString
 			type = event.type
 			value = it.type?.defaultValue
-			direction = EventDirection.get(event.direction.value)
+			direction = Direction.get(event.direction.value)
 		]
 	}
 

+ 2 - 2
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/EventDrivenSimulationEngine.java

@@ -13,8 +13,8 @@ package org.yakindu.sct.simulation.core.sexec.container;
 
 import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.ecore.util.EContentAdapter;
+import org.yakindu.base.types.Direction;
 import org.yakindu.sct.model.sgraph.Statechart;
-import org.yakindu.sct.model.sruntime.EventDirection;
 import org.yakindu.sct.model.sruntime.ExecutionEvent;
 import org.yakindu.sct.model.sruntime.SRuntimePackage;
 import org.yakindu.sct.simulation.core.engine.ISimulationEngine;
@@ -92,7 +92,7 @@ public class EventDrivenSimulationEngine extends AbstractExecutionFlowSimulation
 					&& notification.getFeature() == SRuntimePackage.Literals.EXECUTION_EVENT__RAISED) {
 				ExecutionEvent event = (ExecutionEvent) notification.getNotifier();
 				if (notification.getNewBooleanValue() != notification.getOldBooleanValue()) {
-					if (notification.getNewBooleanValue() && event.getDirection() != EventDirection.OUT) {
+					if (notification.getNewBooleanValue() && event.getDirection() != Direction.OUT) {
 						if (!suspended)
 							interpreter.runCycle();
 						else {

+ 41 - 41
plugins/org.yakindu.sct.simulation.core/src/org/yakindu/sct/simulation/core/util/ExecutionContextExtensions.xtend

@@ -1,41 +1,41 @@
-/**
- * Copyright (c) 2014 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * Contributors:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.simulation.core.util
-
-import java.util.ArrayList
-import java.util.List
-import org.yakindu.sct.model.sgraph.RegularState
-import org.yakindu.sct.model.sruntime.EventDirection
-import org.yakindu.sct.model.sruntime.ExecutionContext
-
-class ExecutionContextExtensions {
-
-	def clearOutEvents(ExecutionContext executionContext) {
-		executionContext.allEvents.filter[direction == EventDirection.OUT].forEach[if(raised) raised = false]
-	}
-
-	def List<RegularState> getAllActiveStates(ExecutionContext context) {
-		context.activeStates.filter(RegularState).map[stateHierachy].flatten.toList
-	}
-
-	def protected getStateHierachy(RegularState state) {
-		var result = new ArrayList<RegularState>()
-		result.add(state);
-		var container = state.eContainer();
-		while (container !== null) {
-			if (container instanceof RegularState) {
-				result.add(container);
-			}
-			container = container.eContainer();
-		}
-		return result
-	}
-}
+/**
+ * Copyright (c) 2014 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.simulation.core.util
+
+import java.util.ArrayList
+import java.util.List
+import org.yakindu.base.types.Direction
+import org.yakindu.sct.model.sgraph.RegularState
+import org.yakindu.sct.model.sruntime.ExecutionContext
+
+class ExecutionContextExtensions {
+
+	def clearOutEvents(ExecutionContext executionContext) {
+		executionContext.allEvents.filter[direction == Direction.OUT].forEach[if(raised) raised = false]
+	}
+
+	def List<RegularState> getAllActiveStates(ExecutionContext context) {
+		context.activeStates.filter(RegularState).map[stateHierachy].flatten.toList
+	}
+
+	def protected getStateHierachy(RegularState state) {
+		var result = new ArrayList<RegularState>()
+		result.add(state);
+		var container = state.eContainer();
+		while (container !== null) {
+			if (container instanceof RegularState) {
+				result.add(container);
+			}
+			container = container.eContainer();
+		}
+		return result
+	}
+}