ソースを参照

Added Type Alias

Andreas Mülder 11 年 前
コミット
fec366c7b6

+ 9 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextFactory.java

@@ -165,6 +165,15 @@ public interface StextFactory extends EFactory {
 	 */
 	OperationDefinition createOperationDefinition();
 
+	/**
+	 * Returns a new object of class '<em>Type Alias Definition</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Type Alias Definition</em>'.
+	 * @generated
+	 */
+	TypeAliasDefinition createTypeAliasDefinition();
+
 	/**
 	 * Returns a new object of class '<em>Local Reaction</em>'.
 	 * <!-- begin-user-doc -->

+ 107 - 22
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextPackage.java

@@ -10,6 +10,7 @@ import org.eclipse.emf.ecore.EReference;
 
 import org.yakindu.base.expressions.expressions.ExpressionsPackage;
 
+import org.yakindu.base.types.TypesPackage;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 
 /**
@@ -733,6 +734,70 @@ public interface StextPackage extends EPackage {
 	 */
 	int OPERATION_DEFINITION_FEATURE_COUNT = SGraphPackage.DECLARATION_FEATURE_COUNT + 4;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.impl.TypeAliasDefinitionImpl <em>Type Alias Definition</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.stext.stext.impl.TypeAliasDefinitionImpl
+	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTypeAliasDefinition()
+	 * @generated
+	 */
+	int TYPE_ALIAS_DEFINITION = 16;
+
+	/**
+	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION__TYPE = TypesPackage.TYPE_ALIAS__TYPE;
+
+	/**
+	 * The feature id for the '<em><b>Type Arguments</b></em>' reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION__TYPE_ARGUMENTS = TypesPackage.TYPE_ALIAS__TYPE_ARGUMENTS;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION__NAME = TypesPackage.TYPE_ALIAS__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Constraint</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION__CONSTRAINT = TypesPackage.TYPE_ALIAS__CONSTRAINT;
+
+	/**
+	 * The feature id for the '<em><b>Abstract</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION__ABSTRACT = TypesPackage.TYPE_ALIAS__ABSTRACT;
+
+	/**
+	 * The number of structural features of the '<em>Type Alias Definition</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TYPE_ALIAS_DEFINITION_FEATURE_COUNT = TypesPackage.TYPE_ALIAS_FEATURE_COUNT + 0;
+
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.impl.LocalReactionImpl <em>Local Reaction</em>}' class.
 	 * <!-- begin-user-doc -->
@@ -741,7 +806,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getLocalReaction()
 	 * @generated
 	 */
-	int LOCAL_REACTION = 16;
+	int LOCAL_REACTION = 17;
 
 	/**
 	 * The feature id for the '<em><b>Name</b></em>' attribute.
@@ -796,7 +861,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTransitionReaction()
 	 * @generated
 	 */
-	int TRANSITION_REACTION = 17;
+	int TRANSITION_REACTION = 18;
 
 	/**
 	 * The feature id for the '<em><b>Trigger</b></em>' containment reference.
@@ -842,7 +907,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getGuard()
 	 * @generated
 	 */
-	int GUARD = 18;
+	int GUARD = 19;
 
 	/**
 	 * The feature id for the '<em><b>Expression</b></em>' containment reference.
@@ -870,7 +935,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getEntryPointSpec()
 	 * @generated
 	 */
-	int ENTRY_POINT_SPEC = 19;
+	int ENTRY_POINT_SPEC = 20;
 
 	/**
 	 * The feature id for the '<em><b>Entrypoint</b></em>' attribute.
@@ -898,7 +963,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getExitPointSpec()
 	 * @generated
 	 */
-	int EXIT_POINT_SPEC = 20;
+	int EXIT_POINT_SPEC = 21;
 
 	/**
 	 * The feature id for the '<em><b>Exitpoint</b></em>' attribute.
@@ -926,7 +991,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getEventSpec()
 	 * @generated
 	 */
-	int EVENT_SPEC = 21;
+	int EVENT_SPEC = 22;
 
 	/**
 	 * The number of structural features of the '<em>Event Spec</em>' class.
@@ -945,7 +1010,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getRegularEventSpec()
 	 * @generated
 	 */
-	int REGULAR_EVENT_SPEC = 22;
+	int REGULAR_EVENT_SPEC = 23;
 
 	/**
 	 * The feature id for the '<em><b>Event</b></em>' containment reference.
@@ -973,7 +1038,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTimeEventSpec()
 	 * @generated
 	 */
-	int TIME_EVENT_SPEC = 23;
+	int TIME_EVENT_SPEC = 24;
 
 	/**
 	 * The feature id for the '<em><b>Type</b></em>' attribute.
@@ -1019,7 +1084,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getBuiltinEventSpec()
 	 * @generated
 	 */
-	int BUILTIN_EVENT_SPEC = 24;
+	int BUILTIN_EVENT_SPEC = 25;
 
 	/**
 	 * The number of structural features of the '<em>Builtin Event Spec</em>' class.
@@ -1038,7 +1103,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getEntryEvent()
 	 * @generated
 	 */
-	int ENTRY_EVENT = 25;
+	int ENTRY_EVENT = 26;
 
 	/**
 	 * The number of structural features of the '<em>Entry Event</em>' class.
@@ -1057,7 +1122,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getExitEvent()
 	 * @generated
 	 */
-	int EXIT_EVENT = 26;
+	int EXIT_EVENT = 27;
 
 	/**
 	 * The number of structural features of the '<em>Exit Event</em>' class.
@@ -1076,7 +1141,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getAlwaysEvent()
 	 * @generated
 	 */
-	int ALWAYS_EVENT = 27;
+	int ALWAYS_EVENT = 28;
 
 	/**
 	 * The number of structural features of the '<em>Always Event</em>' class.
@@ -1095,7 +1160,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getSimpleScope()
 	 * @generated
 	 */
-	int SIMPLE_SCOPE = 28;
+	int SIMPLE_SCOPE = 29;
 
 	/**
 	 * The feature id for the '<em><b>Declarations</b></em>' containment reference list.
@@ -1141,7 +1206,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getReactionTrigger()
 	 * @generated
 	 */
-	int REACTION_TRIGGER = 29;
+	int REACTION_TRIGGER = 30;
 
 	/**
 	 * The feature id for the '<em><b>Triggers</b></em>' containment reference list.
@@ -1178,7 +1243,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getDefaultTrigger()
 	 * @generated
 	 */
-	int DEFAULT_TRIGGER = 30;
+	int DEFAULT_TRIGGER = 31;
 
 	/**
 	 * The number of structural features of the '<em>Default Trigger</em>' class.
@@ -1197,7 +1262,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getReactionEffect()
 	 * @generated
 	 */
-	int REACTION_EFFECT = 31;
+	int REACTION_EFFECT = 32;
 
 	/**
 	 * The feature id for the '<em><b>Actions</b></em>' containment reference list.
@@ -1225,7 +1290,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getEventRaisingExpression()
 	 * @generated
 	 */
-	int EVENT_RAISING_EXPRESSION = 32;
+	int EVENT_RAISING_EXPRESSION = 33;
 
 	/**
 	 * The feature id for the '<em><b>Event</b></em>' containment reference.
@@ -1262,7 +1327,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getEventValueReferenceExpression()
 	 * @generated
 	 */
-	int EVENT_VALUE_REFERENCE_EXPRESSION = 33;
+	int EVENT_VALUE_REFERENCE_EXPRESSION = 34;
 
 	/**
 	 * The feature id for the '<em><b>Value</b></em>' containment reference.
@@ -1290,7 +1355,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getActiveStateReferenceExpression()
 	 * @generated
 	 */
-	int ACTIVE_STATE_REFERENCE_EXPRESSION = 34;
+	int ACTIVE_STATE_REFERENCE_EXPRESSION = 35;
 
 	/**
 	 * The feature id for the '<em><b>Value</b></em>' reference.
@@ -1318,7 +1383,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getDirection()
 	 * @generated
 	 */
-	int DIRECTION = 35;
+	int DIRECTION = 36;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.TimeEventType <em>Time Event Type</em>}' enum.
@@ -1328,7 +1393,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTimeEventType()
 	 * @generated
 	 */
-	int TIME_EVENT_TYPE = 36;
+	int TIME_EVENT_TYPE = 37;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.TimeUnit <em>Time Unit</em>}' enum.
@@ -1338,7 +1403,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTimeUnit()
 	 * @generated
 	 */
-	int TIME_UNIT = 37;
+	int TIME_UNIT = 38;
 
 
 	/**
@@ -1644,6 +1709,16 @@ public interface StextPackage extends EPackage {
 	 */
 	EClass getOperationDefinition();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.TypeAliasDefinition <em>Type Alias Definition</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Type Alias Definition</em>'.
+	 * @see org.yakindu.sct.model.stext.stext.TypeAliasDefinition
+	 * @generated
+	 */
+	EClass getTypeAliasDefinition();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.LocalReaction <em>Local Reaction</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2304,6 +2379,16 @@ public interface StextPackage extends EPackage {
 		 */
 		EClass OPERATION_DEFINITION = eINSTANCE.getOperationDefinition();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.impl.TypeAliasDefinitionImpl <em>Type Alias Definition</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.stext.stext.impl.TypeAliasDefinitionImpl
+		 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTypeAliasDefinition()
+		 * @generated
+		 */
+		EClass TYPE_ALIAS_DEFINITION = eINSTANCE.getTypeAliasDefinition();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.impl.LocalReactionImpl <em>Local Reaction</em>}' class.
 		 * <!-- begin-user-doc -->

+ 20 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/TypeAliasDefinition.java

@@ -0,0 +1,20 @@
+/**
+ */
+package org.yakindu.sct.model.stext.stext;
+
+import org.yakindu.base.types.TypeAlias;
+
+import org.yakindu.sct.model.sgraph.Declaration;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Type Alias Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.yakindu.sct.model.stext.stext.StextPackage#getTypeAliasDefinition()
+ * @model
+ * @generated
+ */
+public interface TypeAliasDefinition extends TypeAlias, Declaration {
+} // TypeAliasDefinition

+ 11 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/OperationDefinitionImpl.java

@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Feature;
 import org.yakindu.base.types.Operation;
+import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Parameter;
 import org.yakindu.base.types.Type;
 import org.yakindu.base.types.TypedElement;
@@ -362,6 +363,11 @@ public class OperationDefinitionImpl extends DeclarationImpl implements Operatio
 				default: return -1;
 			}
 		}
+		if (baseClass == PackageMember.class) {
+			switch (derivedFeatureID) {
+				default: return -1;
+			}
+		}
 		if (baseClass == Operation.class) {
 			switch (derivedFeatureID) {
 				case StextPackage.OPERATION_DEFINITION__PARAMETERS: return TypesPackage.OPERATION__PARAMETERS;
@@ -391,6 +397,11 @@ public class OperationDefinitionImpl extends DeclarationImpl implements Operatio
 				default: return -1;
 			}
 		}
+		if (baseClass == PackageMember.class) {
+			switch (baseFeatureID) {
+				default: return -1;
+			}
+		}
 		if (baseClass == Operation.class) {
 			switch (baseFeatureID) {
 				case TypesPackage.OPERATION__PARAMETERS: return StextPackage.OPERATION_DEFINITION__PARAMETERS;

+ 11 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StextFactoryImpl.java

@@ -73,6 +73,7 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory {
 			case StextPackage.EVENT_DEFINITION: return createEventDefinition();
 			case StextPackage.VARIABLE_DEFINITION: return createVariableDefinition();
 			case StextPackage.OPERATION_DEFINITION: return createOperationDefinition();
+			case StextPackage.TYPE_ALIAS_DEFINITION: return createTypeAliasDefinition();
 			case StextPackage.LOCAL_REACTION: return createLocalReaction();
 			case StextPackage.TRANSITION_REACTION: return createTransitionReaction();
 			case StextPackage.GUARD: return createGuard();
@@ -295,6 +296,16 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory {
 		return operationDefinition;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public TypeAliasDefinition createTypeAliasDefinition() {
+		TypeAliasDefinitionImpl typeAliasDefinition = new TypeAliasDefinitionImpl();
+		return typeAliasDefinition;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 23 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java

@@ -57,6 +57,7 @@ import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.TransitionReaction;
 import org.yakindu.sct.model.stext.stext.TransitionRoot;
 import org.yakindu.sct.model.stext.stext.TransitionSpecification;
+import org.yakindu.sct.model.stext.stext.TypeAliasDefinition;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 /**
@@ -178,6 +179,13 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 	 */
 	private EClass operationDefinitionEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass typeAliasDefinitionEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -658,6 +666,15 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		return operationDefinitionEClass;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getTypeAliasDefinition() {
+		return typeAliasDefinitionEClass;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -1055,6 +1072,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 
 		operationDefinitionEClass = createEClass(OPERATION_DEFINITION);
 
+		typeAliasDefinitionEClass = createEClass(TYPE_ALIAS_DEFINITION);
+
 		localReactionEClass = createEClass(LOCAL_REACTION);
 
 		transitionReactionEClass = createEClass(TRANSITION_REACTION);
@@ -1162,6 +1181,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		variableDefinitionEClass.getESuperTypes().add(theTypesPackage.getProperty());
 		operationDefinitionEClass.getESuperTypes().add(theSGraphPackage.getDeclaration());
 		operationDefinitionEClass.getESuperTypes().add(theTypesPackage.getOperation());
+		typeAliasDefinitionEClass.getESuperTypes().add(theTypesPackage.getTypeAlias());
+		typeAliasDefinitionEClass.getESuperTypes().add(theSGraphPackage.getDeclaration());
 		localReactionEClass.getESuperTypes().add(theSGraphPackage.getDeclaration());
 		localReactionEClass.getESuperTypes().add(theSGraphPackage.getReaction());
 		transitionReactionEClass.getESuperTypes().add(theSGraphPackage.getReaction());
@@ -1227,6 +1248,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 
 		initEClass(operationDefinitionEClass, OperationDefinition.class, "OperationDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
+		initEClass(typeAliasDefinitionEClass, TypeAliasDefinition.class, "TypeAliasDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
 		initEClass(localReactionEClass, LocalReaction.class, "LocalReaction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
 		initEClass(transitionReactionEClass, TransitionReaction.class, "TransitionReaction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

+ 40 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/TypeAliasDefinitionImpl.java

@@ -0,0 +1,40 @@
+/**
+ */
+package org.yakindu.sct.model.stext.stext.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.yakindu.base.types.impl.TypeAliasImpl;
+import org.yakindu.sct.model.stext.stext.StextPackage;
+import org.yakindu.sct.model.stext.stext.TypeAliasDefinition;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Type Alias Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class TypeAliasDefinitionImpl extends TypeAliasImpl implements TypeAliasDefinition {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected TypeAliasDefinitionImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return StextPackage.Literals.TYPE_ALIAS_DEFINITION;
+	}
+
+
+} //TypeAliasDefinitionImpl

+ 75 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/util/StextAdapterFactory.java

@@ -15,7 +15,10 @@ import org.yakindu.base.expressions.expressions.Expression;
 
 import org.yakindu.base.types.Feature;
 import org.yakindu.base.types.Operation;
+import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Property;
+import org.yakindu.base.types.Type;
+import org.yakindu.base.types.TypeAlias;
 import org.yakindu.base.types.TypedElement;
 
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -151,6 +154,10 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 				return createOperationDefinitionAdapter();
 			}
 			@Override
+			public Adapter caseTypeAliasDefinition(TypeAliasDefinition object) {
+				return createTypeAliasDefinitionAdapter();
+			}
+			@Override
 			public Adapter caseLocalReaction(LocalReaction object) {
 				return createLocalReactionAdapter();
 			}
@@ -267,10 +274,22 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 				return createPropertyAdapter();
 			}
 			@Override
+			public Adapter casePackageMember(PackageMember object) {
+				return createPackageMemberAdapter();
+			}
+			@Override
 			public Adapter caseOperation(Operation object) {
 				return createOperationAdapter();
 			}
 			@Override
+			public Adapter caseType(Type object) {
+				return createTypeAdapter();
+			}
+			@Override
+			public Adapter caseTypeAlias(TypeAlias object) {
+				return createTypeAliasAdapter();
+			}
+			@Override
 			public Adapter caseReaction(Reaction object) {
 				return createReactionAdapter();
 			}
@@ -534,6 +553,20 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.stext.stext.TypeAliasDefinition <em>Type Alias Definition</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.stext.stext.TypeAliasDefinition
+	 * @generated
+	 */
+	public Adapter createTypeAliasDefinitionAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.stext.stext.LocalReaction <em>Local Reaction</em>}'.
 	 * <!-- begin-user-doc -->
@@ -940,6 +973,20 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.PackageMember <em>Package Member</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.base.types.PackageMember
+	 * @generated
+	 */
+	public Adapter createPackageMemberAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.Operation <em>Operation</em>}'.
 	 * <!-- begin-user-doc -->
@@ -954,6 +1001,34 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.Type <em>Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.base.types.Type
+	 * @generated
+	 */
+	public Adapter createTypeAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.TypeAlias <em>Type Alias</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.base.types.TypeAlias
+	 * @generated
+	 */
+	public Adapter createTypeAliasAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.Reaction <em>Reaction</em>}'.
 	 * <!-- begin-user-doc -->

+ 76 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/util/StextSwitch.java

@@ -13,7 +13,10 @@ import org.yakindu.base.expressions.expressions.Expression;
 
 import org.yakindu.base.types.Feature;
 import org.yakindu.base.types.Operation;
+import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Property;
+import org.yakindu.base.types.Type;
+import org.yakindu.base.types.TypeAlias;
 import org.yakindu.base.types.TypedElement;
 
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -205,11 +208,24 @@ public class StextSwitch<T> extends Switch<T> {
 				if (result == null) result = caseDeclaration(operationDefinition);
 				if (result == null) result = caseOperation(operationDefinition);
 				if (result == null) result = caseFeature(operationDefinition);
+				if (result == null) result = casePackageMember(operationDefinition);
 				if (result == null) result = caseNamedElement(operationDefinition);
 				if (result == null) result = caseTypedElement(operationDefinition);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case StextPackage.TYPE_ALIAS_DEFINITION: {
+				TypeAliasDefinition typeAliasDefinition = (TypeAliasDefinition)theEObject;
+				T result = caseTypeAliasDefinition(typeAliasDefinition);
+				if (result == null) result = caseTypeAlias(typeAliasDefinition);
+				if (result == null) result = caseDeclaration(typeAliasDefinition);
+				if (result == null) result = caseTypedElement(typeAliasDefinition);
+				if (result == null) result = caseType(typeAliasDefinition);
+				if (result == null) result = casePackageMember(typeAliasDefinition);
+				if (result == null) result = caseNamedElement(typeAliasDefinition);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			case StextPackage.LOCAL_REACTION: {
 				LocalReaction localReaction = (LocalReaction)theEObject;
 				T result = caseLocalReaction(localReaction);
@@ -590,6 +606,21 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Type Alias Definition</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Type Alias Definition</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseTypeAliasDefinition(TypeAliasDefinition object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Local Reaction</em>'.
 	 * <!-- begin-user-doc -->
@@ -1025,6 +1056,21 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Package Member</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Package Member</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T casePackageMember(PackageMember object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Operation</em>'.
 	 * <!-- begin-user-doc -->
@@ -1040,6 +1086,36 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Type</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Type</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseType(Type object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Type Alias</em>'.
+	 * <!-- begin-user-doc -->
+	 * This implementation returns null;
+	 * returning a non-null result will terminate the switch.
+	 * <!-- end-user-doc -->
+	 * @param object the target of the switch.
+	 * @return the result of interpreting the object as an instance of '<em>Type Alias</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseTypeAlias(TypeAlias object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Reaction</em>'.
 	 * <!-- begin-user-doc -->

+ 28 - 27
plugins/org.yakindu.sct.model.stext/model/SText.ecore

@@ -18,17 +18,17 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="def" eType="#//TransitionSpecification"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="StatechartSpecification" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ScopedElement"/>
+  <eClassifiers xsi:type="ecore:EClass" name="StatechartSpecification" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ScopedElement"/>
   <eClassifiers xsi:type="ecore:EClass" name="StateSpecification">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="scope" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="scope" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"
         containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="TransitionSpecification">
     <eStructuralFeatures xsi:type="ecore:EReference" name="reaction" eType="#//TransitionReaction"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="StatechartScope" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"/>
-  <eClassifiers xsi:type="ecore:EClass" name="InterfaceScope" eSuperTypes="#//StatechartScope platform:/resource/org.yakindu.base.types/model/base.ecore#//NamedElement"/>
+  <eClassifiers xsi:type="ecore:EClass" name="StatechartScope" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"/>
+  <eClassifiers xsi:type="ecore:EClass" name="InterfaceScope" eSuperTypes="#//StatechartScope ../../org.yakindu.base.types/model/base.ecore#//NamedElement"/>
   <eClassifiers xsi:type="ecore:EClass" name="InternalScope" eSuperTypes="#//StatechartScope"/>
   <eClassifiers xsi:type="ecore:EClass" name="ImportScope" eSuperTypes="#//StatechartScope">
     <eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
@@ -37,7 +37,7 @@
   <eClassifiers xsi:type="ecore:EClass" name="Import">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNamespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="EventDefinition" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Event platform:/resource/org.yakindu.base.types/model/types.ecore#//Event">
+  <eClassifiers xsi:type="ecore:EClass" name="EventDefinition" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Event ../../org.yakindu.base.types/model/types.ecore#//Event">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="#//Direction"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EEnum" name="Direction">
@@ -45,34 +45,35 @@
     <eLiterals name="IN" value="1" literal="in"/>
     <eLiterals name="OUT" value="2" literal="out"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="VariableDefinition" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Variable platform:/resource/org.yakindu.base.types/model/types.ecore#//Property">
+  <eClassifiers xsi:type="ecore:EClass" name="VariableDefinition" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Variable ../../org.yakindu.base.types/model/types.ecore#//Property">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="const" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="readonly" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="external" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="initialValue" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="initialValue" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="OperationDefinition" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration platform:/resource/org.yakindu.base.types/model/types.ecore#//Operation"/>
-  <eClassifiers xsi:type="ecore:EClass" name="LocalReaction" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Reaction"/>
-  <eClassifiers xsi:type="ecore:EClass" name="TransitionReaction" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Reaction"/>
+  <eClassifiers xsi:type="ecore:EClass" name="OperationDefinition" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration ../../org.yakindu.base.types/model/types.ecore#//Operation"/>
+  <eClassifiers xsi:type="ecore:EClass" name="TypeAliasDefinition" eSuperTypes="../../org.yakindu.base.types/model/types.ecore#//TypeAlias ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="LocalReaction" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Reaction"/>
+  <eClassifiers xsi:type="ecore:EClass" name="TransitionReaction" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Reaction"/>
   <eClassifiers xsi:type="ecore:EClass" name="Guard">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="EntryPointSpec" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ReactionProperty">
+  <eClassifiers xsi:type="ecore:EClass" name="EntryPointSpec" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ReactionProperty">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="entrypoint" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ExitPointSpec" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ReactionProperty">
+  <eClassifiers xsi:type="ecore:EClass" name="ExitPointSpec" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//ReactionProperty">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="exitpoint" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="EventSpec"/>
   <eClassifiers xsi:type="ecore:EClass" name="RegularEventSpec" eSuperTypes="#//EventSpec">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="event" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="event" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="TimeEventSpec" eSuperTypes="#//EventSpec">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//TimeEventType"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="unit" eType="#//TimeUnit"/>
   </eClassifiers>
@@ -90,30 +91,30 @@
     <eLiterals name="microsecond" value="2" literal="us"/>
     <eLiterals name="nanosecond" value="3" literal="ns"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="SimpleScope" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ReactionTrigger" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Trigger">
+  <eClassifiers xsi:type="ecore:EClass" name="SimpleScope" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ReactionTrigger" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Trigger">
     <eStructuralFeatures xsi:type="ecore:EReference" name="triggers" upperBound="-1"
         eType="#//EventSpec" containment="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="guard" eType="#//Guard"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="DefaultTrigger" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Trigger"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ReactionEffect" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Effect">
+  <eClassifiers xsi:type="ecore:EClass" name="DefaultTrigger" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Trigger"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ReactionEffect" eSuperTypes="../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Effect">
     <eStructuralFeatures xsi:type="ecore:EReference" name="actions" upperBound="-1"
-        eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+        eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="EventRaisingExpression" eSuperTypes="platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="event" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+  <eClassifiers xsi:type="ecore:EClass" name="EventRaisingExpression" eSuperTypes="../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="event" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="EventValueReferenceExpression" eSuperTypes="platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
+  <eClassifiers xsi:type="ecore:EClass" name="EventValueReferenceExpression" eSuperTypes="../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass ../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ActiveStateReferenceExpression" eSuperTypes="platform:/resource/org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//State"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ActiveStateReferenceExpression" eSuperTypes="../../org.yakindu.base.expressions/model/Expressions.ecore#//Expression">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//State"/>
   </eClassifiers>
 </ecore:EPackage>

+ 14 - 5
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -52,11 +52,11 @@ NamedInterfaceScope returns base::NamedElement:
 	InterfaceScope;
 
 InterfaceScope:
-	{InterfaceScope} 'interface' (name=XID)? ':' (declarations+=(EventDeclarartion | VariableDeclaration |
+	{InterfaceScope} 'interface' (name=XID)? ':' (declarations+=(EventDeclarartion | VariableDeclaration | TypeAliasDeclaration |
 	OperationDeclaration))*;
 
 InternalScope:
-	{InternalScope} 'internal' ':' (declarations+=(EventDeclarartion | VariableDeclaration | OperationDeclaration |
+	{InternalScope} 'internal' ':' (declarations+=(EventDeclarartion | VariableDeclaration | OperationDeclaration | TypeAliasDeclaration |
 	LocalReaction))*;
 	
 ImportScope:
@@ -72,7 +72,7 @@ QID:
 	ID ('.' ID)*;
 
 Declaration returns sgraph::Declaration:
-	EventDeclarartion | VariableDeclaration | OperationDeclaration | LocalReaction;
+	EventDeclarartion | VariableDeclaration | OperationDeclaration | TypeAliasDeclaration | LocalReaction;
 
 EventDeclarartion returns sgraph::Event:
 	EventDefinition;
@@ -95,10 +95,19 @@ VariableFeature returns types::Property:
 VariableDefinition:
 	{VariableDefinition} (const?='const'|'var') ((readonly?='readonly')? & (external?='external')?) name=XID ':' type=[types::Type|FQN]
 	(('<' (typeArguments+=[types::Type|QID]) (',' typeArguments+=[types::Type|QID])* '>'))?
-	('=' initialValue=Expression)?; /* ---- operation definition ---- */ OperationDeclaration returns
-sgraph::Declaration:
+	('=' initialValue=Expression)?; /* ---- operation definition ---- */ 
+	
+OperationDeclaration returns sgraph::Declaration:
 	OperationDefinition;
 
+TypeAliasDeclaration returns sgraph::Declaration:
+	TypeAliasDefinition
+;
+
+TypeAliasDefinition:
+	{TypeAliasDefinition} 'alias' name=XID ':' type=[types::Type|FQN]
+;
+
 OperationFeature returns types::Operation:
 	OperationDefinition;
 

+ 2 - 1
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/inferrer/STextTypeInferrer.java

@@ -28,6 +28,7 @@ import org.yakindu.sct.model.stext.stext.EventRaisingExpression;
 import org.yakindu.sct.model.stext.stext.EventValueReferenceExpression;
 import org.yakindu.sct.model.stext.stext.Guard;
 import org.yakindu.sct.model.stext.stext.TimeEventSpec;
+import org.yakindu.sct.model.stext.stext.TypeAliasDefinition;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 /**
@@ -51,7 +52,7 @@ public class STextTypeInferrer extends ExpressionsTypeInferrer {
 		assertAssignable(type, type2, String.format(VARIABLE_DEFINITION, type2, type));
 		return inferTypeDispatch(type);
 	}
-	
+
 	public Object infer(Event e) {
 		// if an event is used within an expression, the type is boolean and the
 		// value indicates if the event is raised or not