Browse Source

Transition, State and Statecharts are DocumentableElements

Andreas Mülder 12 years ago
parent
commit
a30758699b

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

@@ -77,6 +77,7 @@ public class StateItemProvider
 			addNamespacePropertyDescriptor(object);
 			addNamePropertyDescriptor(object);
 			addIncomingTransitionsPropertyDescriptor(object);
+			addDocumentationPropertyDescriptor(object);
 			addOrthogonalPropertyDescriptor(object);
 			addSubstatechartPropertyDescriptor(object);
 			addSubstatechartIdPropertyDescriptor(object);
@@ -176,6 +177,28 @@ public class StateItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Documentation feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addDocumentationPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_DocumentedElement_documentation_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_DocumentedElement_documentation_feature", "_UI_DocumentedElement_type"),
+				 BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Orthogonal feature.
 	 * <!-- begin-user-doc -->
@@ -402,6 +425,7 @@ public class StateItemProvider
 		switch (notification.getFeatureID(State.class)) {
 			case SGraphPackage.STATE__NAMESPACE:
 			case SGraphPackage.STATE__NAME:
+			case SGraphPackage.STATE__DOCUMENTATION:
 			case SGraphPackage.STATE__ORTHOGONAL:
 			case SGraphPackage.STATE__SUBSTATECHART_ID:
 			case SGraphPackage.STATE__SUBCHART:

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

@@ -76,6 +76,7 @@ public class StatechartItemProvider
 			addReactionsPropertyDescriptor(object);
 			addNamespacePropertyDescriptor(object);
 			addNamePropertyDescriptor(object);
+			addDocumentationPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -146,6 +147,28 @@ public class StatechartItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Documentation feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addDocumentationPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_DocumentedElement_documentation_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_DocumentedElement_documentation_feature", "_UI_DocumentedElement_type"),
+				 BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 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
@@ -217,6 +240,7 @@ public class StatechartItemProvider
 		switch (notification.getFeatureID(Statechart.class)) {
 			case SGraphPackage.STATECHART__NAMESPACE:
 			case SGraphPackage.STATECHART__NAME:
+			case SGraphPackage.STATECHART__DOCUMENTATION:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 			case SGraphPackage.STATECHART__LOCAL_REACTIONS:

+ 25 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/TransitionItemProvider.java

@@ -25,6 +25,7 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
 import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.yakindu.base.base.BasePackage;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.sgraph.Transition;
 
@@ -64,12 +65,35 @@ public class TransitionItemProvider extends SpecificationElementItemProvider
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
+			addDocumentationPropertyDescriptor(object);
 			addTargetPropertyDescriptor(object);
 			addPriorityPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
+	/**
+	 * This adds a property descriptor for the Documentation feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addDocumentationPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_DocumentedElement_documentation_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_DocumentedElement_documentation_feature", "_UI_DocumentedElement_type"),
+				 BasePackage.Literals.DOCUMENTED_ELEMENT__DOCUMENTATION,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Target feature. <!--
 	 * begin-user-doc --> <!-- end-user-doc -->
@@ -185,6 +209,7 @@ public class TransitionItemProvider extends SpecificationElementItemProvider
 		updateChildren(notification);
 
 		switch (notification.getFeatureID(Transition.class)) {
+			case SGraphPackage.TRANSITION__DOCUMENTATION:
 			case SGraphPackage.TRANSITION__PRIORITY:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;

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

@@ -18,7 +18,7 @@
     <eStructuralFeatures xsi:type="ecore:EReference" name="composite" lowerBound="1"
         eType="#//CompositeElement" eOpposite="#//CompositeElement/regions"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//SpecificationElement #//Reaction">
+  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//SpecificationElement #//Reaction ../../../org.yakindu.base.types/model/base.ecore#//DocumentedElement">
     <eStructuralFeatures xsi:type="ecore:EReference" name="target" ordered="false"
         lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/incomingTransitions"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="source" ordered="false"
@@ -31,7 +31,7 @@
   <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//ChoiceKind"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//SpecificationElement #//ReactiveElement #//ScopedElement #//CompositeElement ../../../org.yakindu.base.types/model/base.ecore#//NamedElement"/>
+  <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"/>
   <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
   </eClassifiers>
@@ -74,7 +74,7 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="namespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Synchronization" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//SpecificationElement #//ReactiveElement #//ScopedElement #//RegularState #//CompositeElement">
+  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//SpecificationElement #//ReactiveElement #//ScopedElement #//RegularState #//CompositeElement ../../../org.yakindu.base.types/model/base.ecore#//DocumentedElement">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="orthogonal" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
         changeable="false" volatile="true" transient="true" derived="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="substatechart" eType="#//Statechart"

+ 40 - 13
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java

@@ -302,6 +302,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int TRANSITION__EFFECT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 1;
 
+	/**
+	 * The feature id for the '<em><b>Documentation</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int TRANSITION__DOCUMENTATION = SPECIFICATION_ELEMENT_FEATURE_COUNT + 2;
+
 	/**
 	 * The feature id for the '<em><b>Target</b></em>' reference.
 	 * <!-- begin-user-doc -->
@@ -309,7 +318,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int TRANSITION__TARGET = SPECIFICATION_ELEMENT_FEATURE_COUNT + 2;
+	int TRANSITION__TARGET = SPECIFICATION_ELEMENT_FEATURE_COUNT + 3;
 
 	/**
 	 * The feature id for the '<em><b>Source</b></em>' container reference.
@@ -318,7 +327,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int TRANSITION__SOURCE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 3;
+	int TRANSITION__SOURCE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 4;
 
 	/**
 	 * The feature id for the '<em><b>Priority</b></em>' attribute.
@@ -327,7 +336,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int TRANSITION__PRIORITY = SPECIFICATION_ELEMENT_FEATURE_COUNT + 4;
+	int TRANSITION__PRIORITY = SPECIFICATION_ELEMENT_FEATURE_COUNT + 5;
 
 	/**
 	 * The number of structural features of the '<em>Transition</em>' class.
@@ -336,7 +345,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int TRANSITION_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 5;
+	int TRANSITION_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 6;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.RegularStateImpl <em>Regular State</em>}' class.
@@ -679,6 +688,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int STATECHART__NAME = SPECIFICATION_ELEMENT_FEATURE_COUNT + 5;
 
+	/**
+	 * The feature id for the '<em><b>Documentation</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATECHART__DOCUMENTATION = SPECIFICATION_ELEMENT_FEATURE_COUNT + 6;
+
 	/**
 	 * The number of structural features of the '<em>Statechart</em>' class.
 	 * <!-- begin-user-doc -->
@@ -686,7 +704,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 6;
+	int STATECHART_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 7;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.EntryImpl <em>Entry</em>}' class.
@@ -1147,6 +1165,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int STATE__REGIONS = SPECIFICATION_ELEMENT_FEATURE_COUNT + 8;
 
+	/**
+	 * The feature id for the '<em><b>Documentation</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATE__DOCUMENTATION = SPECIFICATION_ELEMENT_FEATURE_COUNT + 9;
+
 	/**
 	 * The feature id for the '<em><b>Orthogonal</b></em>' attribute.
 	 * <!-- begin-user-doc -->
@@ -1154,7 +1181,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__ORTHOGONAL = SPECIFICATION_ELEMENT_FEATURE_COUNT + 9;
+	int STATE__ORTHOGONAL = SPECIFICATION_ELEMENT_FEATURE_COUNT + 10;
 
 	/**
 	 * The feature id for the '<em><b>Substatechart</b></em>' reference.
@@ -1163,7 +1190,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBSTATECHART = SPECIFICATION_ELEMENT_FEATURE_COUNT + 10;
+	int STATE__SUBSTATECHART = SPECIFICATION_ELEMENT_FEATURE_COUNT + 11;
 
 	/**
 	 * The feature id for the '<em><b>Substatechart Id</b></em>' attribute.
@@ -1172,7 +1199,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBSTATECHART_ID = SPECIFICATION_ELEMENT_FEATURE_COUNT + 11;
+	int STATE__SUBSTATECHART_ID = SPECIFICATION_ELEMENT_FEATURE_COUNT + 12;
 
 	/**
 	 * The feature id for the '<em><b>Subchart</b></em>' attribute.
@@ -1181,7 +1208,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBCHART = SPECIFICATION_ELEMENT_FEATURE_COUNT + 12;
+	int STATE__SUBCHART = SPECIFICATION_ELEMENT_FEATURE_COUNT + 13;
 
 	/**
 	 * The feature id for the '<em><b>Simple</b></em>' attribute.
@@ -1190,7 +1217,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SIMPLE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 13;
+	int STATE__SIMPLE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 14;
 
 	/**
 	 * The feature id for the '<em><b>Composite</b></em>' attribute.
@@ -1199,7 +1226,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__COMPOSITE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 14;
+	int STATE__COMPOSITE = SPECIFICATION_ELEMENT_FEATURE_COUNT + 15;
 
 	/**
 	 * The feature id for the '<em><b>Leaf</b></em>' attribute.
@@ -1208,7 +1235,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__LEAF = SPECIFICATION_ELEMENT_FEATURE_COUNT + 15;
+	int STATE__LEAF = SPECIFICATION_ELEMENT_FEATURE_COUNT + 16;
 
 	/**
 	 * The number of structural features of the '<em>State</em>' class.
@@ -1217,7 +1244,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 16;
+	int STATE_FEATURE_COUNT = SPECIFICATION_ELEMENT_FEATURE_COUNT + 17;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.StatementImpl <em>Statement</em>}' class.

+ 3 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/State.java

@@ -10,6 +10,8 @@
  */
 package org.yakindu.sct.model.sgraph;
 
+import org.yakindu.base.base.DocumentedElement;
+
 
 /**
  * <!-- begin-user-doc -->
@@ -33,7 +35,7 @@ package org.yakindu.sct.model.sgraph;
  * @model
  * @generated
  */
-public interface State extends SpecificationElement, ReactiveElement, ScopedElement, RegularState, CompositeElement {
+public interface State extends SpecificationElement, ReactiveElement, ScopedElement, RegularState, CompositeElement, DocumentedElement {
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

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

@@ -10,6 +10,7 @@
  */
 package org.yakindu.sct.model.sgraph;
 
+import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
 
 
@@ -23,7 +24,7 @@ import org.yakindu.base.base.NamedElement;
  * @model
  * @generated
  */
-public interface Statechart extends SpecificationElement, ReactiveElement, ScopedElement, CompositeElement, NamedElement {
+public interface Statechart extends SpecificationElement, ReactiveElement, ScopedElement, CompositeElement, NamedElement, DocumentedElement {
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 3 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Transition.java

@@ -10,6 +10,8 @@
  */
 package org.yakindu.sct.model.sgraph;
 
+import org.yakindu.base.base.DocumentedElement;
+
 
 /**
  * <!-- begin-user-doc -->
@@ -29,7 +31,7 @@ package org.yakindu.sct.model.sgraph;
  * @model
  * @generated
  */
-public interface Transition extends SpecificationElement, Reaction {
+public interface Transition extends SpecificationElement, Reaction, DocumentedElement {
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

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

@@ -947,6 +947,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		regionEClass.getESuperTypes().add(theBasePackage.getNamedElement());
 		transitionEClass.getESuperTypes().add(this.getSpecificationElement());
 		transitionEClass.getESuperTypes().add(this.getReaction());
+		transitionEClass.getESuperTypes().add(theBasePackage.getDocumentedElement());
 		finalStateEClass.getESuperTypes().add(this.getRegularState());
 		variableEClass.getESuperTypes().add(this.getDeclaration());
 		eventEClass.getESuperTypes().add(this.getDeclaration());
@@ -956,6 +957,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		statechartEClass.getESuperTypes().add(this.getScopedElement());
 		statechartEClass.getESuperTypes().add(this.getCompositeElement());
 		statechartEClass.getESuperTypes().add(theBasePackage.getNamedElement());
+		statechartEClass.getESuperTypes().add(theBasePackage.getDocumentedElement());
 		entryEClass.getESuperTypes().add(this.getPseudostate());
 		declarationEClass.getESuperTypes().add(theBasePackage.getNamedElement());
 		exitEClass.getESuperTypes().add(this.getPseudostate());
@@ -965,6 +967,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		stateEClass.getESuperTypes().add(this.getScopedElement());
 		stateEClass.getESuperTypes().add(this.getRegularState());
 		stateEClass.getESuperTypes().add(this.getCompositeElement());
+		stateEClass.getESuperTypes().add(theBasePackage.getDocumentedElement());
 		regularStateEClass.getESuperTypes().add(this.getVertex());
 
 		// Initialize classes and features; add operations and parameters

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

@@ -25,6 +25,7 @@ import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
 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.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -55,6 +56,7 @@ import org.yakindu.sct.model.sgraph.Vertex;
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getIncomingTransitions <em>Incoming Transitions</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getOutgoingTransitions <em>Outgoing Transitions</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getRegions <em>Regions</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getDocumentation <em>Documentation</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isOrthogonal <em>Orthogonal</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubstatechart <em>Substatechart</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubstatechartId <em>Substatechart Id</em>}</li>
@@ -149,6 +151,26 @@ public class StateImpl extends SpecificationElementImpl implements State {
 	 */
 	protected EList<Region> regions;
 
+	/**
+	 * The default value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DOCUMENTATION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected String documentation = DOCUMENTATION_EDEFAULT;
+
 	/**
 	 * The default value of the '{@link #isOrthogonal() <em>Orthogonal</em>}' attribute.
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -403,6 +425,27 @@ public class StateImpl extends SpecificationElementImpl implements State {
 		return regions;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getDocumentation() {
+		return documentation;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDocumentation(String newDocumentation) {
+		String oldDocumentation = documentation;
+		documentation = newDocumentation;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATE__DOCUMENTATION, oldDocumentation, documentation));
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * 
@@ -607,6 +650,8 @@ public class StateImpl extends SpecificationElementImpl implements State {
 				return getOutgoingTransitions();
 			case SGraphPackage.STATE__REGIONS:
 				return getRegions();
+			case SGraphPackage.STATE__DOCUMENTATION:
+				return getDocumentation();
 			case SGraphPackage.STATE__ORTHOGONAL:
 				return isOrthogonal();
 			case SGraphPackage.STATE__SUBSTATECHART:
@@ -659,6 +704,9 @@ public class StateImpl extends SpecificationElementImpl implements State {
 				getRegions().clear();
 				getRegions().addAll((Collection<? extends Region>)newValue);
 				return;
+			case SGraphPackage.STATE__DOCUMENTATION:
+				setDocumentation((String)newValue);
+				return;
 			case SGraphPackage.STATE__SUBSTATECHART:
 				setSubstatechart((Statechart)newValue);
 				return;
@@ -697,6 +745,9 @@ public class StateImpl extends SpecificationElementImpl implements State {
 			case SGraphPackage.STATE__REGIONS:
 				getRegions().clear();
 				return;
+			case SGraphPackage.STATE__DOCUMENTATION:
+				setDocumentation(DOCUMENTATION_EDEFAULT);
+				return;
 			case SGraphPackage.STATE__SUBSTATECHART:
 				setSubstatechart((Statechart)null);
 				return;
@@ -732,6 +783,8 @@ public class StateImpl extends SpecificationElementImpl implements State {
 				return outgoingTransitions != null && !outgoingTransitions.isEmpty();
 			case SGraphPackage.STATE__REGIONS:
 				return regions != null && !regions.isEmpty();
+			case SGraphPackage.STATE__DOCUMENTATION:
+				return DOCUMENTATION_EDEFAULT == null ? documentation != null : !DOCUMENTATION_EDEFAULT.equals(documentation);
 			case SGraphPackage.STATE__ORTHOGONAL:
 				return isOrthogonal() != ORTHOGONAL_EDEFAULT;
 			case SGraphPackage.STATE__SUBSTATECHART:
@@ -795,6 +848,12 @@ public class StateImpl extends SpecificationElementImpl implements State {
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (derivedFeatureID) {
+				case SGraphPackage.STATE__DOCUMENTATION: return BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -843,6 +902,12 @@ public class StateImpl extends SpecificationElementImpl implements State {
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (baseFeatureID) {
+				case BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION: return SGraphPackage.STATE__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 
@@ -859,6 +924,8 @@ public class StateImpl extends SpecificationElementImpl implements State {
 		result.append(namespace);
 		result.append(", name: ");
 		result.append(name);
+		result.append(", documentation: ");
+		result.append(documentation);
 		result.append(", substatechartId: ");
 		result.append(substatechartId);
 		result.append(')');

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

@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.BasePackage;
+import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -47,6 +48,7 @@ import org.yakindu.sct.model.sgraph.Statechart;
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getNamespace <em>Namespace</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getRegions <em>Regions</em>}</li>
  *   <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>
  * </ul>
  * </p>
  *
@@ -120,6 +122,26 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 	 */
 	protected String name = NAME_EDEFAULT;
 
+	/**
+	 * The default value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DOCUMENTATION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected String documentation = DOCUMENTATION_EDEFAULT;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -235,6 +257,27 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATECHART__NAME, oldName, name));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getDocumentation() {
+		return documentation;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDocumentation(String newDocumentation) {
+		String oldDocumentation = documentation;
+		documentation = newDocumentation;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATECHART__DOCUMENTATION, oldDocumentation, documentation));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -286,6 +329,8 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 				return getRegions();
 			case SGraphPackage.STATECHART__NAME:
 				return getName();
+			case SGraphPackage.STATECHART__DOCUMENTATION:
+				return getDocumentation();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -313,6 +358,9 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 			case SGraphPackage.STATECHART__NAME:
 				setName((String)newValue);
 				return;
+			case SGraphPackage.STATECHART__DOCUMENTATION:
+				setDocumentation((String)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -337,6 +385,9 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 			case SGraphPackage.STATECHART__NAME:
 				setName(NAME_EDEFAULT);
 				return;
+			case SGraphPackage.STATECHART__DOCUMENTATION:
+				setDocumentation(DOCUMENTATION_EDEFAULT);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -361,6 +412,8 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 				return regions != null && !regions.isEmpty();
 			case SGraphPackage.STATECHART__NAME:
 				return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+			case SGraphPackage.STATECHART__DOCUMENTATION:
+				return DOCUMENTATION_EDEFAULT == null ? documentation != null : !DOCUMENTATION_EDEFAULT.equals(documentation);
 		}
 		return super.eIsSet(featureID);
 	}
@@ -398,6 +451,12 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (derivedFeatureID) {
+				case SGraphPackage.STATECHART__DOCUMENTATION: return BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -434,6 +493,12 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (baseFeatureID) {
+				case BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION: return SGraphPackage.STATECHART__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 
@@ -451,6 +516,8 @@ public class StatechartImpl extends SpecificationElementImpl implements Statecha
 		result.append(namespace);
 		result.append(", name: ");
 		result.append(name);
+		result.append(", documentation: ");
+		result.append(documentation);
 		result.append(')');
 		return result.toString();
 	}

+ 69 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/TransitionImpl.java

@@ -16,6 +16,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.util.EcoreUtil;
+import org.yakindu.base.base.BasePackage;
+import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.sct.model.sgraph.Effect;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
@@ -32,6 +34,7 @@ import org.yakindu.sct.model.sgraph.Vertex;
  * <ul>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getTrigger <em>Trigger</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getEffect <em>Effect</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getDocumentation <em>Documentation</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getTarget <em>Target</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getSource <em>Source</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl#getPriority <em>Priority</em>}</li>
@@ -68,6 +71,26 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 	 */
 	protected Effect effect;
 
+	/**
+	 * The default value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DOCUMENTATION_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDocumentation() <em>Documentation</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDocumentation()
+	 * @generated
+	 * @ordered
+	 */
+	protected String documentation = DOCUMENTATION_EDEFAULT;
+
 	/**
 	 * The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
 	 * <!-- begin-user-doc -->
@@ -249,6 +272,27 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.TRANSITION__EFFECT, newEffect, newEffect));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getDocumentation() {
+		return documentation;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDocumentation(String newDocumentation) {
+		String oldDocumentation = documentation;
+		documentation = newDocumentation;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.TRANSITION__DOCUMENTATION, oldDocumentation, documentation));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -449,6 +493,8 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 			case SGraphPackage.TRANSITION__EFFECT:
 				if (resolve) return getEffect();
 				return basicGetEffect();
+			case SGraphPackage.TRANSITION__DOCUMENTATION:
+				return getDocumentation();
 			case SGraphPackage.TRANSITION__TARGET:
 				if (resolve) return getTarget();
 				return basicGetTarget();
@@ -475,6 +521,9 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 			case SGraphPackage.TRANSITION__EFFECT:
 				setEffect((Effect)newValue);
 				return;
+			case SGraphPackage.TRANSITION__DOCUMENTATION:
+				setDocumentation((String)newValue);
+				return;
 			case SGraphPackage.TRANSITION__TARGET:
 				setTarget((Vertex)newValue);
 				return;
@@ -502,6 +551,9 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 			case SGraphPackage.TRANSITION__EFFECT:
 				setEffect((Effect)null);
 				return;
+			case SGraphPackage.TRANSITION__DOCUMENTATION:
+				setDocumentation(DOCUMENTATION_EDEFAULT);
+				return;
 			case SGraphPackage.TRANSITION__TARGET:
 				setTarget((Vertex)null);
 				return;
@@ -527,6 +579,8 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 				return trigger != null;
 			case SGraphPackage.TRANSITION__EFFECT:
 				return effect != null;
+			case SGraphPackage.TRANSITION__DOCUMENTATION:
+				return DOCUMENTATION_EDEFAULT == null ? documentation != null : !DOCUMENTATION_EDEFAULT.equals(documentation);
 			case SGraphPackage.TRANSITION__TARGET:
 				return target != null;
 			case SGraphPackage.TRANSITION__SOURCE:
@@ -551,6 +605,12 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (derivedFeatureID) {
+				case SGraphPackage.TRANSITION__DOCUMENTATION: return BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -568,6 +628,12 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 				default: return -1;
 			}
 		}
+		if (baseClass == DocumentedElement.class) {
+			switch (baseFeatureID) {
+				case BasePackage.DOCUMENTED_ELEMENT__DOCUMENTATION: return SGraphPackage.TRANSITION__DOCUMENTATION;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 
@@ -581,7 +647,9 @@ public class TransitionImpl extends SpecificationElementImpl implements Transiti
 		if (eIsProxy()) return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
-		result.append(" (priority: ");
+		result.append(" (documentation: ");
+		result.append(documentation);
+		result.append(", priority: ");
 		result.append(priority);
 		result.append(')');
 		return result.toString();

+ 19 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphAdapterFactory.java

@@ -14,6 +14,7 @@ import org.eclipse.emf.common.notify.Adapter;
 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.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.CompositeElement;
@@ -205,6 +206,10 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 				return createNamedElementAdapter();
 			}
 			@Override
+			public Adapter caseDocumentedElement(DocumentedElement object) {
+				return createDocumentedElementAdapter();
+			}
+			@Override
 			public Adapter defaultCase(EObject object) {
 				return createEObjectAdapter();
 			}
@@ -266,6 +271,20 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.base.DocumentedElement <em>Documented 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.base.DocumentedElement
+	 * @generated
+	 */
+	public Adapter createDocumentedElementAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.Region <em>Region</em>}'.
 	 * <!-- begin-user-doc -->

+ 19 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphSwitch.java

@@ -13,6 +13,7 @@ package org.yakindu.sct.model.sgraph.util;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
+import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.CompositeElement;
@@ -131,6 +132,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				T result = caseTransition(transition);
 				if (result == null) result = caseSpecificationElement(transition);
 				if (result == null) result = caseReaction(transition);
+				if (result == null) result = caseDocumentedElement(transition);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -176,6 +178,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseScopedElement(statechart);
 				if (result == null) result = caseCompositeElement(statechart);
 				if (result == null) result = caseNamedElement(statechart);
+				if (result == null) result = caseDocumentedElement(statechart);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -263,6 +266,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseScopedElement(state);
 				if (result == null) result = caseRegularState(state);
 				if (result == null) result = caseCompositeElement(state);
+				if (result == null) result = caseDocumentedElement(state);
 				if (result == null) result = caseVertex(state);
 				if (result == null) result = caseNamedElement(state);
 				if (result == null) result = defaultCase(theEObject);
@@ -337,6 +341,21 @@ public class SGraphSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Documented 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>Documented Element</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseDocumentedElement(DocumentedElement object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Region</em>'.
 	 * <!-- begin-user-doc -->