Sfoglia il codice sorgente

Removed exec type from run configuration, added it to semantic model

Andreas Muelder 8 anni fa
parent
commit
59b9543893
24 ha cambiato i file con 751 aggiunte e 203 eliminazioni
  1. BIN
      plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateAnnotatableElement_annotations_Annotation.gif
  2. BIN
      plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateScope_declarations_Enumerator.gif
  3. BIN
      plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateScope_reactions_Transition.gif
  4. BIN
      plugins/org.yakindu.sct.model.sgraph.edit/icons/full/obj16/AnnotatableElement.gif
  5. 2 0
      plugins/org.yakindu.sct.model.sgraph.edit/plugin.properties
  6. 184 0
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/AnnotatableElementItemProvider.java
  7. 24 0
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/SGraphItemProviderAdapterFactory.java
  8. 8 0
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/StatechartItemProvider.java
  9. 9 5
      plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore
  10. 67 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/AnnotatableElement.java
  11. 9 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphFactory.java
  12. 71 23
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java
  13. 1 25
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Statechart.java
  14. 184 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/AnnotatableElementImpl.java
  15. 12 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphFactoryImpl.java
  16. 36 10
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java
  17. 48 19
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java
  18. 20 2
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphAdapterFactory.java
  19. 24 2
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphSwitch.java
  20. 18 6
      plugins/org.yakindu.sct.model.stext.lib/lib/STextLib.xmi
  21. 3 3
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/resource/StextResource.java
  22. 25 14
      plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/DefaultSimulationEngineFactory.java
  23. 0 9
      plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/launch/ISCTLaunchParameters.java
  24. 6 85
      plugins/org.yakindu.sct.simulation.ui.sexec/src/org/yakindu/sct/simulation/ui/sexec/launch/tabs/StatechartLaunchConfigurationTab.java

BIN
plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateAnnotatableElement_annotations_Annotation.gif


BIN
plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateScope_declarations_Enumerator.gif


BIN
plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateScope_reactions_Transition.gif


BIN
plugins/org.yakindu.sct.model.sgraph.edit/icons/full/obj16/AnnotatableElement.gif


+ 2 - 0
plugins/org.yakindu.sct.model.sgraph.edit/plugin.properties

@@ -158,3 +158,5 @@ _UI_Import_importedNamespace_feature = Imported Namespace
 _UI_ImportDeclaration_declaration_feature = Declaration
 _UI_Statechart_domainID_feature = Domain ID
 _UI_Scope_reactions_feature = Reactions
+_UI_AnnotatableElement_type = Annotatable Element
+_UI_AnnotatableElement_annotations_feature = Annotations

+ 184 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/AnnotatableElementItemProvider.java

@@ -0,0 +1,184 @@
+/**
+ * Copyright (c) 2011 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.model.sgraph.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+import org.eclipse.emf.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.base.types.TypesFactory;
+
+import org.yakindu.sct.model.sgraph.AnnotatableElement;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.sgraph.AnnotatableElement} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotatableElementItemProvider 
+	extends ItemProviderAdapter
+	implements
+		IEditingDomainItemProvider,
+		IStructuredItemContentProvider,
+		ITreeItemContentProvider,
+		IItemLabelProvider,
+		IItemPropertySource {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
+
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotatableElementItemProvider(AdapterFactory adapterFactory) {
+		super(adapterFactory);
+	}
+
+	/**
+	 * This returns the property descriptors for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+		if (itemPropertyDescriptors == null) {
+			super.getPropertyDescriptors(object);
+
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+	 * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+		if (childrenFeatures == null) {
+			super.getChildrenFeatures(object);
+			childrenFeatures.add(SGraphPackage.Literals.ANNOTATABLE_ELEMENT__ANNOTATIONS);
+		}
+		return childrenFeatures;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EStructuralFeature getChildFeature(Object object, Object child) {
+		// Check the type of the specified child object and return the proper feature to use for
+		// adding (see {@link AddCommand}) it as a child.
+
+		return super.getChildFeature(object, child);
+	}
+
+	/**
+	 * This returns AnnotatableElement.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/AnnotatableElement"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		return getString("_UI_AnnotatableElement_type");
+	}
+	
+
+	/**
+	 * This handles model notifications by calling {@link #updateChildren} to update any cached
+	 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void notifyChanged(Notification notification) {
+		updateChildren(notification);
+
+		switch (notification.getFeatureID(AnnotatableElement.class)) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+				return;
+		}
+		super.notifyChanged(notification);
+	}
+
+	/**
+	 * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+	 * that can be created under this object.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+		super.collectNewChildDescriptors(newChildDescriptors, object);
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SGraphPackage.Literals.ANNOTATABLE_ELEMENT__ANNOTATIONS,
+				 TypesFactory.eINSTANCE.createAnnotation()));
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return SGraphEditPlugin.INSTANCE;
+	}
+
+}

+ 24 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/SGraphItemProviderAdapterFactory.java

@@ -360,6 +360,29 @@ public class SGraphItemProviderAdapterFactory extends SGraphAdapterFactory imple
 		return importDeclarationItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.sgraph.AnnotatableElement} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotatableElementItemProvider annotatableElementItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.sgraph.AnnotatableElement}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createAnnotatableElementAdapter() {
+		if (annotatableElementItemProvider == null) {
+			annotatableElementItemProvider = new AnnotatableElementItemProvider(this);
+		}
+
+		return annotatableElementItemProvider;
+	}
+
 	/**
 	 * This returns the root adapter factory that contains this factory.
 	 * <!-- begin-user-doc -->
@@ -471,6 +494,7 @@ public class SGraphItemProviderAdapterFactory extends SGraphAdapterFactory imple
 		if (synchronizationItemProvider != null) synchronizationItemProvider.dispose();
 		if (stateItemProvider != null) stateItemProvider.dispose();
 		if (importDeclarationItemProvider != null) importDeclarationItemProvider.dispose();
+		if (annotatableElementItemProvider != null) annotatableElementItemProvider.dispose();
 	}
 
 }

+ 8 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/StatechartItemProvider.java

@@ -22,6 +22,7 @@ import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ViewerNotification;
 import org.yakindu.base.base.BasePackage;
+import org.yakindu.base.types.TypesFactory;
 import org.yakindu.sct.model.sgraph.SGraphFactory;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.sgraph.Statechart;
@@ -173,6 +174,7 @@ public class StatechartItemProvider
 			childrenFeatures.add(SGraphPackage.Literals.REACTIVE_ELEMENT__LOCAL_REACTIONS);
 			childrenFeatures.add(SGraphPackage.Literals.SCOPED_ELEMENT__SCOPES);
 			childrenFeatures.add(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS);
+			childrenFeatures.add(SGraphPackage.Literals.ANNOTATABLE_ELEMENT__ANNOTATIONS);
 		}
 		return childrenFeatures;
 	}
@@ -236,6 +238,7 @@ public class StatechartItemProvider
 			case SGraphPackage.STATECHART__LOCAL_REACTIONS:
 			case SGraphPackage.STATECHART__SCOPES:
 			case SGraphPackage.STATECHART__REGIONS:
+			case SGraphPackage.STATECHART__ANNOTATIONS:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;
 		}
@@ -267,6 +270,11 @@ public class StatechartItemProvider
 			(createChildParameter
 				(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS,
 				 SGraphFactory.eINSTANCE.createRegion()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(SGraphPackage.Literals.ANNOTATABLE_ELEMENT__ANNOTATIONS,
+				 TypesFactory.eINSTANCE.createAnnotation()));
 	}
 
 }

+ 9 - 5
plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore

@@ -27,11 +27,7 @@
   <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//ChoiceKind"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//SpecificationElement #//ReactiveElement #//ScopedElement #//CompositeElement ../../../org.yakindu.base.types/model/base.ecore#//NamedElement ../../../org.yakindu.base.types/model/base.ecore#//DocumentedElement ../../../org.yakindu.base.types/model/base.ecore#//DomainElement">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="annotation" upperBound="-1"
-        eType="ecore:EClass ../../../org.yakindu.base.types/model/types.ecore#//Annotation"
-        transient="true" containment="true"/>
-  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//SpecificationElement #//ReactiveElement #//ScopedElement #//CompositeElement ../../../org.yakindu.base.types/model/base.ecore#//NamedElement ../../../org.yakindu.base.types/model/base.ecore#//DocumentedElement ../../../org.yakindu.base.types/model/base.ecore#//DomainElement #//AnnotatableElement"/>
   <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
   </eClassifiers>
@@ -100,4 +96,12 @@
   <eClassifiers xsi:type="ecore:EClass" name="ImportDeclaration" eSuperTypes="../../../org.yakindu.base.types/model/types.ecore#//Declaration">
     <eStructuralFeatures xsi:type="ecore:EReference" name="declaration" eType="ecore:EClass ../../../org.yakindu.base.types/model/types.ecore#//Declaration"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AnnotatableElement">
+    <eOperations name="getAnnotationOfType" eType="ecore:EClass ../../../org.yakindu.base.types/model/types.ecore#//Annotation">
+      <eParameters name="typeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+    </eOperations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
+        eType="ecore:EClass ../../../org.yakindu.base.types/model/types.ecore#//Annotation"
+        transient="true" containment="true"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 67 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/AnnotatableElement.java

@@ -0,0 +1,67 @@
+/**
+ * Copyright (c) 2011 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.model.sgraph;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.yakindu.base.types.Annotation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotatable Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.AnnotatableElement#getAnnotations <em>Annotations</em>}</li>
+ * </ul>
+ *
+ * @see org.yakindu.sct.model.sgraph.SGraphPackage#getAnnotatableElement()
+ * @model
+ * @generated
+ */
+public interface AnnotatableElement extends EObject {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
+
+	/**
+	 * Returns the value of the '<em><b>Annotations</b></em>' containment reference list.
+	 * The list contents are of type {@link org.yakindu.base.types.Annotation}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Annotations</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Annotations</em>' containment reference list.
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getAnnotatableElement_Annotations()
+	 * @model containment="true" resolveProxies="true" transient="true"
+	 * @generated
+	 */
+	EList<Annotation> getAnnotations();
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @model
+	 * @generated
+	 */
+	Annotation getAnnotationOfType(String typeName);
+
+} // AnnotatableElement

+ 9 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphFactory.java

@@ -144,6 +144,15 @@ public interface SGraphFactory extends EFactory {
 	 */
 	ImportDeclaration createImportDeclaration();
 
+	/**
+	 * Returns a new object of class '<em>Annotatable Element</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Annotatable Element</em>'.
+	 * @generated
+	 */
+	AnnotatableElement createAnnotatableElement();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 71 - 23
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java

@@ -606,13 +606,13 @@ public interface SGraphPackage extends EPackage {
 	int STATECHART__DOMAIN_ID = SPECIFICATION_ELEMENT_FEATURE_COUNT + 6;
 
 	/**
-	 * The feature id for the '<em><b>Annotation</b></em>' containment reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART__ANNOTATION = SPECIFICATION_ELEMENT_FEATURE_COUNT + 7;
+	int STATECHART__ANNOTATIONS = SPECIFICATION_ELEMENT_FEATURE_COUNT + 7;
 
 	/**
 	 * The number of structural features of the '<em>Statechart</em>' class.
@@ -1256,6 +1256,34 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int IMPORT_DECLARATION_FEATURE_COUNT = TypesPackage.DECLARATION_FEATURE_COUNT + 1;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.AnnotatableElementImpl <em>Annotatable Element</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sgraph.impl.AnnotatableElementImpl
+	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getAnnotatableElement()
+	 * @generated
+	 */
+	int ANNOTATABLE_ELEMENT = 22;
+
+	/**
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATABLE_ELEMENT__ANNOTATIONS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Annotatable Element</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATABLE_ELEMENT_FEATURE_COUNT = 1;
+
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.EntryKind <em>Entry Kind</em>}' enum.
 	 * <!-- begin-user-doc -->
@@ -1264,7 +1292,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getEntryKind()
 	 * @generated
 	 */
-	int ENTRY_KIND = 22;
+	int ENTRY_KIND = 23;
 
 
 	/**
@@ -1275,7 +1303,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getChoiceKind()
 	 * @generated
 	 */
-	int CHOICE_KIND = 23;
+	int CHOICE_KIND = 24;
 
 
 	/**
@@ -1511,6 +1539,27 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EReference getImportDeclaration_Declaration();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.AnnotatableElement <em>Annotatable Element</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Annotatable Element</em>'.
+	 * @see org.yakindu.sct.model.sgraph.AnnotatableElement
+	 * @generated
+	 */
+	EClass getAnnotatableElement();
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.AnnotatableElement#getAnnotations <em>Annotations</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Annotations</em>'.
+	 * @see org.yakindu.sct.model.sgraph.AnnotatableElement#getAnnotations()
+	 * @see #getAnnotatableElement()
+	 * @generated
+	 */
+	EReference getAnnotatableElement_Annotations();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Choice <em>Choice</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1542,17 +1591,6 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EClass getStatechart();
 
-	/**
-	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.Statechart#getAnnotation <em>Annotation</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the containment reference list '<em>Annotation</em>'.
-	 * @see org.yakindu.sct.model.sgraph.Statechart#getAnnotation()
-	 * @see #getStatechart()
-	 * @generated
-	 */
-	EReference getStatechart_Annotation();
-
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Entry <em>Entry</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2031,6 +2069,24 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EReference IMPORT_DECLARATION__DECLARATION = eINSTANCE.getImportDeclaration_Declaration();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.AnnotatableElementImpl <em>Annotatable Element</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sgraph.impl.AnnotatableElementImpl
+		 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getAnnotatableElement()
+		 * @generated
+		 */
+		EClass ANNOTATABLE_ELEMENT = eINSTANCE.getAnnotatableElement();
+
+		/**
+		 * The meta object literal for the '<em><b>Annotations</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference ANNOTATABLE_ELEMENT__ANNOTATIONS = eINSTANCE.getAnnotatableElement_Annotations();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.ChoiceImpl <em>Choice</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -2059,14 +2115,6 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EClass STATECHART = eINSTANCE.getStatechart();
 
-		/**
-		 * The meta object literal for the '<em><b>Annotation</b></em>' containment reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference STATECHART__ANNOTATION = eINSTANCE.getStatechart_Annotation();
-
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.EntryImpl <em>Entry</em>}' class.
 		 * <!-- begin-user-doc -->

+ 1 - 25
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Statechart.java

@@ -10,11 +10,9 @@
  */
 package org.yakindu.sct.model.sgraph;
 
-import org.eclipse.emf.common.util.EList;
 import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.DomainElement;
 import org.yakindu.base.base.NamedElement;
-import org.yakindu.base.types.Annotation;
 
 
 /**
@@ -22,18 +20,12 @@ import org.yakindu.base.types.Annotation;
  * A representation of the model object '<em><b>Statechart</b></em>'.
  * <!-- end-user-doc -->
  *
- * <p>
- * The following features are supported:
- * </p>
- * <ul>
- *   <li>{@link org.yakindu.sct.model.sgraph.Statechart#getAnnotation <em>Annotation</em>}</li>
- * </ul>
  *
  * @see org.yakindu.sct.model.sgraph.SGraphPackage#getStatechart()
  * @model
  * @generated
  */
-public interface Statechart extends SpecificationElement, ReactiveElement, ScopedElement, CompositeElement, NamedElement, DocumentedElement, DomainElement {
+public interface Statechart extends SpecificationElement, ReactiveElement, ScopedElement, CompositeElement, NamedElement, DocumentedElement, DomainElement, AnnotatableElement {
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -41,20 +33,4 @@ public interface Statechart extends SpecificationElement, ReactiveElement, Scope
 	 */
 	String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
 
-	/**
-	 * Returns the value of the '<em><b>Annotation</b></em>' containment reference list.
-	 * The list contents are of type {@link org.yakindu.base.types.Annotation}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Annotation</em>' reference isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Annotation</em>' containment reference list.
-	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getStatechart_Annotation()
-	 * @model containment="true" resolveProxies="true" transient="true"
-	 * @generated
-	 */
-	EList<Annotation> getAnnotation();
-
 } // Statechart

+ 184 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/AnnotatableElementImpl.java

@@ -0,0 +1,184 @@
+/**
+ * Copyright (c) 2011 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.model.sgraph.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+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.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.yakindu.base.types.Annotation;
+
+import org.yakindu.sct.model.sgraph.AnnotatableElement;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Annotatable Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.AnnotatableElementImpl#getAnnotations <em>Annotations</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class AnnotatableElementImpl extends EObjectImpl implements AnnotatableElement {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
+
+	/**
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAnnotations()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<Annotation> annotations;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotatableElementImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SGraphPackage.Literals.ANNOTATABLE_ELEMENT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<Annotation> getAnnotations() {
+		if (annotations == null) {
+			annotations = new EObjectContainmentEList.Resolving<Annotation>(Annotation.class, this, SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS);
+		}
+		return annotations;
+	}
+
+	/**
+	 * <!-- begin-user-doc --> 
+	 * <!-- end-user-doc -->
+	 * 
+	 * @generated NOT
+	 */
+	public Annotation getAnnotationOfType(final String typeName) {
+		EList<Annotation> annotations = getAnnotations();
+		for (Annotation annotation : annotations) {
+			if (typeName.equals(annotation.getType().getName())) {
+				return annotation;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				return getAnnotations();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				getAnnotations().clear();
+				getAnnotations().addAll((Collection<? extends Annotation>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				getAnnotations().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				return annotations != null && !annotations.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //AnnotatableElementImpl

+ 12 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphFactoryImpl.java

@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.impl.EFactoryImpl;
 import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.yakindu.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.ChoiceKind;
 import org.yakindu.sct.model.sgraph.Entry;
@@ -96,6 +97,7 @@ public class SGraphFactoryImpl extends EFactoryImpl implements SGraphFactory {
 			case SGraphPackage.SYNCHRONIZATION: return createSynchronization();
 			case SGraphPackage.STATE: return createState();
 			case SGraphPackage.IMPORT_DECLARATION: return createImportDeclaration();
+			case SGraphPackage.ANNOTATABLE_ELEMENT: return createAnnotatableElement();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -255,6 +257,16 @@ public class SGraphFactoryImpl extends EFactoryImpl implements SGraphFactory {
 		return importDeclaration;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotatableElement createAnnotatableElement() {
+		AnnotatableElementImpl annotatableElement = new AnnotatableElementImpl();
+		return annotatableElement;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 36 - 10
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java

@@ -13,11 +13,13 @@ package org.yakindu.sct.model.sgraph.impl;
 import org.eclipse.emf.ecore.EAttribute;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EOperation;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.impl.EPackageImpl;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.types.TypesPackage;
+import org.yakindu.sct.model.sgraph.AnnotatableElement;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.ChoiceKind;
 import org.yakindu.sct.model.sgraph.CompositeElement;
@@ -122,6 +124,13 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 */
 	private EClass importDeclarationEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass annotatableElementEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -494,8 +503,8 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getChoice() {
-		return choiceEClass;
+	public EClass getAnnotatableElement() {
+		return annotatableElementEClass;
 	}
 
 	/**
@@ -503,8 +512,8 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getChoice_Kind() {
-		return (EAttribute)choiceEClass.getEStructuralFeatures().get(0);
+	public EReference getAnnotatableElement_Annotations() {
+		return (EReference)annotatableElementEClass.getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -512,8 +521,8 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EClass getStatechart() {
-		return statechartEClass;
+	public EClass getChoice() {
+		return choiceEClass;
 	}
 
 	/**
@@ -521,8 +530,17 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getStatechart_Annotation() {
-		return (EReference)statechartEClass.getEStructuralFeatures().get(0);
+	public EAttribute getChoice_Kind() {
+		return (EAttribute)choiceEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getStatechart() {
+		return statechartEClass;
 	}
 
 	/**
@@ -799,7 +817,6 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		createEAttribute(choiceEClass, CHOICE__KIND);
 
 		statechartEClass = createEClass(STATECHART);
-		createEReference(statechartEClass, STATECHART__ANNOTATION);
 
 		entryEClass = createEClass(ENTRY);
 		createEAttribute(entryEClass, ENTRY__KIND);
@@ -849,6 +866,9 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		importDeclarationEClass = createEClass(IMPORT_DECLARATION);
 		createEReference(importDeclarationEClass, IMPORT_DECLARATION__DECLARATION);
 
+		annotatableElementEClass = createEClass(ANNOTATABLE_ELEMENT);
+		createEReference(annotatableElementEClass, ANNOTATABLE_ELEMENT__ANNOTATIONS);
+
 		// Create enums
 		entryKindEEnum = createEEnum(ENTRY_KIND);
 		choiceKindEEnum = createEEnum(CHOICE_KIND);
@@ -901,6 +921,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		statechartEClass.getESuperTypes().add(theBasePackage.getNamedElement());
 		statechartEClass.getESuperTypes().add(theBasePackage.getDocumentedElement());
 		statechartEClass.getESuperTypes().add(theBasePackage.getDomainElement());
+		statechartEClass.getESuperTypes().add(this.getAnnotatableElement());
 		entryEClass.getESuperTypes().add(this.getPseudostate());
 		exitEClass.getESuperTypes().add(this.getPseudostate());
 		synchronizationEClass.getESuperTypes().add(this.getPseudostate());
@@ -935,7 +956,6 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		initEAttribute(getChoice_Kind(), this.getChoiceKind(), "kind", null, 0, 1, Choice.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(statechartEClass, Statechart.class, "Statechart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getStatechart_Annotation(), theTypesPackage.getAnnotation(), null, "annotation", null, 0, -1, Statechart.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(entryEClass, Entry.class, "Entry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getEntry_Kind(), this.getEntryKind(), "kind", null, 0, 1, Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -985,6 +1005,12 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		initEClass(importDeclarationEClass, ImportDeclaration.class, "ImportDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getImportDeclaration_Declaration(), theTypesPackage.getDeclaration(), null, "declaration", null, 0, 1, ImportDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(annotatableElementEClass, AnnotatableElement.class, "AnnotatableElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getAnnotatableElement_Annotations(), theTypesPackage.getAnnotation(), null, "annotations", null, 0, -1, AnnotatableElement.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+		EOperation op = addEOperation(annotatableElementEClass, theTypesPackage.getAnnotation(), "getAnnotationOfType", 0, 1, IS_UNIQUE, IS_ORDERED);
+		addEParameter(op, ecorePackage.getEString(), "typeName", 0, 1, IS_UNIQUE, IS_ORDERED);
+
 		// Initialize enums and add enum literals
 		initEEnum(entryKindEEnum, EntryKind.class, "EntryKind");
 		addEEnumLiteral(entryKindEEnum, EntryKind.INITIAL);

+ 48 - 19
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java

@@ -27,6 +27,7 @@ import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.DomainElement;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.sct.model.sgraph.AnnotatableElement;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.ReactiveElement;
@@ -50,7 +51,7 @@ import org.yakindu.sct.model.sgraph.Statechart;
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getName <em>Name</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getDocumentation <em>Documentation</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getDomainID <em>Domain ID</em>}</li>
- *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getAnnotation <em>Annotation</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getAnnotations <em>Annotations</em>}</li>
  * </ul>
  *
  * @generated
@@ -158,14 +159,14 @@ public class StatechartImpl extends SpecificationElementImpl implements
 	protected String domainID = DOMAIN_ID_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getAnnotation() <em>Annotation</em>}' containment reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getAnnotation()
+	 * @see #getAnnotations()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList<Annotation> annotation;
+	protected EList<Annotation> annotations;
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -316,11 +317,27 @@ public class StatechartImpl extends SpecificationElementImpl implements
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList<Annotation> getAnnotation() {
-		if (annotation == null) {
-			annotation = new EObjectContainmentEList.Resolving<Annotation>(Annotation.class, this, SGraphPackage.STATECHART__ANNOTATION);
+	public EList<Annotation> getAnnotations() {
+		if (annotations == null) {
+			annotations = new EObjectContainmentEList.Resolving<Annotation>(Annotation.class, this, SGraphPackage.STATECHART__ANNOTATIONS);
 		}
-		return annotation;
+		return annotations;
+	}
+
+	/**
+	 * <!-- begin-user-doc --> 
+	 * <!-- end-user-doc -->
+	 * 
+	 * @generated NOT
+	 */
+	public Annotation getAnnotationOfType(final String typeName) {
+		EList<Annotation> annotations = getAnnotations();
+		for (Annotation annotation : annotations) {
+			if (typeName.equals(annotation.getType().getName())) {
+				return annotation;
+			}
+		}
+		return null;
 	}
 
 	/**
@@ -350,8 +367,8 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				return ((InternalEList<?>)getScopes()).basicRemove(otherEnd, msgs);
 			case SGraphPackage.STATECHART__REGIONS:
 				return ((InternalEList<?>)getRegions()).basicRemove(otherEnd, msgs);
-			case SGraphPackage.STATECHART__ANNOTATION:
-				return ((InternalEList<?>)getAnnotation()).basicRemove(otherEnd, msgs);
+			case SGraphPackage.STATECHART__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
@@ -377,8 +394,8 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				return getDocumentation();
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				return getDomainID();
-			case SGraphPackage.STATECHART__ANNOTATION:
-				return getAnnotation();
+			case SGraphPackage.STATECHART__ANNOTATIONS:
+				return getAnnotations();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -411,9 +428,9 @@ public class StatechartImpl extends SpecificationElementImpl implements
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				setDomainID((String)newValue);
 				return;
-			case SGraphPackage.STATECHART__ANNOTATION:
-				getAnnotation().clear();
-				getAnnotation().addAll((Collection<? extends Annotation>)newValue);
+			case SGraphPackage.STATECHART__ANNOTATIONS:
+				getAnnotations().clear();
+				getAnnotations().addAll((Collection<? extends Annotation>)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);
@@ -444,8 +461,8 @@ public class StatechartImpl extends SpecificationElementImpl implements
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				setDomainID(DOMAIN_ID_EDEFAULT);
 				return;
-			case SGraphPackage.STATECHART__ANNOTATION:
-				getAnnotation().clear();
+			case SGraphPackage.STATECHART__ANNOTATIONS:
+				getAnnotations().clear();
 				return;
 		}
 		super.eUnset(featureID);
@@ -472,8 +489,8 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				return DOCUMENTATION_EDEFAULT == null ? documentation != null : !DOCUMENTATION_EDEFAULT.equals(documentation);
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				return DOMAIN_ID_EDEFAULT == null ? domainID != null : !DOMAIN_ID_EDEFAULT.equals(domainID);
-			case SGraphPackage.STATECHART__ANNOTATION:
-				return annotation != null && !annotation.isEmpty();
+			case SGraphPackage.STATECHART__ANNOTATIONS:
+				return annotations != null && !annotations.isEmpty();
 		}
 		return super.eIsSet(featureID);
 	}
@@ -521,6 +538,12 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				default: return -1;
 			}
 		}
+		if (baseClass == AnnotatableElement.class) {
+			switch (derivedFeatureID) {
+				case SGraphPackage.STATECHART__ANNOTATIONS: return SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -567,6 +590,12 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				default: return -1;
 			}
 		}
+		if (baseClass == AnnotatableElement.class) {
+			switch (baseFeatureID) {
+				case SGraphPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS: return SGraphPackage.STATECHART__ANNOTATIONS;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 

+ 20 - 2
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphAdapterFactory.java

@@ -197,6 +197,10 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 				return createImportDeclarationAdapter();
 			}
 			@Override
+			public Adapter caseAnnotatableElement(org.yakindu.sct.model.sgraph.AnnotatableElement object) {
+				return createAnnotatableElementAdapter();
+			}
+			@Override
 			public Adapter caseNamedElement(NamedElement object) {
 				return createNamedElementAdapter();
 			}
@@ -213,8 +217,8 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 				return createTypedElementAdapter();
 			}
 			@Override
-			public Adapter caseAnnotatableElement(AnnotatableElement object) {
-				return createAnnotatableElementAdapter();
+			public Adapter caseTypes_AnnotatableElement(AnnotatableElement object) {
+				return createTypes_AnnotatableElementAdapter();
 			}
 			@Override
 			public Adapter casePackageMember(PackageMember object) {
@@ -338,6 +342,20 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 	 * @see org.yakindu.base.types.AnnotatableElement
 	 * @generated
 	 */
+	public Adapter createTypes_AnnotatableElementAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.AnnotatableElement <em>Annotatable Element</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.sgraph.AnnotatableElement
+	 * @generated
+	 */
 	public Adapter createAnnotatableElementAdapter() {
 		return null;
 	}

+ 24 - 2
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphSwitch.java

@@ -167,6 +167,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseNamedElement(statechart);
 				if (result == null) result = caseDocumentedElement(statechart);
 				if (result == null) result = caseDomainElement(statechart);
+				if (result == null) result = caseAnnotatableElement(statechart);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -280,7 +281,13 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseTypedElement(importDeclaration);
 				if (result == null) result = casePackageMember(importDeclaration);
 				if (result == null) result = caseNamedElement(importDeclaration);
-				if (result == null) result = caseAnnotatableElement(importDeclaration);
+				if (result == null) result = caseTypes_AnnotatableElement(importDeclaration);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
+			case SGraphPackage.ANNOTATABLE_ELEMENT: {
+				org.yakindu.sct.model.sgraph.AnnotatableElement annotatableElement = (org.yakindu.sct.model.sgraph.AnnotatableElement)theEObject;
+				T result = caseAnnotatableElement(annotatableElement);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -389,7 +396,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
 	 * @generated
 	 */
-	public T caseAnnotatableElement(AnnotatableElement object) {
+	public T caseTypes_AnnotatableElement(AnnotatableElement object) {
 		return null;
 	}
 
@@ -528,6 +535,21 @@ public class SGraphSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Annotatable Element</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>Annotatable Element</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseAnnotatableElement(org.yakindu.sct.model.sgraph.AnnotatableElement object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Choice</em>'.
 	 * <!-- begin-user-doc -->

+ 18 - 6
plugins/org.yakindu.sct.model.stext.lib/lib/STextLib.xmi

@@ -7,18 +7,30 @@
     xsi:schemaLocation="http://www.yakindu.org/base/types/2.0.0 ../../org.yakindu.base.types/model/types.ecore"
     name="">
   <member xsi:type="types:AnnotationType"
-      name="Execution">
+      name="EventDriven"/>
+  <member xsi:type="types:AnnotationType"
+      name="CycleBased">
+    <properties
+        name="period">
+      <typeSpecifier
+          type="//@member.2"/>
+    </properties>
+  </member>
+  <member xsi:type="types:PrimitiveType"
+      name="integer"/>
+  <member xsi:type="types:AnnotationType"
+      name="ExecutionOrder">
     <properties
-        name="executionType">
+        name="order">
       <typeSpecifier
-          type="//@member.1"/>
+          type="//@member.4"/>
     </properties>
   </member>
   <member xsi:type="types:EnumerationType"
-      name="ExecutionType">
+      name="ExecutionOrder">
     <enumerator
-        name="EVENT_DRIVEN"/>
+        name="CHILD_FIRST"/>
     <enumerator
-        name="CYCLE_BASED"/>
+        name="PARENT_FIRST"/>
   </member>
 </types:Package>

+ 3 - 3
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/resource/StextResource.java

@@ -50,7 +50,7 @@ public class StextResource extends AbstractSCTResource {
 			builder.append("namespace " + statechart.getNamespace());
 			builder.append("\n");
 		}
-		for(Annotation annotation : statechart.getAnnotation()){
+		for(Annotation annotation : statechart.getAnnotations()){
 			builder.append(serialize(annotation));
 			builder.append("\n");
 		}
@@ -108,10 +108,10 @@ public class StextResource extends AbstractSCTResource {
 			statechart.getScopes().addAll(definitionScopes);
 		}
 		
-		statechart.getAnnotation().clear();
+		statechart.getAnnotations().clear();
 		EList<AnnotationDefinition> annotations = rootASTElement.getAnnotation();
 		if(annotations != null){
-			statechart.getAnnotation().addAll(annotations);
+			statechart.getAnnotations().addAll(annotations);
 		}
 		
 	}

+ 25 - 14
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/container/DefaultSimulationEngineFactory.java

@@ -10,11 +10,6 @@
  */
 package org.yakindu.sct.simulation.core.sexec.container;
 
-import static org.yakindu.sct.simulation.core.sexec.launch.ISCTLaunchParameters.CYCLE_PERIOD;
-import static org.yakindu.sct.simulation.core.sexec.launch.ISCTLaunchParameters.DEFAULT_CYCLE_PERIOD;
-import static org.yakindu.sct.simulation.core.sexec.launch.ISCTLaunchParameters.DEFAULT_IS_CYCLE_BASED;
-import static org.yakindu.sct.simulation.core.sexec.launch.ISCTLaunchParameters.IS_CYCLE_BASED;
-
 import java.util.Collections;
 
 import org.eclipse.core.runtime.CoreException;
@@ -30,9 +25,12 @@ import org.yakindu.base.types.typesystem.ITypeSystem;
 import org.yakindu.sct.domain.extension.DomainRegistry;
 import org.yakindu.sct.domain.extension.IDomain;
 import org.yakindu.sct.model.sgraph.Statechart;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.simulation.core.engine.ISimulationEngine;
+import org.yakindu.sct.simulation.core.sexec.interpreter.IStatementInterpreter;
 import org.yakindu.sct.simulation.core.sexec.launch.ISCTLaunchParameters;
 import org.yakindu.sct.simulation.core.sruntime.ExecutionContext;
+import org.yakindu.sct.simulation.core.sruntime.SRuntimeFactory;
 
 import com.google.inject.Inject;
 import com.google.inject.Injector;
@@ -44,18 +42,16 @@ import com.google.inject.Injector;
  */
 public class DefaultSimulationEngineFactory implements ISimulationEngineFactory {
 
+	private static final int DEFAULT_CYCLE_PERIOD = 200;
+	private static final String CYCLE_BASED_ANNOTATION = "CycleBased";
+	private static final String EVENT_DRIVEN_ANNOTATION = "EventDriven";
 	@Inject
 	private Injector injector;
+	@Inject
+	private IStatementInterpreter interpreter;
 
 	public ISimulationEngine createExecutionContainer(Statechart statechart, ILaunch launch) throws CoreException {
-		ISimulationEngine controller = null;
-		boolean isCycleBased = launch.getLaunchConfiguration().getAttribute(IS_CYCLE_BASED, DEFAULT_IS_CYCLE_BASED);
-		if (isCycleBased) {
-			long cyclePeriod = launch.getLaunchConfiguration().getAttribute(CYCLE_PERIOD, DEFAULT_CYCLE_PERIOD);
-			controller = new CycleBasedSimulationEngine(statechart, cyclePeriod);
-		} else {
-			controller = new EventDrivenSimulationEngine(statechart);
-		}
+		ISimulationEngine controller = createController(statechart);
 		injector.injectMembers(controller);
 
 		// For restoring execution context
@@ -68,11 +64,26 @@ public class DefaultSimulationEngineFactory implements ISimulationEngineFactory
 		return controller;
 	}
 
+	protected ISimulationEngine createController(Statechart statechart) throws CoreException {
+		AnnotationDefinition cycleBased = (AnnotationDefinition) statechart.getAnnotationOfType(CYCLE_BASED_ANNOTATION);
+		AnnotationDefinition eventDriven = (AnnotationDefinition) statechart
+				.getAnnotationOfType(EVENT_DRIVEN_ANNOTATION);
+		if (cycleBased != null) {
+			Long result = (Long) interpreter.evaluateStatement(cycleBased.getArgs().get(0),
+					SRuntimeFactory.eINSTANCE.createExecutionContext());
+			return new CycleBasedSimulationEngine(statechart, result);
+		}
+		if (eventDriven != null) {
+			return new EventDrivenSimulationEngine(statechart);
+		}
+		return new CycleBasedSimulationEngine(statechart, DEFAULT_CYCLE_PERIOD);
+	}
+
 	protected ExecutionContext restore(String context, Statechart statechart) {
 		try {
 			ResourceSet set = new ResourceSetImpl();
 			Resource resource = set.createResource(URI.createURI("snapshot.xmi"));
-			if(resource == null)
+			if (resource == null)
 				return null;
 			set.getResources().add(resource);
 			resource.load(new URIConverter.ReadableInputStream(context, "UTF_8"), Collections.emptyMap());

+ 0 - 9
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/launch/ISCTLaunchParameters.java

@@ -21,15 +21,6 @@ public interface ISCTLaunchParameters {
 	String FILE_NAME = "filename";
 	String DEFAULT_FILE_NAME = "";
 
-	String CYCLE_PERIOD = "cyclePeriod";
-	int DEFAULT_CYCLE_PERIOD = 200;
-
-	String IS_CYCLE_BASED = "cycleBased";
-	boolean DEFAULT_IS_CYCLE_BASED = true;
-
-	String IS_EVENT_DRIVEN = "eventDriven";
-	boolean DEFAULT_IS_EVENT_DRIVEN = false;
-	
 	String OPERATION_CLASS = "operationClass";
 	String DEFAULT_OPERATION_CLASS = "";
 	

+ 6 - 85
plugins/org.yakindu.sct.simulation.ui.sexec/src/org/yakindu/sct/simulation/ui/sexec/launch/tabs/StatechartLaunchConfigurationTab.java

@@ -48,15 +48,10 @@ import org.yakindu.sct.simulation.ui.SimulationImages;
  */
 public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements ISCTLaunchParameters {
 
-
 	public static final String LAUNCH_TAB_ID = "org.yakindu.sct.simulation.sexec.launchTab";
-	
-	
+
 	private Text modelfile;
-	private Text cyclePeriod;
 	private Text operationClass;
-	private Button btnCycle;
-	private Button btnEvent;
 
 	public void createControl(Composite parent) {
 		Composite comp = new Composite(parent, SWT.NONE);
@@ -69,8 +64,6 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 	private void createFileSelectionGroup(Composite comp) {
 		createModelFileGroup(comp);
 		createOperationClassGroup(comp);
-		createExecutionTypeControls(comp);
-		createCyclePeriodGroup(comp);
 	}
 
 	private void createOperationClassGroup(Composite parent) {
@@ -83,36 +76,6 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 		GridDataFactory.fillDefaults().grab(true, false).applyTo(operationClass);
 	}
 
-	private void createExecutionTypeControls(Composite parent) {
-		Group propertyGroup = new Group(parent, SWT.NONE);
-		GridDataFactory.fillDefaults().grab(true, false).applyTo(propertyGroup);
-		propertyGroup.setText("Execution type:");
-		propertyGroup.setLayout(new GridLayout(1, true));
-		btnCycle = new Button(propertyGroup, SWT.RADIO);
-		btnCycle.setText("cycle-based");
-		btnCycle.addListener(SWT.Selection, new UpdateListener());
-		btnCycle.addListener(SWT.Selection, new EnableStateListener());
-		GridDataFactory.fillDefaults().applyTo(btnCycle);
-		btnEvent = new Button(propertyGroup, SWT.RADIO);
-		btnEvent.setText("event-driven");
-		btnEvent.addListener(SWT.Selection, new UpdateListener());
-		btnCycle.addListener(SWT.Selection, new EnableStateListener());
-		GridDataFactory.fillDefaults().applyTo(btnEvent);
-	}
-
-	private void createCyclePeriodGroup(Composite parent) {
-		Group propertyGroup = new Group(parent, SWT.NONE);
-		GridDataFactory.fillDefaults().grab(true, false).applyTo(propertyGroup);
-		propertyGroup.setText("Cycle period:");
-		propertyGroup.setLayout(new GridLayout(2, false));
-		cyclePeriod = new Text(propertyGroup, SWT.BORDER);
-		cyclePeriod.addListener(SWT.Modify, new UpdateListener());
-		GridDataFactory.fillDefaults().grab(true, false).applyTo(cyclePeriod);
-		Label lblMs = new Label(propertyGroup, SWT.NONE);
-		lblMs.setText("ms");
-		GridDataFactory.fillDefaults().applyTo(lblMs);
-	}
-
 	private void createModelFileGroup(Composite comp) {
 		Group fileGroup = new Group(comp, SWT.NONE);
 		GridDataFactory.fillDefaults().grab(true, false).applyTo(fileGroup);
@@ -174,10 +137,6 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 		try {
 			modelfile.setText(configuration.getAttribute(FILE_NAME, DEFAULT_FILE_NAME));
 			operationClass.setText(configuration.getAttribute(OPERATION_CLASS, DEFAULT_OPERATION_CLASS));
-			cyclePeriod.setText(String.valueOf(configuration.getAttribute(CYCLE_PERIOD, DEFAULT_CYCLE_PERIOD)));
-			btnCycle.setSelection(configuration.getAttribute(IS_CYCLE_BASED, DEFAULT_IS_CYCLE_BASED));
-			btnEvent.setSelection(configuration.getAttribute(IS_EVENT_DRIVEN, DEFAULT_IS_EVENT_DRIVEN));
-			cyclePeriod.setEnabled(btnCycle.getSelection());
 		} catch (CoreException e) {
 			e.printStackTrace();
 		}
@@ -186,15 +145,6 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 	public void performApply(ILaunchConfigurationWorkingCopy configuration) {
 		configuration.setAttribute(FILE_NAME, modelfile.getText());
 		configuration.setAttribute(OPERATION_CLASS, operationClass.getText());
-		if (isCyclePeriodValid()) {
-			configuration.setAttribute(CYCLE_PERIOD, getCyclePeriod());
-		}
-		configuration.setAttribute(IS_CYCLE_BASED, btnCycle.getSelection());
-		configuration.setAttribute(IS_EVENT_DRIVEN, btnEvent.getSelection());
-	}
-
-	private int getCyclePeriod() {
-		return Integer.parseInt(cyclePeriod.getText());
 	}
 
 	public String getName() {
@@ -228,22 +178,14 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 				setErrorMessage("file " + model + " does not exist!");
 				return false;
 			}
-		String cyclePeriod = this.cyclePeriod.getText();
-		if (cyclePeriod.length() == 0) {
-			setErrorMessage("Empty cycle period!");
-			return false;
-		} else if (!isCyclePeriodValid()) {
-			setErrorMessage("Cycle Period must be a number!");
-			return false;
-		}
 		Set<String> operationClasses = getOperationClasses();
 		if (operationClasses.size() > 0) {
 			for (String clazz : operationClasses) {
 				// check if class exists
 				IProject project = ResourcesPlugin.getWorkspace().getRoot().findMember(model).getProject();
 				if (project != null) {
-					ClassLoader classLoader = new WorkspaceClassLoaderFactory().createClassLoader(project, getClass()
-							.getClassLoader());
+					ClassLoader classLoader = new WorkspaceClassLoaderFactory().createClassLoader(project,
+							getClass().getClassLoader());
 					try {
 						Class<?> loadClass = classLoader.loadClass(clazz);
 						loadClass.newInstance();
@@ -251,13 +193,13 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 						setErrorMessage("Class " + clazz + " not found in project " + project.getName() + "!");
 						return false;
 					} catch (InstantiationException e) {
-						setErrorMessage("Could not instantiate class " + clazz
-								+ "! (No default constructor available?) ");
+						setErrorMessage(
+								"Could not instantiate class " + clazz + "! (No default constructor available?) ");
 						return false;
 					} catch (IllegalAccessException e) {
 						setErrorMessage("Could not access class constructor for class" + clazz + "!");
 						return false;
-					}catch(Throwable t){
+					} catch (Throwable t) {
 						setErrorMessage(t.getMessage());
 						return false;
 					}
@@ -268,32 +210,11 @@ public class StatechartLaunchConfigurationTab extends JavaLaunchTab implements I
 		return super.isValid(launchConfig);
 	}
 
-	private boolean isCyclePeriodValid() {
-		try {
-			getCyclePeriod();
-		} catch (NumberFormatException ex) {
-			return false;
-		}
-		return true;
-	}
-	
-	
-	
-
 	@Override
 	public String getId() {
 		return LAUNCH_TAB_ID;
 	}
 
-
-
-
-	private class EnableStateListener implements Listener {
-		public void handleEvent(Event event) {
-			cyclePeriod.setEnabled(btnCycle.getSelection());
-		}
-	}
-
 	private class UpdateListener implements Listener {
 
 		public void handleEvent(Event event) {