فهرست منبع

Annotations in Statecharts

Andreas Muelder 8 سال پیش
والد
کامیت
9318f34837
73فایلهای تغییر یافته به همراه2182 افزوده شده و 324 حذف شده
  1. 50 0
      plugins/org.yakindu.base.expressions/emf-gen/org/yakindu/base/expressions/expressions/Annotation.java
  2. 63 0
      plugins/org.yakindu.base.expressions/src/org/yakindu/base/expressions/scoping/LibraryScope.java
  3. BIN
      plugins/org.yakindu.base.types.edit/icons/full/ctool16/CreateAnnotationType_properties_Property.gif
  4. BIN
      plugins/org.yakindu.base.types.edit/icons/full/ctool16/CreatePackage_member_AnnotationType.gif
  5. BIN
      plugins/org.yakindu.base.types.edit/icons/full/obj16/AnnotationType.gif
  6. 4 0
      plugins/org.yakindu.base.types.edit/plugin.properties
  7. 25 55
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/AnnotationItemProvider.java
  8. 169 0
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/AnnotationTypeItemProvider.java
  9. 1 1
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/PackageItemProvider.java
  10. 24 0
      plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/TypesItemProviderAdapterFactory.java
  11. 9 6
      plugins/org.yakindu.base.types/model/types.ecore
  12. 3 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/AnnotatableElement.java
  13. 13 21
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Annotation.java
  14. 59 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/AnnotationType.java
  15. 9 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesFactory.java
  16. 168 74
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java
  17. 20 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotatableElementImpl.java
  18. 34 62
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotationImpl.java
  19. 186 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotationTypeImpl.java
  20. 0 6
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ComplexTypeImpl.java
  21. 6 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/DeclarationImpl.java
  22. 20 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/PackageMemberImpl.java
  23. 6 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ParameterImpl.java
  24. 4 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypeAliasImpl.java
  25. 12 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesFactoryImpl.java
  26. 48 16
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesPackageImpl.java
  27. 19 0
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/util/TypesAdapterFactory.java
  28. 26 3
      plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/util/TypesSwitch.java
  29. 6 5
      plugins/org.yakindu.base.types/src/org/yakindu/base/types/annotations/TypeAnnotations.java
  30. 5 1
      plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore
  31. 30 2
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java
  32. 23 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Statechart.java
  33. 11 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java
  34. 37 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java
  35. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventRaisingExpression_event_AnnotationDefinition.gif
  36. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventRaisingExpression_value_AnnotationDefinition.gif
  37. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventValueReferenceExpression_value_AnnotationDefinition.gif
  38. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateGuard_expression_AnnotationDefinition.gif
  39. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateReactionEffect_actions_AnnotationDefinition.gif
  40. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateRegularEventSpec_event_AnnotationDefinition.gif
  41. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateStatechartSpecification_annotation_AnnotationDefinition.gif
  42. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateTimeEventSpec_value_AnnotationDefinition.gif
  43. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateVariableDefinition_initialValue_AnnotationDefinition.gif
  44. BIN
      plugins/org.yakindu.sct.model.stext.edit/icons/full/obj16/AnnotationDefinition.gif
  45. 2 0
      plugins/org.yakindu.sct.model.stext.edit/plugin.properties
  46. 265 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/AnnotationDefinitionItemProvider.java
  47. 10 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/EventRaisingExpressionItemProvider.java
  48. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/EventValueReferenceExpressionItemProvider.java
  49. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/GuardItemProvider.java
  50. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/ReactionEffectItemProvider.java
  51. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/RegularEventSpecItemProvider.java
  52. 44 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/StatechartSpecificationItemProvider.java
  53. 24 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/StextItemProviderAdapterFactory.java
  54. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/TimeEventSpecItemProvider.java
  55. 1 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/TypeAliasDefinitionItemProvider.java
  56. 5 0
      plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/VariableDefinitionItemProvider.java
  57. 20 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/AnnotationDefinition.java
  58. 23 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StatechartSpecification.java
  59. 9 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextFactory.java
  60. 110 7
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextPackage.java
  61. 197 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/AnnotationDefinitionImpl.java
  62. 110 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StatechartSpecificationImpl.java
  63. 12 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StextFactoryImpl.java
  64. 34 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java
  65. 76 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/util/StextAdapterFactory.java
  66. 74 0
      plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/util/StextSwitch.java
  67. 5 1
      plugins/org.yakindu.sct.model.stext/model/SText.ecore
  68. 8 4
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext
  69. 6 1
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/inferrer/STextTypeInferrer.java
  70. 18 3
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/resource/StextResource.java
  71. 5 1
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/STextGlobalScopeProvider.java
  72. 9 2
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java
  73. 0 35
      test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/validation/STextJavaValidatorTest.java

+ 50 - 0
plugins/org.yakindu.base.expressions/emf-gen/org/yakindu/base/expressions/expressions/Annotation.java

@@ -0,0 +1,50 @@
+/**
+ */
+package org.yakindu.base.expressions.expressions;
+
+import org.yakindu.base.types.AnnotationType;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.base.expressions.expressions.Annotation#getType <em>Type</em>}</li>
+ * </ul>
+ *
+ * @see org.yakindu.base.expressions.expressions.ExpressionsPackage#getAnnotation()
+ * @model
+ * @generated
+ */
+public interface Annotation extends ArgumentExpression {
+	/**
+	 * Returns the value of the '<em><b>Type</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Type</em>' reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Type</em>' reference.
+	 * @see #setType(AnnotationType)
+	 * @see org.yakindu.base.expressions.expressions.ExpressionsPackage#getAnnotation_Type()
+	 * @model
+	 * @generated
+	 */
+	AnnotationType getType();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.base.expressions.expressions.Annotation#getType <em>Type</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Type</em>' reference.
+	 * @see #getType()
+	 * @generated
+	 */
+	void setType(AnnotationType value);
+
+} // Annotation

+ 63 - 0
plugins/org.yakindu.base.expressions/src/org/yakindu/base/expressions/scoping/LibraryScope.java

@@ -0,0 +1,63 @@
+/** 
+ * Copyright (c) 2017 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.base.expressions.scoping;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.xtext.resource.IEObjectDescription;
+import org.eclipse.xtext.scoping.IScope;
+import org.eclipse.xtext.scoping.Scopes;
+import org.eclipse.xtext.scoping.impl.AbstractScope;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+public class LibraryScope extends AbstractScope {
+
+	private URI[] uris;
+
+	public LibraryScope(IScope parent, URI... uris) {
+		super(parent, false);
+		for (URI uri : uris) {
+			Assert.isTrue(URIConverter.INSTANCE.exists(uri, null));
+		}
+		this.uris = uris;
+	}
+
+	private List<IEObjectDescription> result;
+	private ResourceSet set;
+
+	@Override
+	protected Iterable<IEObjectDescription> getAllLocalElements() {
+		if (result == null) {
+			result = Lists.newArrayList();
+			set = new ResourceSetImpl();
+			for (URI uri : uris) {
+				Resource resource = set.getResource(uri, true);
+				Iterable<IEObjectDescription> iterable = Scopes
+						.scopedElementsFor(Lists.newArrayList(resource.getAllContents()));
+				Iterables.addAll(result, iterable);
+			}
+		}
+		return result;
+	}
+}

BIN
plugins/org.yakindu.base.types.edit/icons/full/ctool16/CreateAnnotationType_properties_Property.gif


BIN
plugins/org.yakindu.base.types.edit/icons/full/ctool16/CreatePackage_member_AnnotationType.gif


BIN
plugins/org.yakindu.base.types.edit/icons/full/obj16/AnnotationType.gif


+ 4 - 0
plugins/org.yakindu.base.types.edit/plugin.properties

@@ -218,3 +218,7 @@ _UI_GenericElement_templateParameters_feature = Template Parameters
 _UI_GenericElement_typeParameters_feature = Type Parameters
 _UI_Parameter_isOptional_feature = Is Optional
 _UI_Parameter_optional_feature = Optional
+_UI_AnnotationType_type = Annotation Type
+_UI_Annotation_type_feature = Type
+_UI_AnnotationType_properties_feature = Properties
+_UI_AnnotationType_targets_feature = Targets

+ 25 - 55
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/AnnotationItemProvider.java

@@ -8,12 +8,15 @@ import java.util.List;
 
 import org.eclipse.emf.common.notify.AdapterFactory;
 import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.common.util.ResourceLocator;
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+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.ViewerNotification;
-import org.yakindu.base.types.Annotation;
-import org.yakindu.base.types.TypesFactory;
+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.yakindu.base.types.TypesPackage;
 
 /**
@@ -22,7 +25,7 @@ import org.yakindu.base.types.TypesPackage;
  * <!-- end-user-doc -->
  * @generated
  */
-public class AnnotationItemProvider extends PackageMemberItemProvider {
+public class AnnotationItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
 	/**
 	 * This constructs an instance from a factory and a notifier.
 	 * <!-- begin-user-doc -->
@@ -44,25 +47,25 @@ public class AnnotationItemProvider extends PackageMemberItemProvider {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
-			addTargetsPropertyDescriptor(object);
+			addTypePropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
 	/**
-	 * This adds a property descriptor for the Targets feature.
+	 * This adds a property descriptor for the Type feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addTargetsPropertyDescriptor(Object object) {
+	protected void addTypePropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_Annotation_targets_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_Annotation_targets_feature", "_UI_Annotation_type"),
-				 TypesPackage.Literals.ANNOTATION__TARGETS,
+				 getString("_UI_Annotation_type_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_Annotation_type_feature", "_UI_Annotation_type"),
+				 TypesPackage.Literals.ANNOTATION__TYPE,
 				 true,
 				 false,
 				 true,
@@ -71,36 +74,6 @@ public class AnnotationItemProvider extends PackageMemberItemProvider {
 				 null));
 	}
 
-	/**
-	 * 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(TypesPackage.Literals.ANNOTATION__PROPERTIES);
-		}
-		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 Annotation.gif.
 	 * <!-- begin-user-doc -->
@@ -120,10 +93,7 @@ public class AnnotationItemProvider extends PackageMemberItemProvider {
 	 */
 	@Override
 	public String getText(Object object) {
-		String label = ((Annotation)object).getName();
-		return label == null || label.length() == 0 ?
-			getString("_UI_Annotation_type") :
-			getString("_UI_Annotation_type") + " " + label;
+		return getString("_UI_Annotation_type");
 	}
 	
 
@@ -137,12 +107,6 @@ public class AnnotationItemProvider extends PackageMemberItemProvider {
 	@Override
 	public void notifyChanged(Notification notification) {
 		updateChildren(notification);
-
-		switch (notification.getFeatureID(Annotation.class)) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
-				return;
-		}
 		super.notifyChanged(notification);
 	}
 
@@ -156,11 +120,17 @@ public class AnnotationItemProvider extends PackageMemberItemProvider {
 	@Override
 	protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
 		super.collectNewChildDescriptors(newChildDescriptors, object);
+	}
 
-		newChildDescriptors.add
-			(createChildParameter
-				(TypesPackage.Literals.ANNOTATION__PROPERTIES,
-				 TypesFactory.eINSTANCE.createProperty()));
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return TypesEditPlugin.INSTANCE;
 	}
 
 }

+ 169 - 0
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/AnnotationTypeItemProvider.java

@@ -0,0 +1,169 @@
+/**
+ */
+package org.yakindu.base.types.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.ecore.EStructuralFeature;
+
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.base.types.AnnotationType;
+import org.yakindu.base.types.TypesFactory;
+import org.yakindu.base.types.TypesPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.base.types.AnnotationType} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotationTypeItemProvider extends TypeItemProvider {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotationTypeItemProvider(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);
+
+			addTargetsPropertyDescriptor(object);
+		}
+		return itemPropertyDescriptors;
+	}
+
+	/**
+	 * This adds a property descriptor for the Targets feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addTargetsPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_AnnotationType_targets_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_AnnotationType_targets_feature", "_UI_AnnotationType_type"),
+				 TypesPackage.Literals.ANNOTATION_TYPE__TARGETS,
+				 true,
+				 false,
+				 true,
+				 null,
+				 null,
+				 null));
+	}
+
+	/**
+	 * 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(TypesPackage.Literals.ANNOTATION_TYPE__PROPERTIES);
+		}
+		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 AnnotationType.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/AnnotationType"));
+	}
+
+	/**
+	 * This returns the label text for the adapted class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String getText(Object object) {
+		String label = ((AnnotationType)object).getName();
+		return label == null || label.length() == 0 ?
+			getString("_UI_AnnotationType_type") :
+			getString("_UI_AnnotationType_type") + " " + label;
+	}
+	
+
+	/**
+	 * 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(AnnotationType.class)) {
+			case TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				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
+				(TypesPackage.Literals.ANNOTATION_TYPE__PROPERTIES,
+				 TypesFactory.eINSTANCE.createProperty()));
+	}
+
+}

+ 1 - 1
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/PackageItemProvider.java

@@ -226,7 +226,7 @@ public class PackageItemProvider
 		newChildDescriptors.add
 			(createChildParameter
 				(TypesPackage.Literals.PACKAGE__MEMBER,
-				 TypesFactory.eINSTANCE.createAnnotation()));
+				 TypesFactory.eINSTANCE.createAnnotationType()));
 
 		newChildDescriptors.add
 			(createChildParameter

+ 24 - 0
plugins/org.yakindu.base.types.edit/src/org/yakindu/base/types/provider/TypesItemProviderAdapterFactory.java

@@ -560,6 +560,29 @@ public class TypesItemProviderAdapterFactory extends TypesAdapterFactory impleme
 		return arrayTypeSpecifierItemProvider;
 	}
 
+	/**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.base.types.AnnotationType} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotationTypeItemProvider annotationTypeItemProvider;
+
+	/**
+	 * This creates an adapter for a {@link org.yakindu.base.types.AnnotationType}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createAnnotationTypeAdapter() {
+		if (annotationTypeItemProvider == null) {
+			annotationTypeItemProvider = new AnnotationTypeItemProvider(this);
+		}
+
+		return annotationTypeItemProvider;
+	}
+
 	/**
 	 * This returns the root adapter factory that contains this factory.
 	 * <!-- begin-user-doc -->
@@ -680,6 +703,7 @@ public class TypesItemProviderAdapterFactory extends TypesAdapterFactory impleme
 		if (annotationItemProvider != null) annotationItemProvider.dispose();
 		if (annotatableElementItemProvider != null) annotatableElementItemProvider.dispose();
 		if (arrayTypeSpecifierItemProvider != null) arrayTypeSpecifierItemProvider.dispose();
+		if (annotationTypeItemProvider != null) annotationTypeItemProvider.dispose();
 	}
 
 }

+ 9 - 6
plugins/org.yakindu.base.types/model/types.ecore

@@ -99,18 +99,21 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="TypeAlias" eSuperTypes="#//TypedElement #//Type"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Annotation" eSuperTypes="#//PackageMember">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
-        eType="#//Property" containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="targets" upperBound="-1"
-        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Annotation">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//AnnotationType"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="AnnotatableElement">
     <eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
-        eType="#//Annotation"/>
+        eType="#//Annotation" containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="ArrayTypeSpecifier" eSuperTypes="#//TypeSpecifier">
     <eOperations name="getElementType" eType="#//Type"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="AnnotationType" eSuperTypes="#//Type">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1"
+        eType="#//Property" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="targets" upperBound="-1"
+        eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 3 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/AnnotatableElement.java

@@ -23,7 +23,7 @@ import org.eclipse.emf.ecore.EObject;
  */
 public interface AnnotatableElement extends EObject {
 	/**
-	 * Returns the value of the '<em><b>Annotations</b></em>' reference list.
+	 * 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>
@@ -31,9 +31,9 @@ public interface AnnotatableElement extends EObject {
 	 * there really should be more of a description here...
 	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Annotations</em>' reference list.
+	 * @return the value of the '<em>Annotations</em>' containment reference list.
 	 * @see org.yakindu.base.types.TypesPackage#getAnnotatableElement_Annotations()
-	 * @model
+	 * @model containment="true"
 	 * @generated
 	 */
 	EList<Annotation> getAnnotations();

+ 13 - 21
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Annotation.java

@@ -2,7 +2,6 @@
  */
 package org.yakindu.base.types;
 
-import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EObject;
 
 /**
@@ -14,45 +13,38 @@ import org.eclipse.emf.ecore.EObject;
  * The following features are supported:
  * </p>
  * <ul>
- *   <li>{@link org.yakindu.base.types.Annotation#getProperties <em>Properties</em>}</li>
- *   <li>{@link org.yakindu.base.types.Annotation#getTargets <em>Targets</em>}</li>
+ *   <li>{@link org.yakindu.base.types.Annotation#getType <em>Type</em>}</li>
  * </ul>
  *
  * @see org.yakindu.base.types.TypesPackage#getAnnotation()
  * @model
  * @generated
  */
-public interface Annotation extends PackageMember {
+public interface Annotation extends EObject {
 	/**
-	 * Returns the value of the '<em><b>Properties</b></em>' containment reference list.
-	 * The list contents are of type {@link org.yakindu.base.types.Property}.
+	 * Returns the value of the '<em><b>Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <p>
-	 * If the meaning of the '<em>Properties</em>' containment reference list isn't clear,
+	 * If the meaning of the '<em>Type</em>' reference isn't clear,
 	 * there really should be more of a description here...
 	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Properties</em>' containment reference list.
-	 * @see org.yakindu.base.types.TypesPackage#getAnnotation_Properties()
-	 * @model containment="true"
+	 * @return the value of the '<em>Type</em>' reference.
+	 * @see #setType(AnnotationType)
+	 * @see org.yakindu.base.types.TypesPackage#getAnnotation_Type()
+	 * @model
 	 * @generated
 	 */
-	EList<Property> getProperties();
+	AnnotationType getType();
 
 	/**
-	 * Returns the value of the '<em><b>Targets</b></em>' reference list.
-	 * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
+	 * Sets the value of the '{@link org.yakindu.base.types.Annotation#getType <em>Type</em>}' reference.
 	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Targets</em>' reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Targets</em>' reference list.
-	 * @see org.yakindu.base.types.TypesPackage#getAnnotation_Targets()
-	 * @model
+	 * @param value the new value of the '<em>Type</em>' reference.
+	 * @see #getType()
 	 * @generated
 	 */
-	EList<EObject> getTargets();
+	void setType(AnnotationType value);
 
 } // Annotation

+ 59 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/AnnotationType.java

@@ -0,0 +1,59 @@
+/**
+ */
+package org.yakindu.base.types;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotation Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.base.types.AnnotationType#getProperties <em>Properties</em>}</li>
+ *   <li>{@link org.yakindu.base.types.AnnotationType#getTargets <em>Targets</em>}</li>
+ * </ul>
+ *
+ * @see org.yakindu.base.types.TypesPackage#getAnnotationType()
+ * @model
+ * @generated
+ */
+public interface AnnotationType extends Type {
+	/**
+	 * Returns the value of the '<em><b>Properties</b></em>' containment reference list.
+	 * The list contents are of type {@link org.yakindu.base.types.Property}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Properties</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>Properties</em>' containment reference list.
+	 * @see org.yakindu.base.types.TypesPackage#getAnnotationType_Properties()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<Property> getProperties();
+
+	/**
+	 * Returns the value of the '<em><b>Targets</b></em>' reference list.
+	 * The list contents are of type {@link org.eclipse.emf.ecore.EObject}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Targets</em>' reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Targets</em>' reference list.
+	 * @see org.yakindu.base.types.TypesPackage#getAnnotationType_Targets()
+	 * @model
+	 * @generated
+	 */
+	EList<EObject> getTargets();
+
+} // AnnotationType

+ 9 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesFactory.java

@@ -214,6 +214,15 @@ public interface TypesFactory extends EFactory {
 	 */
 	ArrayTypeSpecifier createArrayTypeSpecifier();
 
+	/**
+	 * Returns a new object of class '<em>Annotation Type</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Annotation Type</em>'.
+	 * @generated
+	 */
+	AnnotationType createAnnotationType();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 168 - 74
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java

@@ -136,7 +136,7 @@ public interface TypesPackage extends EPackage {
 	int PACKAGE_MEMBER__NAME = BasePackage.NAMED_ELEMENT__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -222,7 +222,7 @@ public interface TypesPackage extends EPackage {
 	int TYPE__NAME = PACKAGE_MEMBER__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -340,7 +340,7 @@ public interface TypesPackage extends EPackage {
 	int DECLARATION__NAME = TYPED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -394,7 +394,7 @@ public interface TypesPackage extends EPackage {
 	int OPERATION__NAME = DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -475,7 +475,7 @@ public interface TypesPackage extends EPackage {
 	int PROPERTY__NAME = DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -556,7 +556,7 @@ public interface TypesPackage extends EPackage {
 	int PARAMETER__NAME = TYPED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -676,7 +676,7 @@ public interface TypesPackage extends EPackage {
 	int EVENT__NAME = DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -742,7 +742,7 @@ public interface TypesPackage extends EPackage {
 	int PRIMITIVE_TYPE__NAME = TYPE__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -814,7 +814,7 @@ public interface TypesPackage extends EPackage {
 	int ENUMERATION_TYPE__NAME = PRIMITIVE_TYPE__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -915,7 +915,7 @@ public interface TypesPackage extends EPackage {
 	int COMPLEX_TYPE__NAME = TYPE__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1033,7 +1033,7 @@ public interface TypesPackage extends EPackage {
 	int ENUMERATOR__NAME = DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1126,7 +1126,7 @@ public interface TypesPackage extends EPackage {
 	int TYPE_PARAMETER__NAME = TYPE__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1327,7 +1327,7 @@ public interface TypesPackage extends EPackage {
 	int TYPE_ALIAS__NAME = TYPED_ELEMENT_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1391,132 +1391,187 @@ public interface TypesPackage extends EPackage {
 	int ANNOTATION = 20;
 
 	/**
-	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * The feature id for the '<em><b>Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION__NAME = PACKAGE_MEMBER__NAME;
+	int ANNOTATION__TYPE = 0;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The number of structural features of the '<em>Annotation</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION__ANNOTATIONS = PACKAGE_MEMBER__ANNOTATIONS;
+	int ANNOTATION_FEATURE_COUNT = 1;
 
 	/**
-	 * The feature id for the '<em><b>Id</b></em>' attribute.
+	 * The meta object id for the '{@link org.yakindu.base.types.impl.AnnotatableElementImpl <em>Annotatable Element</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.base.types.impl.AnnotatableElementImpl
+	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getAnnotatableElement()
+	 * @generated
+	 */
+	int ANNOTATABLE_ELEMENT = 21;
+
+	/**
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION__ID = PACKAGE_MEMBER__ID;
+	int ANNOTATABLE_ELEMENT__ANNOTATIONS = 0;
 
 	/**
-	 * The feature id for the '<em><b>Properties</b></em>' containment reference list.
+	 * The number of structural features of the '<em>Annotatable Element</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION__PROPERTIES = PACKAGE_MEMBER_FEATURE_COUNT + 0;
+	int ANNOTATABLE_ELEMENT_FEATURE_COUNT = 1;
 
 	/**
-	 * The feature id for the '<em><b>Targets</b></em>' reference list.
+	 * The meta object id for the '{@link org.yakindu.base.types.impl.ArrayTypeSpecifierImpl <em>Array Type Specifier</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.base.types.impl.ArrayTypeSpecifierImpl
+	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getArrayTypeSpecifier()
+	 * @generated
+	 */
+	int ARRAY_TYPE_SPECIFIER = 22;
+
+	/**
+	 * The feature id for the '<em><b>Type</b></em>' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION__TARGETS = PACKAGE_MEMBER_FEATURE_COUNT + 1;
+	int ARRAY_TYPE_SPECIFIER__TYPE = TYPE_SPECIFIER__TYPE;
 
 	/**
-	 * The number of structural features of the '<em>Annotation</em>' class.
+	 * The feature id for the '<em><b>Type Arguments</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATION_FEATURE_COUNT = PACKAGE_MEMBER_FEATURE_COUNT + 2;
+	int ARRAY_TYPE_SPECIFIER__TYPE_ARGUMENTS = TYPE_SPECIFIER__TYPE_ARGUMENTS;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.base.types.impl.AnnotatableElementImpl <em>Annotatable Element</em>}' class.
+	 * The feature id for the '<em><b>Size</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.base.types.impl.AnnotatableElementImpl
-	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getAnnotatableElement()
 	 * @generated
+	 * @ordered
 	 */
-	int ANNOTATABLE_ELEMENT = 21;
+	int ARRAY_TYPE_SPECIFIER__SIZE = TYPE_SPECIFIER_FEATURE_COUNT + 0;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The number of structural features of the '<em>Array Type Specifier</em>' class.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATABLE_ELEMENT__ANNOTATIONS = 0;
+	int ARRAY_TYPE_SPECIFIER_FEATURE_COUNT = TYPE_SPECIFIER_FEATURE_COUNT + 1;
 
 	/**
-	 * The number of structural features of the '<em>Annotatable Element</em>' class.
+	 * The meta object id for the '{@link org.yakindu.base.types.impl.AnnotationTypeImpl <em>Annotation Type</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.base.types.impl.AnnotationTypeImpl
+	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getAnnotationType()
+	 * @generated
+	 */
+	int ANNOTATION_TYPE = 23;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ANNOTATABLE_ELEMENT_FEATURE_COUNT = 1;
+	int ANNOTATION_TYPE__NAME = TYPE__NAME;
 
 	/**
-	 * The meta object id for the '{@link org.yakindu.base.types.impl.ArrayTypeSpecifierImpl <em>Array Type Specifier</em>}' class.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see org.yakindu.base.types.impl.ArrayTypeSpecifierImpl
-	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getArrayTypeSpecifier()
 	 * @generated
+	 * @ordered
 	 */
-	int ARRAY_TYPE_SPECIFIER = 22;
+	int ANNOTATION_TYPE__ANNOTATIONS = TYPE__ANNOTATIONS;
 
 	/**
-	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * The feature id for the '<em><b>Id</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ARRAY_TYPE_SPECIFIER__TYPE = TYPE_SPECIFIER__TYPE;
+	int ANNOTATION_TYPE__ID = TYPE__ID;
 
 	/**
-	 * The feature id for the '<em><b>Type Arguments</b></em>' containment reference list.
+	 * The feature id for the '<em><b>Constraint</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ARRAY_TYPE_SPECIFIER__TYPE_ARGUMENTS = TYPE_SPECIFIER__TYPE_ARGUMENTS;
+	int ANNOTATION_TYPE__CONSTRAINT = TYPE__CONSTRAINT;
 
 	/**
-	 * The feature id for the '<em><b>Size</b></em>' attribute.
+	 * The feature id for the '<em><b>Abstract</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ARRAY_TYPE_SPECIFIER__SIZE = TYPE_SPECIFIER_FEATURE_COUNT + 0;
+	int ANNOTATION_TYPE__ABSTRACT = TYPE__ABSTRACT;
 
 	/**
-	 * The number of structural features of the '<em>Array Type Specifier</em>' class.
+	 * The feature id for the '<em><b>Visible</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int ARRAY_TYPE_SPECIFIER_FEATURE_COUNT = TYPE_SPECIFIER_FEATURE_COUNT + 1;
+	int ANNOTATION_TYPE__VISIBLE = TYPE__VISIBLE;
+
+	/**
+	 * The feature id for the '<em><b>Properties</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_TYPE__PROPERTIES = TYPE_FEATURE_COUNT + 0;
+
+	/**
+	 * The feature id for the '<em><b>Targets</b></em>' reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_TYPE__TARGETS = TYPE_FEATURE_COUNT + 1;
+
+	/**
+	 * The number of structural features of the '<em>Annotation Type</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_TYPE_FEATURE_COUNT = TYPE_FEATURE_COUNT + 2;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.base.types.Direction <em>Direction</em>}' enum.
@@ -1526,7 +1581,7 @@ public interface TypesPackage extends EPackage {
 	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getDirection()
 	 * @generated
 	 */
-	int DIRECTION = 23;
+	int DIRECTION = 24;
 
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.Package <em>Package</em>}'.
@@ -2091,26 +2146,15 @@ public interface TypesPackage extends EPackage {
 	EClass getAnnotation();
 
 	/**
-	 * Returns the meta object for the containment reference list '{@link org.yakindu.base.types.Annotation#getProperties <em>Properties</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the containment reference list '<em>Properties</em>'.
-	 * @see org.yakindu.base.types.Annotation#getProperties()
-	 * @see #getAnnotation()
-	 * @generated
-	 */
-	EReference getAnnotation_Properties();
-
-	/**
-	 * Returns the meta object for the reference list '{@link org.yakindu.base.types.Annotation#getTargets <em>Targets</em>}'.
+	 * Returns the meta object for the reference '{@link org.yakindu.base.types.Annotation#getType <em>Type</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference list '<em>Targets</em>'.
-	 * @see org.yakindu.base.types.Annotation#getTargets()
+	 * @return the meta object for the reference '<em>Type</em>'.
+	 * @see org.yakindu.base.types.Annotation#getType()
 	 * @see #getAnnotation()
 	 * @generated
 	 */
-	EReference getAnnotation_Targets();
+	EReference getAnnotation_Type();
 
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.AnnotatableElement <em>Annotatable Element</em>}'.
@@ -2123,10 +2167,10 @@ public interface TypesPackage extends EPackage {
 	EClass getAnnotatableElement();
 
 	/**
-	 * Returns the meta object for the reference list '{@link org.yakindu.base.types.AnnotatableElement#getAnnotations <em>Annotations</em>}'.
+	 * Returns the meta object for the containment reference list '{@link org.yakindu.base.types.AnnotatableElement#getAnnotations <em>Annotations</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the reference list '<em>Annotations</em>'.
+	 * @return the meta object for the containment reference list '<em>Annotations</em>'.
 	 * @see org.yakindu.base.types.AnnotatableElement#getAnnotations()
 	 * @see #getAnnotatableElement()
 	 * @generated
@@ -2154,6 +2198,38 @@ public interface TypesPackage extends EPackage {
 	 */
 	EAttribute getArrayTypeSpecifier_Size();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.base.types.AnnotationType <em>Annotation Type</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Annotation Type</em>'.
+	 * @see org.yakindu.base.types.AnnotationType
+	 * @generated
+	 */
+	EClass getAnnotationType();
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.yakindu.base.types.AnnotationType#getProperties <em>Properties</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Properties</em>'.
+	 * @see org.yakindu.base.types.AnnotationType#getProperties()
+	 * @see #getAnnotationType()
+	 * @generated
+	 */
+	EReference getAnnotationType_Properties();
+
+	/**
+	 * Returns the meta object for the reference list '{@link org.yakindu.base.types.AnnotationType#getTargets <em>Targets</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the reference list '<em>Targets</em>'.
+	 * @see org.yakindu.base.types.AnnotationType#getTargets()
+	 * @see #getAnnotationType()
+	 * @generated
+	 */
+	EReference getAnnotationType_Targets();
+
 	/**
 	 * Returns the meta object for enum '{@link org.yakindu.base.types.Direction <em>Direction</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2653,20 +2729,12 @@ public interface TypesPackage extends EPackage {
 		EClass ANNOTATION = eINSTANCE.getAnnotation();
 
 		/**
-		 * The meta object literal for the '<em><b>Properties</b></em>' containment reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference ANNOTATION__PROPERTIES = eINSTANCE.getAnnotation_Properties();
-
-		/**
-		 * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.
+		 * The meta object literal for the '<em><b>Type</b></em>' reference feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EReference ANNOTATION__TARGETS = eINSTANCE.getAnnotation_Targets();
+		EReference ANNOTATION__TYPE = eINSTANCE.getAnnotation_Type();
 
 		/**
 		 * The meta object literal for the '{@link org.yakindu.base.types.impl.AnnotatableElementImpl <em>Annotatable Element</em>}' class.
@@ -2679,7 +2747,7 @@ public interface TypesPackage extends EPackage {
 		EClass ANNOTATABLE_ELEMENT = eINSTANCE.getAnnotatableElement();
 
 		/**
-		 * The meta object literal for the '<em><b>Annotations</b></em>' reference list feature.
+		 * The meta object literal for the '<em><b>Annotations</b></em>' containment reference list feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
@@ -2704,6 +2772,32 @@ public interface TypesPackage extends EPackage {
 		 */
 		EAttribute ARRAY_TYPE_SPECIFIER__SIZE = eINSTANCE.getArrayTypeSpecifier_Size();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.base.types.impl.AnnotationTypeImpl <em>Annotation Type</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.base.types.impl.AnnotationTypeImpl
+		 * @see org.yakindu.base.types.impl.TypesPackageImpl#getAnnotationType()
+		 * @generated
+		 */
+		EClass ANNOTATION_TYPE = eINSTANCE.getAnnotationType();
+
+		/**
+		 * The meta object literal for the '<em><b>Properties</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference ANNOTATION_TYPE__PROPERTIES = eINSTANCE.getAnnotationType_Properties();
+
+		/**
+		 * The meta object literal for the '<em><b>Targets</b></em>' reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference ANNOTATION_TYPE__TARGETS = eINSTANCE.getAnnotationType_Targets();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.base.types.Direction <em>Direction</em>}' enum.
 		 * <!-- begin-user-doc -->

+ 20 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotatableElementImpl.java

@@ -4,10 +4,13 @@ package org.yakindu.base.types.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.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
 import org.yakindu.base.types.TypesPackage;
@@ -27,7 +30,7 @@ import org.yakindu.base.types.TypesPackage;
  */
 public class AnnotatableElementImpl extends EObjectImpl implements AnnotatableElement {
 	/**
-	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getAnnotations()
@@ -62,11 +65,25 @@ public class AnnotatableElementImpl extends EObjectImpl implements AnnotatableEl
 	 */
 	public EList<Annotation> getAnnotations() {
 		if (annotations == null) {
-			annotations = new EObjectResolvingEList<Annotation>(Annotation.class, this, TypesPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS);
+			annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, TypesPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS);
 		}
 		return annotations;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case TypesPackage.ANNOTATABLE_ELEMENT__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 34 - 62
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotationImpl.java

@@ -2,18 +2,13 @@
  */
 package org.yakindu.base.types.impl;
 
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
 import org.yakindu.base.types.Annotation;
-import org.yakindu.base.types.Property;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.TypesPackage;
 
 /**
@@ -24,32 +19,21 @@ import org.yakindu.base.types.TypesPackage;
  * The following features are implemented:
  * </p>
  * <ul>
- *   <li>{@link org.yakindu.base.types.impl.AnnotationImpl#getProperties <em>Properties</em>}</li>
- *   <li>{@link org.yakindu.base.types.impl.AnnotationImpl#getTargets <em>Targets</em>}</li>
+ *   <li>{@link org.yakindu.base.types.impl.AnnotationImpl#getType <em>Type</em>}</li>
  * </ul>
  *
  * @generated
  */
-public class AnnotationImpl extends PackageMemberImpl implements Annotation {
-	/**
-	 * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getProperties()
-	 * @generated
-	 * @ordered
-	 */
-	protected EList<Property> properties;
-
+public class AnnotationImpl extends EObjectImpl implements Annotation {
 	/**
-	 * The cached value of the '{@link #getTargets() <em>Targets</em>}' reference list.
+	 * The cached value of the '{@link #getType() <em>Type</em>}' reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @see #getTargets()
+	 * @see #getType()
 	 * @generated
 	 * @ordered
 	 */
-	protected EList<EObject> targets;
+	protected AnnotationType type;
 
 	/**
 	 * <!-- begin-user-doc -->
@@ -75,11 +59,16 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList<Property> getProperties() {
-		if (properties == null) {
-			properties = new EObjectContainmentEList<Property>(Property.class, this, TypesPackage.ANNOTATION__PROPERTIES);
+	public AnnotationType getType() {
+		if (type != null && type.eIsProxy()) {
+			InternalEObject oldType = (InternalEObject)type;
+			type = (AnnotationType)eResolveProxy(oldType);
+			if (type != oldType) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, TypesPackage.ANNOTATION__TYPE, oldType, type));
+			}
 		}
-		return properties;
+		return type;
 	}
 
 	/**
@@ -87,11 +76,8 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EList<EObject> getTargets() {
-		if (targets == null) {
-			targets = new EObjectResolvingEList<EObject>(EObject.class, this, TypesPackage.ANNOTATION__TARGETS);
-		}
-		return targets;
+	public AnnotationType basicGetType() {
+		return type;
 	}
 
 	/**
@@ -99,13 +85,11 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
-		switch (featureID) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
-		}
-		return super.eInverseRemove(otherEnd, featureID, msgs);
+	public void setType(AnnotationType newType) {
+		AnnotationType oldType = type;
+		type = newType;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.ANNOTATION__TYPE, oldType, type));
 	}
 
 	/**
@@ -116,10 +100,9 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				return getProperties();
-			case TypesPackage.ANNOTATION__TARGETS:
-				return getTargets();
+			case TypesPackage.ANNOTATION__TYPE:
+				if (resolve) return getType();
+				return basicGetType();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -129,17 +112,11 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				getProperties().clear();
-				getProperties().addAll((Collection<? extends Property>)newValue);
-				return;
-			case TypesPackage.ANNOTATION__TARGETS:
-				getTargets().clear();
-				getTargets().addAll((Collection<? extends EObject>)newValue);
+			case TypesPackage.ANNOTATION__TYPE:
+				setType((AnnotationType)newValue);
 				return;
 		}
 		super.eSet(featureID, newValue);
@@ -153,11 +130,8 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				getProperties().clear();
-				return;
-			case TypesPackage.ANNOTATION__TARGETS:
-				getTargets().clear();
+			case TypesPackage.ANNOTATION__TYPE:
+				setType((AnnotationType)null);
 				return;
 		}
 		super.eUnset(featureID);
@@ -171,10 +145,8 @@ public class AnnotationImpl extends PackageMemberImpl implements Annotation {
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-			case TypesPackage.ANNOTATION__PROPERTIES:
-				return properties != null && !properties.isEmpty();
-			case TypesPackage.ANNOTATION__TARGETS:
-				return targets != null && !targets.isEmpty();
+			case TypesPackage.ANNOTATION__TYPE:
+				return type != null;
 		}
 		return super.eIsSet(featureID);
 	}

+ 186 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/AnnotationTypeImpl.java

@@ -0,0 +1,186 @@
+/**
+ */
+package org.yakindu.base.types.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.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.yakindu.base.types.AnnotationType;
+import org.yakindu.base.types.Property;
+import org.yakindu.base.types.TypesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Annotation Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.base.types.impl.AnnotationTypeImpl#getProperties <em>Properties</em>}</li>
+ *   <li>{@link org.yakindu.base.types.impl.AnnotationTypeImpl#getTargets <em>Targets</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class AnnotationTypeImpl extends TypeImpl implements AnnotationType {
+	/**
+	 * The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getProperties()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<Property> properties;
+
+	/**
+	 * The cached value of the '{@link #getTargets() <em>Targets</em>}' reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getTargets()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<EObject> targets;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotationTypeImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return TypesPackage.Literals.ANNOTATION_TYPE;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<Property> getProperties() {
+		if (properties == null) {
+			properties = new EObjectContainmentEList<Property>(Property.class, this, TypesPackage.ANNOTATION_TYPE__PROPERTIES);
+		}
+		return properties;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<EObject> getTargets() {
+		if (targets == null) {
+			targets = new EObjectResolvingEList<EObject>(EObject.class, this, TypesPackage.ANNOTATION_TYPE__TARGETS);
+		}
+		return targets;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				return ((InternalEList<?>)getProperties()).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 TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				return getProperties();
+			case TypesPackage.ANNOTATION_TYPE__TARGETS:
+				return getTargets();
+		}
+		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 TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				getProperties().clear();
+				getProperties().addAll((Collection<? extends Property>)newValue);
+				return;
+			case TypesPackage.ANNOTATION_TYPE__TARGETS:
+				getTargets().clear();
+				getTargets().addAll((Collection<? extends EObject>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				getProperties().clear();
+				return;
+			case TypesPackage.ANNOTATION_TYPE__TARGETS:
+				getTargets().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case TypesPackage.ANNOTATION_TYPE__PROPERTIES:
+				return properties != null && !properties.isEmpty();
+			case TypesPackage.ANNOTATION_TYPE__TARGETS:
+				return targets != null && !targets.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //AnnotationTypeImpl

+ 0 - 6
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ComplexTypeImpl.java

@@ -7,24 +7,18 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
 import org.eclipse.emf.common.util.BasicEList;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.InternalEList;
-import org.yakindu.base.types.AnnotatableElement;
-import org.yakindu.base.types.Annotation;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Declaration;
 import org.yakindu.base.types.GenericElement;
-import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Type;
-import org.yakindu.base.types.TypeConstraint;
 import org.yakindu.base.types.TypeParameter;
 import org.yakindu.base.types.TypesPackage;
 

+ 6 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/DeclarationImpl.java

@@ -11,7 +11,8 @@ import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.AnnotatableElement;
@@ -72,7 +73,7 @@ public abstract class DeclarationImpl extends EObjectImpl implements Declaration
 	protected String name = NAME_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getAnnotations()
@@ -203,7 +204,7 @@ public abstract class DeclarationImpl extends EObjectImpl implements Declaration
 	 */
 	public EList<Annotation> getAnnotations() {
 		if (annotations == null) {
-			annotations = new EObjectResolvingEList<Annotation>(Annotation.class, this, TypesPackage.DECLARATION__ANNOTATIONS);
+			annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, TypesPackage.DECLARATION__ANNOTATIONS);
 		}
 		return annotations;
 	}
@@ -389,6 +390,8 @@ public abstract class DeclarationImpl extends EObjectImpl implements Declaration
 		switch (featureID) {
 			case TypesPackage.DECLARATION__TYPE_SPECIFIER:
 				return basicSetTypeSpecifier(null, msgs);
+			case TypesPackage.DECLARATION__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}

+ 20 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/PackageMemberImpl.java

@@ -4,9 +4,12 @@ package org.yakindu.base.types.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.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.impl.NamedElementImpl;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
@@ -30,7 +33,7 @@ import org.yakindu.base.types.TypesUtil;
  */
 public class PackageMemberImpl extends NamedElementImpl implements PackageMember {
 	/**
-	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getAnnotations()
@@ -75,7 +78,7 @@ public class PackageMemberImpl extends NamedElementImpl implements PackageMember
 	 */
 	public EList<Annotation> getAnnotations() {
 		if (annotations == null) {
-			annotations = new EObjectResolvingEList<Annotation>(Annotation.class, this, TypesPackage.PACKAGE_MEMBER__ANNOTATIONS);
+			annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, TypesPackage.PACKAGE_MEMBER__ANNOTATIONS);
 		}
 		return annotations;
 	}
@@ -90,6 +93,20 @@ public class PackageMemberImpl extends NamedElementImpl implements PackageMember
 		return TypesUtil.computeQID(this);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case TypesPackage.PACKAGE_MEMBER__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
+		}
+		return super.eInverseRemove(otherEnd, featureID, msgs);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 6 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/ParameterImpl.java

@@ -15,8 +15,9 @@ import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.AnnotatableElement;
@@ -78,7 +79,7 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 	protected String name = NAME_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getAnnotations()
@@ -239,7 +240,7 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 	 */
 	public EList<Annotation> getAnnotations() {
 		if (annotations == null) {
-			annotations = new EObjectResolvingEList<Annotation>(Annotation.class, this, TypesPackage.PARAMETER__ANNOTATIONS);
+			annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, TypesPackage.PARAMETER__ANNOTATIONS);
 		}
 		return annotations;
 	}
@@ -353,6 +354,8 @@ public class ParameterImpl extends EObjectImpl implements Parameter {
 		switch (featureID) {
 			case TypesPackage.PARAMETER__TYPE_SPECIFIER:
 				return basicSetTypeSpecifier(null, msgs);
+			case TypesPackage.PARAMETER__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
 			case TypesPackage.PARAMETER__OWNING_OPERATION:
 				return basicSetOwningOperation(null, msgs);
 		}

+ 4 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypeAliasImpl.java

@@ -12,7 +12,6 @@ import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EObjectResolvingEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.base.NamedElement;
@@ -75,7 +74,7 @@ public class TypeAliasImpl extends EObjectImpl implements TypeAlias {
 	protected String name = NAME_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' reference list.
+	 * The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @see #getAnnotations()
@@ -247,7 +246,7 @@ public class TypeAliasImpl extends EObjectImpl implements TypeAlias {
 	 */
 	public EList<Annotation> getAnnotations() {
 		if (annotations == null) {
-			annotations = new EObjectResolvingEList<Annotation>(Annotation.class, this, TypesPackage.TYPE_ALIAS__ANNOTATIONS);
+			annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, TypesPackage.TYPE_ALIAS__ANNOTATIONS);
 		}
 		return annotations;
 	}
@@ -324,6 +323,8 @@ public class TypeAliasImpl extends EObjectImpl implements TypeAlias {
 		switch (featureID) {
 			case TypesPackage.TYPE_ALIAS__TYPE_SPECIFIER:
 				return basicSetTypeSpecifier(null, msgs);
+			case TypesPackage.TYPE_ALIAS__ANNOTATIONS:
+				return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
 			case TypesPackage.TYPE_ALIAS__CONSTRAINT:
 				return ((InternalEList<?>)getConstraint()).basicRemove(otherEnd, msgs);
 		}

+ 12 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesFactoryImpl.java

@@ -14,6 +14,7 @@ import org.eclipse.emf.ecore.impl.EFactoryImpl;
 import org.eclipse.emf.ecore.plugin.EcorePlugin;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.ArrayTypeSpecifier;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Direction;
@@ -101,6 +102,7 @@ public class TypesFactoryImpl extends EFactoryImpl implements TypesFactory {
 			case TypesPackage.ANNOTATION: return createAnnotation();
 			case TypesPackage.ANNOTATABLE_ELEMENT: return createAnnotatableElement();
 			case TypesPackage.ARRAY_TYPE_SPECIFIER: return createArrayTypeSpecifier();
+			case TypesPackage.ANNOTATION_TYPE: return createAnnotationType();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -346,6 +348,16 @@ public class TypesFactoryImpl extends EFactoryImpl implements TypesFactory {
 		return arrayTypeSpecifier;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotationType createAnnotationType() {
+		AnnotationTypeImpl annotationType = new AnnotationTypeImpl();
+		return annotationType;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 48 - 16
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesPackageImpl.java

@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.impl.EPackageImpl;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.ArrayTypeSpecifier;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Declaration;
@@ -196,6 +197,13 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 	 */
 	private EClass arrayTypeSpecifierEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass annotationTypeEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -730,19 +738,10 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EReference getAnnotation_Properties() {
+	public EReference getAnnotation_Type() {
 		return (EReference)annotationEClass.getEStructuralFeatures().get(0);
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getAnnotation_Targets() {
-		return (EReference)annotationEClass.getEStructuralFeatures().get(1);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -779,6 +778,33 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		return (EAttribute)arrayTypeSpecifierEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getAnnotationType() {
+		return annotationTypeEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getAnnotationType_Properties() {
+		return (EReference)annotationTypeEClass.getEStructuralFeatures().get(0);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getAnnotationType_Targets() {
+		return (EReference)annotationTypeEClass.getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -887,8 +913,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		typeAliasEClass = createEClass(TYPE_ALIAS);
 
 		annotationEClass = createEClass(ANNOTATION);
-		createEReference(annotationEClass, ANNOTATION__PROPERTIES);
-		createEReference(annotationEClass, ANNOTATION__TARGETS);
+		createEReference(annotationEClass, ANNOTATION__TYPE);
 
 		annotatableElementEClass = createEClass(ANNOTATABLE_ELEMENT);
 		createEReference(annotatableElementEClass, ANNOTATABLE_ELEMENT__ANNOTATIONS);
@@ -896,6 +921,10 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		arrayTypeSpecifierEClass = createEClass(ARRAY_TYPE_SPECIFIER);
 		createEAttribute(arrayTypeSpecifierEClass, ARRAY_TYPE_SPECIFIER__SIZE);
 
+		annotationTypeEClass = createEClass(ANNOTATION_TYPE);
+		createEReference(annotationTypeEClass, ANNOTATION_TYPE__PROPERTIES);
+		createEReference(annotationTypeEClass, ANNOTATION_TYPE__TARGETS);
+
 		// Create enums
 		directionEEnum = createEEnum(DIRECTION);
 	}
@@ -954,8 +983,8 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		rangeConstraintEClass.getESuperTypes().add(this.getTypeConstraint());
 		typeAliasEClass.getESuperTypes().add(this.getTypedElement());
 		typeAliasEClass.getESuperTypes().add(this.getType());
-		annotationEClass.getESuperTypes().add(this.getPackageMember());
 		arrayTypeSpecifierEClass.getESuperTypes().add(this.getTypeSpecifier());
+		annotationTypeEClass.getESuperTypes().add(this.getType());
 
 		// Initialize classes and features; add operations and parameters
 		initEClass(packageEClass, org.yakindu.base.types.Package.class, "Package", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1037,17 +1066,20 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		initEClass(typeAliasEClass, TypeAlias.class, "TypeAlias", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
 		initEClass(annotationEClass, Annotation.class, "Annotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-		initEReference(getAnnotation_Properties(), this.getProperty(), null, "properties", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEReference(getAnnotation_Targets(), ecorePackage.getEObject(), null, "targets", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAnnotation_Type(), this.getAnnotationType(), null, "type", null, 0, 1, Annotation.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(), this.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);
+		initEReference(getAnnotatableElement_Annotations(), this.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);
 
 		initEClass(arrayTypeSpecifierEClass, ArrayTypeSpecifier.class, "ArrayTypeSpecifier", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getArrayTypeSpecifier_Size(), ecorePackage.getEInt(), "size", null, 0, 1, ArrayTypeSpecifier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		addEOperation(arrayTypeSpecifierEClass, this.getType(), "getElementType", 0, 1, IS_UNIQUE, IS_ORDERED);
 
+		initEClass(annotationTypeEClass, AnnotationType.class, "AnnotationType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getAnnotationType_Properties(), this.getProperty(), null, "properties", null, 0, -1, AnnotationType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getAnnotationType_Targets(), ecorePackage.getEObject(), null, "targets", null, 0, -1, AnnotationType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		// Initialize enums and add enum literals
 		initEEnum(directionEEnum, Direction.class, "Direction");
 		addEEnumLiteral(directionEEnum, Direction.LOCAL);

+ 19 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/util/TypesAdapterFactory.java

@@ -13,6 +13,7 @@ import org.eclipse.emf.ecore.EObject;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.ArrayTypeSpecifier;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Declaration;
@@ -181,6 +182,10 @@ public class TypesAdapterFactory extends AdapterFactoryImpl {
 				return createArrayTypeSpecifierAdapter();
 			}
 			@Override
+			public Adapter caseAnnotationType(AnnotationType object) {
+				return createAnnotationTypeAdapter();
+			}
+			@Override
 			public Adapter caseNamedElement(NamedElement object) {
 				return createNamedElementAdapter();
 			}
@@ -543,6 +548,20 @@ public class TypesAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.AnnotationType <em>Annotation 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.AnnotationType
+	 * @generated
+	 */
+	public Adapter createAnnotationTypeAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for the default case.
 	 * <!-- begin-user-doc --> This

+ 26 - 3
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/util/TypesSwitch.java

@@ -12,6 +12,7 @@ import org.eclipse.emf.ecore.util.Switch;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.ArrayTypeSpecifier;
 import org.yakindu.base.types.ComplexType;
 import org.yakindu.base.types.Declaration;
@@ -269,9 +270,6 @@ public class TypesSwitch<T> extends Switch<T> {
 			case TypesPackage.ANNOTATION: {
 				Annotation annotation = (Annotation)theEObject;
 				T result = caseAnnotation(annotation);
-				if (result == null) result = casePackageMember(annotation);
-				if (result == null) result = caseNamedElement(annotation);
-				if (result == null) result = caseAnnotatableElement(annotation);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -288,6 +286,16 @@ public class TypesSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case TypesPackage.ANNOTATION_TYPE: {
+				AnnotationType annotationType = (AnnotationType)theEObject;
+				T result = caseAnnotationType(annotationType);
+				if (result == null) result = caseType(annotationType);
+				if (result == null) result = casePackageMember(annotationType);
+				if (result == null) result = caseNamedElement(annotationType);
+				if (result == null) result = caseAnnotatableElement(annotationType);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -643,6 +651,21 @@ public class TypesSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Annotation 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>Annotation Type</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseAnnotationType(AnnotationType object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
 	 * <!-- begin-user-doc --> This implementation returns

+ 6 - 5
plugins/org.yakindu.base.types/src/org/yakindu/base/types/annotations/TypeAnnotations.java

@@ -13,6 +13,7 @@ package org.yakindu.base.types.annotations;
 
 import org.yakindu.base.types.AnnotatableElement;
 import org.yakindu.base.types.Annotation;
+import org.yakindu.base.types.AnnotationType;
 import org.yakindu.base.types.TypesFactory;
 
 import com.google.common.base.Predicate;
@@ -28,8 +29,8 @@ public class TypeAnnotations {
 	private static final String INDEX_OPERATION = "IndexOperation";
 	private static final String BUILT_IN_TYPE = "Built-In-Type";
 
-	public Annotation createBuiltInTypeAnnotation() {
-		Annotation builtInAnnotation = TypesFactory.eINSTANCE.createAnnotation();
+	public AnnotationType createBuiltInTypeAnnotationType() {
+		AnnotationType builtInAnnotation = TypesFactory.eINSTANCE.createAnnotationType();
 		builtInAnnotation.setName(BUILT_IN_TYPE);
 		return builtInAnnotation;
 	}
@@ -38,8 +39,8 @@ public class TypeAnnotations {
 		return hasAnnotation(element, BUILT_IN_TYPE);
 	}
 
-	public Annotation createIndexOperationAnnotation() {
-		Annotation indexAnnotation = TypesFactory.eINSTANCE.createAnnotation();
+	public AnnotationType createIndexOperationAnnotationType() {
+		AnnotationType indexAnnotation = TypesFactory.eINSTANCE.createAnnotationType();
 		indexAnnotation.setName(INDEX_OPERATION);
 		return indexAnnotation;
 	}
@@ -52,7 +53,7 @@ public class TypeAnnotations {
 		return Iterables.any(element.getAnnotations(), new Predicate<Annotation>() {
 			@Override
 			public boolean apply(Annotation input) {
-				return input.getName().equals(name);
+				return input.getType().getName().equals(name);
 			}
 		});
 	}

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

@@ -27,7 +27,11 @@
   <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"/>
+  <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="Entry" eSuperTypes="#//Pseudostate">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
   </eClassifiers>

+ 30 - 2
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java

@@ -605,6 +605,15 @@ 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.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATECHART__ANNOTATION = SPECIFICATION_ELEMENT_FEATURE_COUNT + 7;
+
 	/**
 	 * The number of structural features of the '<em>Statechart</em>' class.
 	 * <!-- begin-user-doc -->
@@ -612,7 +621,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 7;
+	int STATECHART_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 8;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.EntryImpl <em>Entry</em>}' class.
@@ -1212,7 +1221,7 @@ public interface SGraphPackage extends EPackage {
 	int IMPORT_DECLARATION__NAME = TypesPackage.DECLARATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1533,6 +1542,17 @@ 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 -->
@@ -2039,6 +2059,14 @@ 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 -->

+ 23 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Statechart.java

@@ -14,6 +14,7 @@ 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;
 
 
 /**
@@ -21,6 +22,12 @@ import org.yakindu.base.base.NamedElement;
  * 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
@@ -34,4 +41,20 @@ 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

+ 11 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java

@@ -516,6 +516,15 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		return statechartEClass;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getStatechart_Annotation() {
+		return (EReference)statechartEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -790,6 +799,7 @@ 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);
@@ -925,6 +935,7 @@ 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);

+ 37 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java

@@ -26,6 +26,7 @@ import org.yakindu.base.base.BasePackage;
 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.CompositeElement;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.ReactiveElement;
@@ -49,6 +50,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>
  * </ul>
  *
  * @generated
@@ -155,6 +157,16 @@ 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.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAnnotation()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<Annotation> annotation;
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -299,6 +311,18 @@ public class StatechartImpl extends SpecificationElementImpl implements
 			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATECHART__DOMAIN_ID, oldDomainID, domainID));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<Annotation> getAnnotation() {
+		if (annotation == null) {
+			annotation = new EObjectContainmentEList.Resolving<Annotation>(Annotation.class, this, SGraphPackage.STATECHART__ANNOTATION);
+		}
+		return annotation;
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -326,6 +350,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);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
@@ -351,6 +377,8 @@ public class StatechartImpl extends SpecificationElementImpl implements
 				return getDocumentation();
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				return getDomainID();
+			case SGraphPackage.STATECHART__ANNOTATION:
+				return getAnnotation();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -383,6 +411,10 @@ 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);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -412,6 +444,9 @@ public class StatechartImpl extends SpecificationElementImpl implements
 			case SGraphPackage.STATECHART__DOMAIN_ID:
 				setDomainID(DOMAIN_ID_EDEFAULT);
 				return;
+			case SGraphPackage.STATECHART__ANNOTATION:
+				getAnnotation().clear();
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -437,6 +472,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();
 		}
 		return super.eIsSet(featureID);
 	}

BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventRaisingExpression_event_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventRaisingExpression_value_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateEventValueReferenceExpression_value_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateGuard_expression_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateReactionEffect_actions_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateRegularEventSpec_event_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateStatechartSpecification_annotation_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateTimeEventSpec_value_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/ctool16/CreateVariableDefinition_initialValue_AnnotationDefinition.gif


BIN
plugins/org.yakindu.sct.model.stext.edit/icons/full/obj16/AnnotationDefinition.gif


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

@@ -242,3 +242,5 @@ _UI_ImportScope_imports_feature = Imports
 _UI_Import_scheme_feature = Scheme
 _UI_VariableDefinition_const_feature = Const
 _UI_TypeAliasDefinition_type = Type Alias Definition
+_UI_AnnotationDefinition_type = Annotation Definition
+_UI_StatechartSpecification_annotation_feature = Annotation

+ 265 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/AnnotationDefinitionItemProvider.java

@@ -0,0 +1,265 @@
+/**
+ */
+package org.yakindu.sct.model.stext.stext.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.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+
+import org.yakindu.base.expressions.expressions.ExpressionsFactory;
+import org.yakindu.base.expressions.expressions.ExpressionsPackage;
+
+import org.yakindu.base.types.provider.AnnotationItemProvider;
+
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
+import org.yakindu.sct.model.stext.stext.StextFactory;
+import org.yakindu.sct.model.stext.stext.StextPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.yakindu.sct.model.stext.stext.AnnotationDefinition} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AnnotationDefinitionItemProvider extends AnnotationItemProvider {
+	/**
+	 * This constructs an instance from a factory and a notifier.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotationDefinitionItemProvider(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(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS);
+		}
+		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 AnnotationDefinition.gif.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object getImage(Object object) {
+		return overlayImage(object, getResourceLocator().getImage("full/obj16/AnnotationDefinition"));
+	}
+
+	/**
+	 * 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_AnnotationDefinition_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(AnnotationDefinition.class)) {
+			case StextPackage.ANNOTATION_DEFINITION__ARGS:
+				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
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 StextFactory.eINSTANCE.createEventRaisingExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 StextFactory.eINSTANCE.createEventValueReferenceExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createAssignmentExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createConditionalExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createLogicalOrExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createLogicalAndExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createLogicalNotExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createBitwiseXorExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createBitwiseOrExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createBitwiseAndExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createLogicalRelationExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createShiftExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createNumericalAddSubtractExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createNumericalMultiplyDivideExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createNumericalUnaryExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createPrimitiveValueExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createFeatureCall()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createElementReferenceExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createParenthesizedExpression()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(ExpressionsPackage.Literals.ARGUMENT_EXPRESSION__ARGS,
+				 ExpressionsFactory.eINSTANCE.createTypeCastExpression()));
+	}
+
+	/**
+	 * Return the resource locator for this item provider's resources.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public ResourceLocator getResourceLocator() {
+		return STextEditPlugin.INSTANCE;
+	}
+
+}

+ 10 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/EventRaisingExpressionItemProvider.java

@@ -167,6 +167,11 @@ public class EventRaisingExpressionItemProvider extends ExpressionItemProvider
 				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__EVENT,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__EVENT,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__EVENT,
@@ -272,6 +277,11 @@ public class EventRaisingExpressionItemProvider extends ExpressionItemProvider
 				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__VALUE,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__VALUE,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.EVENT_RAISING_EXPRESSION__VALUE,

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/EventValueReferenceExpressionItemProvider.java

@@ -165,6 +165,11 @@ public class EventValueReferenceExpressionItemProvider extends ExpressionItemPro
 				(StextPackage.Literals.EVENT_VALUE_REFERENCE_EXPRESSION__VALUE,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.EVENT_VALUE_REFERENCE_EXPRESSION__VALUE,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.EVENT_VALUE_REFERENCE_EXPRESSION__VALUE,

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/GuardItemProvider.java

@@ -177,6 +177,11 @@ public class GuardItemProvider
 				(StextPackage.Literals.GUARD__EXPRESSION,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.GUARD__EXPRESSION,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.GUARD__EXPRESSION,

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/ReactionEffectItemProvider.java

@@ -165,6 +165,11 @@ public class ReactionEffectItemProvider extends EffectItemProvider
 				(StextPackage.Literals.REACTION_EFFECT__ACTIONS,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.REACTION_EFFECT__ACTIONS,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.REACTION_EFFECT__ACTIONS,

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/RegularEventSpecItemProvider.java

@@ -163,6 +163,11 @@ public class RegularEventSpecItemProvider extends EventSpecItemProvider
 				(StextPackage.Literals.REGULAR_EVENT_SPEC__EVENT,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.REGULAR_EVENT_SPEC__EVENT,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.REGULAR_EVENT_SPEC__EVENT,

+ 44 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/StatechartSpecificationItemProvider.java

@@ -17,11 +17,14 @@ 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.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.sgraph.provider.ScopedElementItemProvider;
 import org.yakindu.sct.model.stext.stext.StatechartSpecification;
 import org.yakindu.sct.model.stext.stext.StextFactory;
+import org.yakindu.sct.model.stext.stext.StextPackage;
 
 /**
  * This is the item provider adapter for a {@link org.yakindu.sct.model.stext.stext.StatechartSpecification} object.
@@ -59,6 +62,36 @@ public class StatechartSpecificationItemProvider extends ScopedElementItemProvid
 	}
 
   /**
+	 * 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(StextPackage.Literals.STATECHART_SPECIFICATION__ANNOTATION);
+		}
+		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 StatechartSpecification.gif.
 	 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -97,6 +130,12 @@ public class StatechartSpecificationItemProvider extends ScopedElementItemProvid
   public void notifyChanged(Notification notification)
   {
 		updateChildren(notification);
+
+		switch (notification.getFeatureID(StatechartSpecification.class)) {
+			case StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+				return;
+		}
 		super.notifyChanged(notification);
 	}
 
@@ -136,6 +175,11 @@ public class StatechartSpecificationItemProvider extends ScopedElementItemProvid
 			(createChildParameter
 				(SGraphPackage.Literals.SCOPED_ELEMENT__SCOPES,
 				 StextFactory.eINSTANCE.createSimpleScope()));
+
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.STATECHART_SPECIFICATION__ANNOTATION,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
 	}
 
   /**

+ 24 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/StextItemProviderAdapterFactory.java

@@ -919,6 +919,29 @@ public class StextItemProviderAdapterFactory extends StextAdapterFactory impleme
 	}
 
   /**
+	 * This keeps track of the one adapter used for all {@link org.yakindu.sct.model.stext.stext.AnnotationDefinition} instances.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotationDefinitionItemProvider annotationDefinitionItemProvider;
+
+		/**
+	 * This creates an adapter for a {@link org.yakindu.sct.model.stext.stext.AnnotationDefinition}.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Adapter createAnnotationDefinitionAdapter() {
+		if (annotationDefinitionItemProvider == null) {
+			annotationDefinitionItemProvider = new AnnotationDefinitionItemProvider(this);
+		}
+
+		return annotationDefinitionItemProvider;
+	}
+
+		/**
 	 * This returns the root adapter factory that contains this factory.
 	 * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -1061,6 +1084,7 @@ public class StextItemProviderAdapterFactory extends StextAdapterFactory impleme
 		if (eventRaisingExpressionItemProvider != null) eventRaisingExpressionItemProvider.dispose();
 		if (eventValueReferenceExpressionItemProvider != null) eventValueReferenceExpressionItemProvider.dispose();
 		if (activeStateReferenceExpressionItemProvider != null) activeStateReferenceExpressionItemProvider.dispose();
+		if (annotationDefinitionItemProvider != null) annotationDefinitionItemProvider.dispose();
 	}
 
 }

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/TimeEventSpecItemProvider.java

@@ -222,6 +222,11 @@ public class TimeEventSpecItemProvider extends EventSpecItemProvider
 				(StextPackage.Literals.TIME_EVENT_SPEC__VALUE,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.TIME_EVENT_SPEC__VALUE,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.TIME_EVENT_SPEC__VALUE,

+ 1 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/TypeAliasDefinitionItemProvider.java

@@ -19,6 +19,7 @@ import org.eclipse.emf.common.util.ResourceLocator;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 import org.yakindu.base.types.TypeAlias;
 import org.yakindu.base.types.provider.TypeAliasItemProvider;
+import org.yakindu.sct.model.stext.stext.TypeAliasDefinition;
 
 /**
  * This is the item provider adapter for a

+ 5 - 0
plugins/org.yakindu.sct.model.stext.edit/src/org/yakindu/sct/model/stext/stext/provider/VariableDefinitionItemProvider.java

@@ -160,6 +160,11 @@ public class VariableDefinitionItemProvider extends PropertyItemProvider {
 				(StextPackage.Literals.VARIABLE_DEFINITION__INITIAL_VALUE,
 				 StextFactory.eINSTANCE.createActiveStateReferenceExpression()));
 
+		newChildDescriptors.add
+			(createChildParameter
+				(StextPackage.Literals.VARIABLE_DEFINITION__INITIAL_VALUE,
+				 StextFactory.eINSTANCE.createAnnotationDefinition()));
+
 		newChildDescriptors.add
 			(createChildParameter
 				(StextPackage.Literals.VARIABLE_DEFINITION__INITIAL_VALUE,

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

@@ -0,0 +1,20 @@
+/**
+ */
+package org.yakindu.sct.model.stext.stext;
+
+import org.yakindu.base.expressions.expressions.ArgumentExpression;
+
+import org.yakindu.base.types.Annotation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Annotation Definition</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.yakindu.sct.model.stext.stext.StextPackage#getAnnotationDefinition()
+ * @model
+ * @generated
+ */
+public interface AnnotationDefinition extends Annotation, ArgumentExpression {
+} // AnnotationDefinition

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

@@ -2,6 +2,7 @@
  */
 package org.yakindu.sct.model.stext.stext;
 
+import org.eclipse.emf.common.util.EList;
 import org.yakindu.sct.model.sgraph.ScopedElement;
 
 /**
@@ -9,10 +10,32 @@ import org.yakindu.sct.model.sgraph.ScopedElement;
  * A representation of the model object '<em><b>Statechart Specification</b></em>'.
  * <!-- end-user-doc -->
  *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.stext.stext.StatechartSpecification#getAnnotation <em>Annotation</em>}</li>
+ * </ul>
  *
  * @see org.yakindu.sct.model.stext.stext.StextPackage#getStatechartSpecification()
  * @model
  * @generated
  */
 public interface StatechartSpecification extends ScopedElement {
+
+	/**
+	 * Returns the value of the '<em><b>Annotation</b></em>' containment reference list.
+	 * The list contents are of type {@link org.yakindu.sct.model.stext.stext.AnnotationDefinition}.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Annotation</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>Annotation</em>' containment reference list.
+	 * @see org.yakindu.sct.model.stext.stext.StextPackage#getStatechartSpecification_Annotation()
+	 * @model containment="true"
+	 * @generated
+	 */
+	EList<AnnotationDefinition> getAnnotation();
 } // StatechartSpecification

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

@@ -336,6 +336,15 @@ public interface StextFactory extends EFactory {
 	 */
 	ActiveStateReferenceExpression createActiveStateReferenceExpression();
 
+	/**
+	 * Returns a new object of class '<em>Annotation Definition</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Annotation Definition</em>'.
+	 * @generated
+	 */
+	AnnotationDefinition createAnnotationDefinition();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 110 - 7
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/StextPackage.java

@@ -218,6 +218,15 @@ public interface StextPackage extends EPackage {
 	 */
 	int STATECHART_SPECIFICATION__NAMESPACE = SGraphPackage.SCOPED_ELEMENT__NAMESPACE;
 
+	/**
+	 * The feature id for the '<em><b>Annotation</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATECHART_SPECIFICATION__ANNOTATION = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 0;
+
 	/**
 	 * The number of structural features of the '<em>Statechart Specification</em>' class.
 	 * <!-- begin-user-doc -->
@@ -225,7 +234,7 @@ public interface StextPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART_SPECIFICATION_FEATURE_COUNT = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 0;
+	int STATECHART_SPECIFICATION_FEATURE_COUNT = SGraphPackage.SCOPED_ELEMENT_FEATURE_COUNT + 1;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.impl.StateSpecificationImpl <em>State Specification</em>}' class.
@@ -559,7 +568,7 @@ public interface StextPackage extends EPackage {
 	int EVENT_DEFINITION__NAME = TypesPackage.EVENT__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -632,7 +641,7 @@ public interface StextPackage extends EPackage {
 	int VARIABLE_DEFINITION__NAME = TypesPackage.PROPERTY__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -732,7 +741,7 @@ public interface StextPackage extends EPackage {
 	int OPERATION_DEFINITION__NAME = TypesPackage.OPERATION__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -749,6 +758,15 @@ public interface StextPackage extends EPackage {
 	 */
 	int OPERATION_DEFINITION__ID = TypesPackage.OPERATION__ID;
 
+	/**
+	 * The feature id for the '<em><b>Type Parameters</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int OPERATION_DEFINITION__TYPE_PARAMETERS = TypesPackage.OPERATION__TYPE_PARAMETERS;
+
 	/**
 	 * The feature id for the '<em><b>Parameters</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
@@ -758,6 +776,15 @@ public interface StextPackage extends EPackage {
 	 */
 	int OPERATION_DEFINITION__PARAMETERS = TypesPackage.OPERATION__PARAMETERS;
 
+	/**
+	 * The feature id for the '<em><b>Variadic</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int OPERATION_DEFINITION__VARIADIC = TypesPackage.OPERATION__VARIADIC;
+
 	/**
 	 * The number of structural features of the '<em>Operation Definition</em>' class.
 	 * <!-- begin-user-doc -->
@@ -805,7 +832,7 @@ public interface StextPackage extends EPackage {
 	int TYPE_ALIAS_DEFINITION__NAME = TypesPackage.TYPE_ALIAS__NAME;
 
 	/**
-	 * The feature id for the '<em><b>Annotations</b></em>' reference list.
+	 * The feature id for the '<em><b>Annotations</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
@@ -1435,6 +1462,43 @@ public interface StextPackage extends EPackage {
 	 */
 	int ACTIVE_STATE_REFERENCE_EXPRESSION_FEATURE_COUNT = ExpressionsPackage.EXPRESSION_FEATURE_COUNT + 1;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.impl.AnnotationDefinitionImpl <em>Annotation Definition</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.stext.stext.impl.AnnotationDefinitionImpl
+	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getAnnotationDefinition()
+	 * @generated
+	 */
+	int ANNOTATION_DEFINITION = 35;
+
+	/**
+	 * The feature id for the '<em><b>Type</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_DEFINITION__TYPE = TypesPackage.ANNOTATION__TYPE;
+
+	/**
+	 * The feature id for the '<em><b>Args</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_DEFINITION__ARGS = TypesPackage.ANNOTATION_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Annotation Definition</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int ANNOTATION_DEFINITION_FEATURE_COUNT = TypesPackage.ANNOTATION_FEATURE_COUNT + 1;
+
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.TimeEventType <em>Time Event Type</em>}' enum.
 	 * <!-- begin-user-doc -->
@@ -1443,7 +1507,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTimeEventType()
 	 * @generated
 	 */
-	int TIME_EVENT_TYPE = 35;
+	int TIME_EVENT_TYPE = 36;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.TimeUnit <em>Time Unit</em>}' enum.
@@ -1453,7 +1517,7 @@ public interface StextPackage extends EPackage {
 	 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getTimeUnit()
 	 * @generated
 	 */
-	int TIME_UNIT = 36;
+	int TIME_UNIT = 37;
 
 
 	/**
@@ -1560,6 +1624,17 @@ public interface StextPackage extends EPackage {
 	 */
 	EClass getStatechartSpecification();
 
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.stext.stext.StatechartSpecification#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.stext.stext.StatechartSpecification#getAnnotation()
+	 * @see #getStatechartSpecification()
+	 * @generated
+	 */
+	EReference getStatechartSpecification_Annotation();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.StateSpecification <em>State Specification</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2048,6 +2123,16 @@ public interface StextPackage extends EPackage {
 	 */
 	EReference getActiveStateReferenceExpression_Value();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.AnnotationDefinition <em>Annotation Definition</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Annotation Definition</em>'.
+	 * @see org.yakindu.sct.model.stext.stext.AnnotationDefinition
+	 * @generated
+	 */
+	EClass getAnnotationDefinition();
+
 	/**
 	 * Returns the meta object for enum '{@link org.yakindu.sct.model.stext.stext.TimeEventType <em>Time Event Type</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2182,6 +2267,14 @@ public interface StextPackage extends EPackage {
 		 */
 		EClass STATECHART_SPECIFICATION = eINSTANCE.getStatechartSpecification();
 
+		/**
+		 * The meta object literal for the '<em><b>Annotation</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference STATECHART_SPECIFICATION__ANNOTATION = eINSTANCE.getStatechartSpecification_Annotation();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.impl.StateSpecificationImpl <em>State Specification</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -2616,6 +2709,16 @@ public interface StextPackage extends EPackage {
 		 */
 		EReference ACTIVE_STATE_REFERENCE_EXPRESSION__VALUE = eINSTANCE.getActiveStateReferenceExpression_Value();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.impl.AnnotationDefinitionImpl <em>Annotation Definition</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.stext.stext.impl.AnnotationDefinitionImpl
+		 * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getAnnotationDefinition()
+		 * @generated
+		 */
+		EClass ANNOTATION_DEFINITION = eINSTANCE.getAnnotationDefinition();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.TimeEventType <em>Time Event Type</em>}' enum.
 		 * <!-- begin-user-doc -->

+ 197 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/AnnotationDefinitionImpl.java

@@ -0,0 +1,197 @@
+/**
+ */
+package org.yakindu.sct.model.stext.stext.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.yakindu.base.expressions.expressions.ArgumentExpression;
+import org.yakindu.base.expressions.expressions.Expression;
+import org.yakindu.base.expressions.expressions.ExpressionsPackage;
+
+import org.yakindu.base.types.impl.AnnotationImpl;
+
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
+import org.yakindu.sct.model.stext.stext.StextPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Annotation Definition</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.stext.stext.impl.AnnotationDefinitionImpl#getArgs <em>Args</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class AnnotationDefinitionImpl extends AnnotationImpl implements AnnotationDefinition {
+	/**
+	 * The cached value of the '{@link #getArgs() <em>Args</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getArgs()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<Expression> args;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected AnnotationDefinitionImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return StextPackage.Literals.ANNOTATION_DEFINITION;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<Expression> getArgs() {
+		if (args == null) {
+			args = new EObjectContainmentEList<Expression>(Expression.class, this, StextPackage.ANNOTATION_DEFINITION__ARGS);
+		}
+		return args;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case StextPackage.ANNOTATION_DEFINITION__ARGS:
+				return ((InternalEList<?>)getArgs()).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 StextPackage.ANNOTATION_DEFINITION__ARGS:
+				return getArgs();
+		}
+		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 StextPackage.ANNOTATION_DEFINITION__ARGS:
+				getArgs().clear();
+				getArgs().addAll((Collection<? extends Expression>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case StextPackage.ANNOTATION_DEFINITION__ARGS:
+				getArgs().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case StextPackage.ANNOTATION_DEFINITION__ARGS:
+				return args != null && !args.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+		if (baseClass == Expression.class) {
+			switch (derivedFeatureID) {
+				default: return -1;
+			}
+		}
+		if (baseClass == ArgumentExpression.class) {
+			switch (derivedFeatureID) {
+				case StextPackage.ANNOTATION_DEFINITION__ARGS: return ExpressionsPackage.ARGUMENT_EXPRESSION__ARGS;
+				default: return -1;
+			}
+		}
+		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+		if (baseClass == Expression.class) {
+			switch (baseFeatureID) {
+				default: return -1;
+			}
+		}
+		if (baseClass == ArgumentExpression.class) {
+			switch (baseFeatureID) {
+				case ExpressionsPackage.ARGUMENT_EXPRESSION__ARGS: return StextPackage.ANNOTATION_DEFINITION__ARGS;
+				default: return -1;
+			}
+		}
+		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+	}
+
+} //AnnotationDefinitionImpl

+ 110 - 0
plugins/org.yakindu.sct.model.stext/emf-gen/org/yakindu/sct/model/stext/stext/impl/StatechartSpecificationImpl.java

@@ -2,8 +2,16 @@
  */
 package org.yakindu.sct.model.stext.stext.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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.sct.model.sgraph.impl.ScopedElementImpl;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.model.stext.stext.StatechartSpecification;
 import org.yakindu.sct.model.stext.stext.StextPackage;
 
@@ -11,10 +19,26 @@ import org.yakindu.sct.model.stext.stext.StextPackage;
  * <!-- begin-user-doc -->
  * An implementation of the model object '<em><b>Statechart Specification</b></em>'.
  * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.stext.stext.impl.StatechartSpecificationImpl#getAnnotation <em>Annotation</em>}</li>
+ * </ul>
  *
  * @generated
  */
 public class StatechartSpecificationImpl extends ScopedElementImpl implements StatechartSpecification {
+	/**
+	 * The cached value of the '{@link #getAnnotation() <em>Annotation</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAnnotation()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<AnnotationDefinition> annotation;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -34,4 +58,90 @@ public class StatechartSpecificationImpl extends ScopedElementImpl implements St
 		return StextPackage.Literals.STATECHART_SPECIFICATION;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<AnnotationDefinition> getAnnotation() {
+		if (annotation == null) {
+			annotation = new EObjectContainmentEList<AnnotationDefinition>(AnnotationDefinition.class, this, StextPackage.STATECHART_SPECIFICATION__ANNOTATION);
+		}
+		return annotation;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				return ((InternalEList<?>)getAnnotation()).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 StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				return getAnnotation();
+		}
+		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 StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				getAnnotation().clear();
+				getAnnotation().addAll((Collection<? extends AnnotationDefinition>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				getAnnotation().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case StextPackage.STATECHART_SPECIFICATION__ANNOTATION:
+				return annotation != null && !annotation.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
 } //StatechartSpecificationImpl

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

@@ -8,6 +8,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.stext.stext.*;
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
 import org.yakindu.sct.model.stext.stext.AlwaysEvent;
 import org.yakindu.sct.model.stext.stext.BuiltinEventSpec;
@@ -127,6 +128,7 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory {
 			case StextPackage.EVENT_RAISING_EXPRESSION: return createEventRaisingExpression();
 			case StextPackage.EVENT_VALUE_REFERENCE_EXPRESSION: return createEventValueReferenceExpression();
 			case StextPackage.ACTIVE_STATE_REFERENCE_EXPRESSION: return createActiveStateReferenceExpression();
+			case StextPackage.ANNOTATION_DEFINITION: return createAnnotationDefinition();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -516,6 +518,16 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory {
 		return activeStateReferenceExpression;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public AnnotationDefinition createAnnotationDefinition() {
+		AnnotationDefinitionImpl annotationDefinition = new AnnotationDefinitionImpl();
+		return annotationDefinition;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

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

@@ -14,6 +14,7 @@ import org.yakindu.base.types.TypesPackage;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
 import org.yakindu.sct.model.stext.stext.AlwaysEvent;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.model.stext.stext.BuiltinEventSpec;
 import org.yakindu.sct.model.stext.stext.DefRoot;
 import org.yakindu.sct.model.stext.stext.DefaultTrigger;
@@ -304,6 +305,13 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 	 */
 	private EClass activeStateReferenceExpressionEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass annotationDefinitionEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -473,6 +481,15 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		return statechartSpecificationEClass;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getStatechartSpecification_Annotation() {
+		return (EReference)statechartSpecificationEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -896,6 +913,15 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		return (EReference)activeStateReferenceExpressionEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getAnnotationDefinition() {
+		return annotationDefinitionEClass;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -957,6 +983,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		createEReference(transitionRootEClass, TRANSITION_ROOT__DEF);
 
 		statechartSpecificationEClass = createEClass(STATECHART_SPECIFICATION);
+		createEReference(statechartSpecificationEClass, STATECHART_SPECIFICATION__ANNOTATION);
 
 		stateSpecificationEClass = createEClass(STATE_SPECIFICATION);
 		createEReference(stateSpecificationEClass, STATE_SPECIFICATION__SCOPE);
@@ -1034,6 +1061,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		activeStateReferenceExpressionEClass = createEClass(ACTIVE_STATE_REFERENCE_EXPRESSION);
 		createEReference(activeStateReferenceExpressionEClass, ACTIVE_STATE_REFERENCE_EXPRESSION__VALUE);
 
+		annotationDefinitionEClass = createEClass(ANNOTATION_DEFINITION);
+
 		// Create enums
 		timeEventTypeEEnum = createEEnum(TIME_EVENT_TYPE);
 		timeUnitEEnum = createEEnum(TIME_UNIT);
@@ -1104,6 +1133,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		eventRaisingExpressionEClass.getESuperTypes().add(theExpressionsPackage.getExpression());
 		eventValueReferenceExpressionEClass.getESuperTypes().add(theExpressionsPackage.getExpression());
 		activeStateReferenceExpressionEClass.getESuperTypes().add(theExpressionsPackage.getExpression());
+		annotationDefinitionEClass.getESuperTypes().add(theTypesPackage.getAnnotation());
+		annotationDefinitionEClass.getESuperTypes().add(theExpressionsPackage.getArgumentExpression());
 
 		// Initialize classes and features; add operations and parameters
 		initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1121,6 +1152,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		initEReference(getTransitionRoot_Def(), this.getTransitionSpecification(), null, "def", null, 0, 1, TransitionRoot.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(statechartSpecificationEClass, StatechartSpecification.class, "StatechartSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getStatechartSpecification_Annotation(), this.getAnnotationDefinition(), null, "annotation", null, 0, -1, StatechartSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(stateSpecificationEClass, StateSpecification.class, "StateSpecification", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getStateSpecification_Scope(), theSGraphPackage.getScope(), null, "scope", null, 0, 1, StateSpecification.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -1198,6 +1230,8 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage {
 		initEClass(activeStateReferenceExpressionEClass, ActiveStateReferenceExpression.class, "ActiveStateReferenceExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getActiveStateReferenceExpression_Value(), theSGraphPackage.getState(), null, "value", null, 0, 1, ActiveStateReferenceExpression.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(annotationDefinitionEClass, AnnotationDefinition.class, "AnnotationDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
 		// Initialize enums and add enum literals
 		initEEnum(timeEventTypeEEnum, TimeEventType.class, "TimeEventType");
 		addEEnumLiteral(timeEventTypeEEnum, TimeEventType.AFTER);

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

@@ -7,10 +7,13 @@ import org.eclipse.emf.common.notify.Notifier;
 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 import org.eclipse.emf.ecore.EObject;
 import org.yakindu.base.base.NamedElement;
+import org.yakindu.base.expressions.expressions.ArgumentExpression;
 import org.yakindu.base.expressions.expressions.Expression;
 import org.yakindu.base.types.AnnotatableElement;
+import org.yakindu.base.types.Annotation;
 import org.yakindu.base.types.Declaration;
 import org.yakindu.base.types.Event;
+import org.yakindu.base.types.GenericElement;
 import org.yakindu.base.types.Operation;
 import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Property;
@@ -23,6 +26,7 @@ import org.yakindu.sct.model.sgraph.ReactionProperty;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.sgraph.ScopedElement;
 import org.yakindu.sct.model.sgraph.Trigger;
+import org.yakindu.sct.model.stext.stext.*;
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
 import org.yakindu.sct.model.stext.stext.AlwaysEvent;
 import org.yakindu.sct.model.stext.stext.BuiltinEventSpec;
@@ -257,6 +261,10 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 				return createActiveStateReferenceExpressionAdapter();
 			}
 			@Override
+			public Adapter caseAnnotationDefinition(AnnotationDefinition object) {
+				return createAnnotationDefinitionAdapter();
+			}
+			@Override
 			public Adapter caseScopedElement(ScopedElement object) {
 				return createScopedElementAdapter();
 			}
@@ -293,6 +301,10 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 				return createPropertyAdapter();
 			}
 			@Override
+			public Adapter caseGenericElement(GenericElement object) {
+				return createGenericElementAdapter();
+			}
+			@Override
 			public Adapter caseOperation(Operation object) {
 				return createOperationAdapter();
 			}
@@ -325,6 +337,14 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 				return createExpressionAdapter();
 			}
 			@Override
+			public Adapter caseAnnotation(Annotation object) {
+				return createAnnotationAdapter();
+			}
+			@Override
+			public Adapter caseArgumentExpression(ArgumentExpression object) {
+				return createArgumentExpressionAdapter();
+			}
+			@Override
 			public Adapter defaultCase(EObject object) {
 				return createEObjectAdapter();
 			}
@@ -834,6 +854,20 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.stext.stext.AnnotationDefinition <em>Annotation 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.AnnotationDefinition
+	 * @generated
+	 */
+	public Adapter createAnnotationDefinitionAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.ScopedElement <em>Scoped Element</em>}'.
 	 * <!-- begin-user-doc -->
@@ -946,6 +980,20 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.GenericElement <em>Generic 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.base.types.GenericElement
+	 * @generated
+	 */
+	public Adapter createGenericElementAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.PackageMember <em>Package Member</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1072,6 +1120,34 @@ public class StextAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.Annotation <em>Annotation</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.Annotation
+	 * @generated
+	 */
+	public Adapter createAnnotationAdapter() {
+		return null;
+	}
+
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.expressions.expressions.ArgumentExpression <em>Argument Expression</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.expressions.expressions.ArgumentExpression
+	 * @generated
+	 */
+	public Adapter createArgumentExpressionAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for the default case.
 	 * <!-- begin-user-doc -->

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

@@ -6,10 +6,13 @@ import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
 import org.yakindu.base.base.NamedElement;
+import org.yakindu.base.expressions.expressions.ArgumentExpression;
 import org.yakindu.base.expressions.expressions.Expression;
 import org.yakindu.base.types.AnnotatableElement;
+import org.yakindu.base.types.Annotation;
 import org.yakindu.base.types.Declaration;
 import org.yakindu.base.types.Event;
+import org.yakindu.base.types.GenericElement;
 import org.yakindu.base.types.Operation;
 import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.Property;
@@ -22,6 +25,7 @@ import org.yakindu.sct.model.sgraph.ReactionProperty;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.sgraph.ScopedElement;
 import org.yakindu.sct.model.sgraph.Trigger;
+import org.yakindu.sct.model.stext.stext.*;
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
 import org.yakindu.sct.model.stext.stext.AlwaysEvent;
 import org.yakindu.sct.model.stext.stext.BuiltinEventSpec;
@@ -229,6 +233,7 @@ public class StextSwitch<T> extends Switch<T> {
 				T result = caseOperationDefinition(operationDefinition);
 				if (result == null) result = caseOperation(operationDefinition);
 				if (result == null) result = caseDeclaration(operationDefinition);
+				if (result == null) result = caseGenericElement(operationDefinition);
 				if (result == null) result = caseTypedElement(operationDefinition);
 				if (result == null) result = casePackageMember(operationDefinition);
 				if (result == null) result = caseNamedElement(operationDefinition);
@@ -383,6 +388,15 @@ public class StextSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case StextPackage.ANNOTATION_DEFINITION: {
+				AnnotationDefinition annotationDefinition = (AnnotationDefinition)theEObject;
+				T result = caseAnnotationDefinition(annotationDefinition);
+				if (result == null) result = caseAnnotation(annotationDefinition);
+				if (result == null) result = caseArgumentExpression(annotationDefinition);
+				if (result == null) result = caseExpression(annotationDefinition);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -912,6 +926,21 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Annotation 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>Annotation Definition</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseAnnotationDefinition(AnnotationDefinition object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Scoped Element</em>'.
 	 * <!-- begin-user-doc -->
@@ -1032,6 +1061,21 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Generic 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>Generic Element</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseGenericElement(GenericElement object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Package Member</em>'.
 	 * <!-- begin-user-doc -->
@@ -1167,6 +1211,36 @@ public class StextSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Annotation</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>Annotation</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseAnnotation(Annotation object) {
+		return null;
+	}
+
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Argument Expression</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>Argument Expression</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseArgumentExpression(ArgumentExpression object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
 	 * <!-- begin-user-doc -->

+ 5 - 1
plugins/org.yakindu.sct.model.stext/model/SText.ecore

@@ -18,7 +18,10 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="def" eType="#//TransitionSpecification"
         containment="true"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="StatechartSpecification" eSuperTypes="../../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">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="annotation" upperBound="-1"
+        eType="#//AnnotationDefinition" containment="true"/>
+  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="StateSpecification">
     <eStructuralFeatures xsi:type="ecore:EReference" name="scope" eType="ecore:EClass ../../org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"
         containment="true"/>
@@ -104,4 +107,5 @@
   <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>
+  <eClassifiers xsi:type="ecore:EClass" name="AnnotationDefinition" eSuperTypes="../../org.yakindu.base.types/model/types.ecore#//Annotation ../../org.yakindu.base.expressions/model/Expressions.ecore#//ArgumentExpression"/>
 </ecore:EPackage>

+ 8 - 4
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -18,13 +18,13 @@ DefRoot:
 	StatechartRoot | StateRoot | TransitionRoot;
 
 StatechartRoot:
-	'@@statechart@@' def=StatechartSpecification;
+	'§§statechart§§' def=StatechartSpecification;
 
 StateRoot:
-	'@@state@@' def=StateSpecification;
+	'§§state§§' def=StateSpecification;
 
 TransitionRoot:
-	'@@transition@@' def=TransitionSpecification;
+	'§§transition§§' def=TransitionSpecification;
 /* ---- start rules ----
 Define the starting points used by the statechart integration. These rules hook in the concrete rules of the specific grammar.
 */
@@ -33,6 +33,7 @@ ScopedElement returns sgraph::ScopedElement:
 
 StatechartSpecification:
 	{StatechartSpecification} ('namespace' namespace=FQN)?
+	(annotation+=AnnotationDefinition)*
 	(scopes+=StatechartScope)*;
 
 StateSpecification:
@@ -86,7 +87,10 @@ TypeAliasDefinition:
 OperationDefinition:
 	{OperationDefinition} 'operation' name=XID '(' (parameters+=Parameter (',' parameters+=Parameter)*)? ')' (':'
 	typeSpecifier=TypeSpecifier)?;
-
+	
+AnnotationDefinition returns types::Annotation:
+	{AnnotationDefinition} '@' type=[types::AnnotationType|QID] ('('(args+=Expression (',' args+=Expression)*)? ')')?
+;
 TypeSpecifier returns types::TypeSpecifier:
 	type=[types::Type|FQN] ('<' (typeArguments+=TypeSpecifier (',' typeArguments+=TypeSpecifier)*'>'))?;
 

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

@@ -22,6 +22,7 @@ import org.yakindu.base.expressions.inferrer.ExpressionsTypeInferrer;
 import org.yakindu.base.types.Event;
 import org.yakindu.sct.model.sgraph.Scope;
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.model.stext.stext.EventRaisingExpression;
 import org.yakindu.sct.model.stext.stext.EventValueReferenceExpression;
 import org.yakindu.sct.model.stext.stext.Guard;
@@ -118,5 +119,9 @@ public class STextTypeInferrer extends ExpressionsTypeInferrer {
 	public InferenceResult doInfer(ActiveStateReferenceExpression e) {
 		return getResultFor(BOOLEAN);
 	}
-
+	
+	public InferenceResult doInfer(AnnotationDefinition ad) {
+		return getResultFor(VOID);
+	}
+	
 }

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

@@ -14,6 +14,7 @@ package org.yakindu.sct.model.stext.resource;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.common.util.URI;
 import org.eclipse.xtext.parser.IParseResult;
+import org.yakindu.base.types.Annotation;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.ReactionProperty;
 import org.yakindu.sct.model.sgraph.Scope;
@@ -21,6 +22,7 @@ import org.yakindu.sct.model.sgraph.State;
 import org.yakindu.sct.model.sgraph.Statechart;
 import org.yakindu.sct.model.sgraph.Transition;
 import org.yakindu.sct.model.sgraph.resource.AbstractSCTResource;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.model.stext.stext.StateSpecification;
 import org.yakindu.sct.model.stext.stext.StatechartSpecification;
 import org.yakindu.sct.model.stext.stext.TransitionReaction;
@@ -48,10 +50,17 @@ public class StextResource extends AbstractSCTResource {
 			builder.append("namespace " + statechart.getNamespace());
 			builder.append("\n");
 		}
+		for(Annotation annotation : statechart.getAnnotation()){
+			builder.append(serialize(annotation));
+			builder.append("\n");
+		}
+
 		for (Scope scope : statechart.getScopes()) {
 			builder.append(serialize(scope));
 			builder.append("\n");
 		}
+		
+		
 		statechart.setSpecification(builder.toString());
 	}
 
@@ -91,14 +100,20 @@ public class StextResource extends AbstractSCTResource {
 
 	protected void parseStatechart(Statechart statechart) {
 		IParseResult parseResult = parse(statechart, StatechartSpecification.class.getSimpleName());
-
 		StatechartSpecification rootASTElement = (StatechartSpecification) parseResult.getRootASTElement();
-		EList<Scope> definitionScopes = rootASTElement.getScopes();
-		statechart.getScopes().clear();
 		statechart.setNamespace(rootASTElement.getNamespace());
+		statechart.getScopes().clear();
+		EList<Scope> definitionScopes = rootASTElement.getScopes();
 		if (definitionScopes != null) {
 			statechart.getScopes().addAll(definitionScopes);
 		}
+		
+		statechart.getAnnotation().clear();
+		EList<AnnotationDefinition> annotations = rootASTElement.getAnnotation();
+		if(annotations != null){
+			statechart.getAnnotation().addAll(annotations);
+		}
+		
 	}
 
 	protected void parseState(State state) {

+ 5 - 1
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/scoping/STextGlobalScopeProvider.java

@@ -29,6 +29,7 @@ import org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider;
 import org.eclipse.xtext.scoping.impl.SimpleScope;
 import org.eclipse.xtext.util.IAcceptor;
 import org.eclipse.xtext.util.IResourceScopeCache;
+import org.yakindu.base.expressions.scoping.LibraryScope;
 import org.yakindu.base.types.Package;
 import org.yakindu.base.types.TypesPackage;
 import org.yakindu.base.types.typesystem.ITypeSystem;
@@ -49,7 +50,9 @@ import com.google.inject.Provider;
  * 
  */
 public class STextGlobalScopeProvider extends ImportUriGlobalScopeProvider {
-
+	
+	public static final URI STEXT_LIB = URI.createURI("platform:/plugin/org.yakindu.sct.model.stext.lib/lib/STextLib.xmi");
+	
 	@Inject
 	private ITypeSystem typeSystem;
 	@Inject
@@ -72,6 +75,7 @@ public class STextGlobalScopeProvider extends ImportUriGlobalScopeProvider {
 		IScope parentScope = super.getScope(context, reference, filter);
 		parentScope = new SimpleScope(parentScope, delegate.getScope(context, reference, filter).getAllElements());
 		parentScope = filterExternalDeclarations(context, parentScope);
+		parentScope = new LibraryScope(parentScope, STEXT_LIB);
 		final Statechart statechart = getStatechart(context);
 		parentScope = new TypeSystemAwareScope(parentScope, typeSystem, qualifiedNameProvider,
 				reference.getEReferenceType());

+ 9 - 2
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/STextJavaValidator.java

@@ -75,6 +75,7 @@ import org.yakindu.sct.model.sgraph.util.ContextElementAdapter;
 import org.yakindu.sct.model.sgraph.validation.SCTResourceValidator;
 import org.yakindu.sct.model.sgraph.validation.SGraphJavaValidator;
 import org.yakindu.sct.model.stext.services.STextGrammarAccess;
+import org.yakindu.sct.model.stext.stext.AnnotationDefinition;
 import org.yakindu.sct.model.stext.stext.DefaultTrigger;
 import org.yakindu.sct.model.stext.stext.EntryEvent;
 import org.yakindu.sct.model.stext.stext.EntryPointSpec;
@@ -553,6 +554,12 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 			assertOperationArguments(operation, call.getArgs());
 		}
 	}
+	@Check(CheckType.FAST)
+	public void checkAnnotationArguments(AnnotationDefinition annotation){
+		if (annotation.getArgs().size() != annotation.getType().getProperties().size()) {
+			error(String.format(WRONG_NUMBER_OF_OPERATIONARGUMENTS, annotation), null);
+		}
+	}
 
 	@Check(CheckType.FAST)
 	public void checkOperationArguments_TypedElementReferenceExpression(final ElementReferenceExpression call) {
@@ -764,7 +771,7 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 	public void checkAnnotationTarget(final AnnotatableElement element) {
 		EList<Annotation> annotations = element.getAnnotations();
 		for (Annotation annotation : annotations) {
-			EList<EObject> targets = annotation.getTargets();
+			EList<EObject> targets = annotation.getType().getTargets();
 			boolean found = Iterables.any(targets, new Predicate<EObject>() {
 				@Override
 				public boolean apply(EObject input) {
@@ -772,7 +779,7 @@ public class STextJavaValidator extends AbstractSTextJavaValidator implements ST
 				}
 			});
 			if (!found) {
-				error(String.format(ERROR_WRONG_ANNOTATION_TARGET_MSG, annotation.getName(), element.eClass()),
+				error(String.format(ERROR_WRONG_ANNOTATION_TARGET_MSG, annotation.getType().getName(), element.eClass()),
 						TypesPackage.Literals.ANNOTATABLE_ELEMENT__ANNOTATIONS,
 						element.getAnnotations().indexOf(annotation), ERROR_WRONG_ANNOTATION_TARGET_CODE);
 			}

+ 0 - 35
test-plugins/org.yakindu.sct.model.stext.test/src/org/yakindu/sct/model/stext/test/validation/STextJavaValidatorTest.java

@@ -29,16 +29,10 @@ import org.eclipse.xtext.junit4.InjectWith;
 import org.eclipse.xtext.junit4.XtextRunner;
 import org.eclipse.xtext.junit4.validation.AssertableDiagnostics;
 import org.eclipse.xtext.validation.Check;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.yakindu.base.expressions.expressions.Expression;
-import org.yakindu.base.types.Annotation;
 import org.yakindu.base.types.Operation;
-import org.yakindu.base.types.Package;
-import org.yakindu.base.types.Type;
-import org.yakindu.base.types.TypesFactory;
-import org.yakindu.base.types.TypesPackage;
 import org.yakindu.sct.model.sgraph.Entry;
 import org.yakindu.sct.model.sgraph.Exit;
 import org.yakindu.sct.model.sgraph.Scope;
@@ -675,35 +669,6 @@ public class STextJavaValidatorTest extends AbstractSTextValidationTest implemen
 		assertWarning(diagnostics, INTERNAL_DECLARATION_UNUSED);
 	}
 
-	@Ignore("Test is not executed for TypesPackage elements")
-	@Test
-	public void checkAnnotationTarget() {
-
-		Package pack = TypesFactory.eINSTANCE.createPackage();
-		pack.setName("package");
-		
-		Annotation annotation = TypesFactory.eINSTANCE.createAnnotation();
-		annotation.setName("OperationAnnotation");
-		annotation.getTargets().add(TypesPackage.Literals.OPERATION);
-		pack.getMember().add(annotation);
-		
-		Operation operation = TypesFactory.eINSTANCE.createOperation();
-		operation.setName("MyOp");
-		operation.getAnnotations().add(annotation);
-		pack.getMember().add(operation);
-
-		AssertableDiagnostics validationResult = tester.validate(pack);
-		validationResult.assertOK();
-
-		Type type = TypesFactory.eINSTANCE.createType();
-		type.setName("primitive");
-		type.getAnnotations().add(annotation);
-		pack.getMember().add(type);
-
-		validationResult = tester.validate(pack);
-		validationResult.assertError(ERROR_WRONG_ANNOTATION_TARGET_CODE);
-	}
-
 	@Test
 	public void transitionsWithNoTrigger() {
 	}