Browse Source

Namespace for scopedElement and Declaration linking

benjamin.schwertfeger@gmail.com 13 years ago
parent
commit
6a14f73797

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

@@ -44,6 +44,7 @@ _UI_Vertex___feature =
 _UI_Transition_source_feature = Source
 _UI_Transition_region_feature = Region
 _UI_Transition_target_feature = Target
+_UI_ScopedElement_namespace_feature = Namespace
 _UI_State_region_feature = Region
 _UI_Unknown_feature = Unspecified
 

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

@@ -1,112 +1,113 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
-    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
-    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
-  <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
-        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="ExactlyOneInitialState"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
-        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
-    <eAnnotations source="InjectMembers"/>
-    <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"
-        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
-        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="DisallowTrigger"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
-        containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
-        containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
-    <eLiterals name="initial" literal="INITIAL"/>
-    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
-    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
-        eType="#//Reaction" changeable="false" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
-        eType="#//Reaction" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Scope">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
-        eType="#//Declaration" containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
-        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
-        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
-        derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
-        eType="#//Scope" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Synchronization" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="NameIsNotEmpty"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
-        upperBound="-1" eType="#//Region" containment="true"/>
-    <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"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
+    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
+  <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
+        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="ExactlyOneInitialState"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
+        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
+    <eAnnotations source="InjectMembers"/>
+    <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"
+        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
+        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="DisallowTrigger"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
+        containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
+        containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
+    <eLiterals name="initial" literal="INITIAL"/>
+    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
+    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
+        eType="#//Reaction" changeable="false" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
+        eType="#//Reaction" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Scope">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
+        eType="#//Declaration" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
+        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
+        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
+        derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
+        eType="#//Scope" containment="true"/>
+    <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="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="NameIsNotEmpty"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
+        upperBound="-1" eType="#//Region" containment="true"/>
+    <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"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
+</ecore:EPackage>

+ 2 - 0
plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel

@@ -63,6 +63,7 @@
     </genClasses>
     <genClasses image="false" ecoreClass="sgraph.ecore#//ScopedElement">
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference sgraph.ecore#//ScopedElement/scopes"/>
+      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sgraph.ecore#//ScopedElement/namespace"/>
     </genClasses>
     <genClasses ecoreClass="sgraph.ecore#//Synchronization"/>
     <genClasses ecoreClass="sgraph.ecore#//State">
@@ -72,6 +73,7 @@
       <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute sgraph.ecore#//State/submachine"/>
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute sgraph.ecore#//State/simple"/>
       <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute sgraph.ecore#//State/composite"/>
+      <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute sgraph.ecore#//State/leaf"/>
     </genClasses>
     <genClasses ecoreClass="sgraph.ecore#//Statement"/>
   </genPackages>

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

@@ -0,0 +1,11 @@
+# Copyright (c) 2011 committers of YAKINDU and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# Contributors:
+# committers of YAKINDU - initial API and implementation
+# 
+
+pluginName = SGraph Model
+providerName = www.example.org

+ 57 - 11
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java

@@ -670,6 +670,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int STATECHART__SCOPES = NAMED_ELEMENT_FEATURE_COUNT + 3;
 
+	/**
+	 * The feature id for the '<em><b>Namespace</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATECHART__NAMESPACE = NAMED_ELEMENT_FEATURE_COUNT + 4;
+
 	/**
 	 * The feature id for the '<em><b>Regions</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
@@ -677,7 +686,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART__REGIONS = NAMED_ELEMENT_FEATURE_COUNT + 4;
+	int STATECHART__REGIONS = NAMED_ELEMENT_FEATURE_COUNT + 5;
 
 	/**
 	 * The number of structural features of the '<em>Statechart</em>' class.
@@ -686,7 +695,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATECHART_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 5;
+	int STATECHART_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.EntryImpl <em>Entry</em>}' class.
@@ -984,6 +993,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int SCOPED_ELEMENT__SCOPES = 0;
 
+	/**
+	 * The feature id for the '<em><b>Namespace</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int SCOPED_ELEMENT__NAMESPACE = 1;
+
 	/**
 	 * The number of structural features of the '<em>Scoped Element</em>' class.
 	 * <!-- begin-user-doc -->
@@ -991,7 +1009,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int SCOPED_ELEMENT_FEATURE_COUNT = 1;
+	int SCOPED_ELEMENT_FEATURE_COUNT = 2;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.SynchronizationImpl <em>Synchronization</em>}' class.
@@ -1120,6 +1138,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int STATE__SCOPES = VERTEX_FEATURE_COUNT + 3;
 
+	/**
+	 * The feature id for the '<em><b>Namespace</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int STATE__NAMESPACE = VERTEX_FEATURE_COUNT + 4;
+
 	/**
 	 * The feature id for the '<em><b>Sub Regions</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
@@ -1127,7 +1154,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUB_REGIONS = VERTEX_FEATURE_COUNT + 4;
+	int STATE__SUB_REGIONS = VERTEX_FEATURE_COUNT + 5;
 
 	/**
 	 * The feature id for the '<em><b>Orthogonal</b></em>' attribute.
@@ -1136,7 +1163,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__ORTHOGONAL = VERTEX_FEATURE_COUNT + 5;
+	int STATE__ORTHOGONAL = VERTEX_FEATURE_COUNT + 6;
 
 	/**
 	 * The feature id for the '<em><b>Substatechart</b></em>' reference.
@@ -1145,7 +1172,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBSTATECHART = VERTEX_FEATURE_COUNT + 6;
+	int STATE__SUBSTATECHART = VERTEX_FEATURE_COUNT + 7;
 
 	/**
 	 * The feature id for the '<em><b>Submachine</b></em>' attribute.
@@ -1154,7 +1181,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBMACHINE = VERTEX_FEATURE_COUNT + 7;
+	int STATE__SUBMACHINE = VERTEX_FEATURE_COUNT + 8;
 
 	/**
 	 * The feature id for the '<em><b>Simple</b></em>' attribute.
@@ -1163,7 +1190,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SIMPLE = VERTEX_FEATURE_COUNT + 8;
+	int STATE__SIMPLE = VERTEX_FEATURE_COUNT + 9;
 
 	/**
 	 * The feature id for the '<em><b>Composite</b></em>' attribute.
@@ -1172,7 +1199,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__COMPOSITE = VERTEX_FEATURE_COUNT + 9;
+	int STATE__COMPOSITE = VERTEX_FEATURE_COUNT + 10;
 
 	/**
 	 * The feature id for the '<em><b>Leaf</b></em>' attribute.
@@ -1181,7 +1208,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__LEAF = VERTEX_FEATURE_COUNT + 10;
+	int STATE__LEAF = VERTEX_FEATURE_COUNT + 11;
 
 	/**
 	 * The number of structural features of the '<em>State</em>' class.
@@ -1190,7 +1217,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int STATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 11;
+	int STATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 12;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.StatementImpl <em>Statement</em>}' class.
@@ -1749,6 +1776,17 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EReference getScopedElement_Scopes();
 
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sgraph.ScopedElement#getNamespace <em>Namespace</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Namespace</em>'.
+	 * @see org.yakindu.sct.model.sgraph.ScopedElement#getNamespace()
+	 * @see #getScopedElement()
+	 * @generated
+	 */
+	EAttribute getScopedElement_Namespace();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Synchronization <em>Synchronization</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2237,6 +2275,14 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EReference SCOPED_ELEMENT__SCOPES = eINSTANCE.getScopedElement_Scopes();
 
+		/**
+		 * The meta object literal for the '<em><b>Namespace</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute SCOPED_ELEMENT__NAMESPACE = eINSTANCE.getScopedElement_Namespace();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.SynchronizationImpl <em>Synchronization</em>}' class.
 		 * <!-- begin-user-doc -->

+ 27 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/ScopedElement.java

@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.EObject;
  * The following features are supported:
  * <ul>
  *   <li>{@link org.yakindu.sct.model.sgraph.ScopedElement#getScopes <em>Scopes</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.ScopedElement#getNamespace <em>Namespace</em>}</li>
  * </ul>
  * </p>
  *
@@ -53,4 +54,30 @@ public interface ScopedElement extends EObject {
 	 */
 	EList<Scope> getScopes();
 
+	/**
+	 * Returns the value of the '<em><b>Namespace</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Namespace</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Namespace</em>' attribute.
+	 * @see #setNamespace(String)
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getScopedElement_Namespace()
+	 * @model
+	 * @generated
+	 */
+	String getNamespace();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sgraph.ScopedElement#getNamespace <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Namespace</em>' attribute.
+	 * @see #getNamespace()
+	 * @generated
+	 */
+	void setNamespace(String value);
+
 } // ScopedElement

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

@@ -812,6 +812,15 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
         return (EReference)getScopedElement().getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getScopedElement_Namespace() {
+        return (EAttribute)getScopedElement().getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 70 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/ScopedElementImpl.java

@@ -12,10 +12,12 @@ package org.yakindu.sct.model.sgraph.impl;
 
 import java.util.Collection;
 
+import org.eclipse.emf.common.notify.Notification;
 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.ENotificationImpl;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.InternalEList;
@@ -31,6 +33,7 @@ import org.yakindu.sct.model.sgraph.ScopedElement;
  * The following features are implemented:
  * <ul>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.ScopedElementImpl#getScopes <em>Scopes</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.ScopedElementImpl#getNamespace <em>Namespace</em>}</li>
  * </ul>
  * </p>
  *
@@ -54,6 +57,26 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 	 */
 	protected EList<Scope> scopes;
 
+	/**
+	 * The default value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAMESPACE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected String namespace = NAMESPACE_EDEFAULT;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -85,6 +108,27 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 		return scopes;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getNamespace() {
+		return namespace;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setNamespace(String newNamespace) {
+		String oldNamespace = namespace;
+		namespace = newNamespace;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.SCOPED_ELEMENT__NAMESPACE, oldNamespace, namespace));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -109,6 +153,8 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 		switch (featureID) {
 			case SGraphPackage.SCOPED_ELEMENT__SCOPES:
 				return getScopes();
+			case SGraphPackage.SCOPED_ELEMENT__NAMESPACE:
+				return getNamespace();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -126,6 +172,9 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 				getScopes().clear();
 				getScopes().addAll((Collection<? extends Scope>)newValue);
 				return;
+			case SGraphPackage.SCOPED_ELEMENT__NAMESPACE:
+				setNamespace((String)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -141,6 +190,9 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 			case SGraphPackage.SCOPED_ELEMENT__SCOPES:
 				getScopes().clear();
 				return;
+			case SGraphPackage.SCOPED_ELEMENT__NAMESPACE:
+				setNamespace(NAMESPACE_EDEFAULT);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -155,8 +207,26 @@ public abstract class ScopedElementImpl extends EObjectImpl implements ScopedEle
 		switch (featureID) {
 			case SGraphPackage.SCOPED_ELEMENT__SCOPES:
 				return scopes != null && !scopes.isEmpty();
+			case SGraphPackage.SCOPED_ELEMENT__NAMESPACE:
+				return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace);
 		}
 		return super.eIsSet(featureID);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (namespace: ");
+		result.append(namespace);
+		result.append(')');
+		return result.toString();
+	}
+
 } //ScopedElementImpl

+ 194 - 208
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StateImpl.java

@@ -37,44 +37,33 @@ import org.yakindu.sct.model.sgraph.Statechart;
  * <p>
  * The following features are implemented:
  * <ul>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getExpression <em>
- * Expression</em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getReactions <em>
- * Reactions</em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getLocalReactions <em>
- * Local Reactions</em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getScopes <em>Scopes
- * </em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubRegions <em>Sub
- * Regions</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#isSubmachine <em>
- * Submachine</em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isSimple <em>Simple
- * </em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isComposite <em>
- * Composite</em>}</li>
- * <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isLeaf <em>Leaf</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getExpression <em>Expression</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getReactions <em>Reactions</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getLocalReactions <em>Local Reactions</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getScopes <em>Scopes</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getNamespace <em>Namespace</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#getSubRegions <em>Sub Regions</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#isSubmachine <em>Submachine</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isSimple <em>Simple</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isComposite <em>Composite</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.StateImpl#isLeaf <em>Leaf</em>}</li>
  * </ul>
  * </p>
- * 
+ *
  * @generated
  */
 public class StateImpl extends VertexImpl implements State {
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
 
 	/**
-	 * The default value of the '{@link #getExpression() <em>Expression</em>}'
-	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The default value of the '{@link #getExpression() <em>Expression</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getExpression()
 	 * @generated
 	 * @ordered
@@ -82,9 +71,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected static final String EXPRESSION_EDEFAULT = null;
 
 	/**
-	 * The cached value of the '{@link #getExpression() <em>Expression</em>}'
-	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The cached value of the '{@link #getExpression() <em>Expression</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getExpression()
 	 * @generated
 	 * @ordered
@@ -92,9 +80,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected String expression = EXPRESSION_EDEFAULT;
 
 	/**
-	 * The cached value of the '{@link #getReactions() <em>Reactions</em>}'
-	 * reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The cached value of the '{@link #getReactions() <em>Reactions</em>}' reference list.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getReactions()
 	 * @generated
 	 * @ordered
@@ -113,9 +100,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected EList<Reaction> localReactions;
 
 	/**
-	 * The cached value of the '{@link #getScopes() <em>Scopes</em>}'
-	 * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The cached value of the '{@link #getScopes() <em>Scopes</em>}' containment reference list.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getScopes()
 	 * @generated
 	 * @ordered
@@ -123,9 +109,28 @@ public class StateImpl extends VertexImpl implements State {
 	protected EList<Scope> scopes;
 
 	/**
-	 * The cached value of the '{@link #getSubRegions() <em>Sub Regions</em>}'
-	 * containment reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The default value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAMESPACE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected String namespace = NAMESPACE_EDEFAULT;
+
+	/**
+	 * The cached value of the '{@link #getSubRegions() <em>Sub Regions</em>}' containment reference list.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #getSubRegions()
 	 * @generated
 	 * @ordered
@@ -133,9 +138,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected EList<Region> subRegions;
 
 	/**
-	 * The default value of the '{@link #isOrthogonal() <em>Orthogonal</em>}'
-	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The default value of the '{@link #isOrthogonal() <em>Orthogonal</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #isOrthogonal()
 	 * @generated
 	 * @ordered
@@ -143,10 +147,9 @@ public class StateImpl extends VertexImpl implements State {
 	protected static final boolean ORTHOGONAL_EDEFAULT = false;
 
 	/**
-	 * The cached value of the '{@link #getSubstatechart()
-	 * <em>Substatechart</em>}' reference. <!-- begin-user-doc --> <!--
+	 * The cached value of the '{@link #getSubstatechart() <em>Substatechart</em>}' reference.
+	 * <!-- begin-user-doc --> <!--
 	 * end-user-doc -->
-	 * 
 	 * @see #getSubstatechart()
 	 * @generated
 	 * @ordered
@@ -154,9 +157,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected Statechart substatechart;
 
 	/**
-	 * The default value of the '{@link #isSubmachine() <em>Submachine</em>}'
-	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The default value of the '{@link #isSubmachine() <em>Submachine</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #isSubmachine()
 	 * @generated
 	 * @ordered
@@ -166,7 +168,6 @@ public class StateImpl extends VertexImpl implements State {
 	/**
 	 * The default value of the '{@link #isSimple() <em>Simple</em>}' attribute.
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @see #isSimple()
 	 * @generated
 	 * @ordered
@@ -174,9 +175,8 @@ public class StateImpl extends VertexImpl implements State {
 	protected static final boolean SIMPLE_EDEFAULT = false;
 
 	/**
-	 * The default value of the '{@link #isComposite() <em>Composite</em>}'
-	 * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The default value of the '{@link #isComposite() <em>Composite</em>}' attribute.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see #isComposite()
 	 * @generated
 	 * @ordered
@@ -186,7 +186,6 @@ public class StateImpl extends VertexImpl implements State {
 	/**
 	 * The default value of the '{@link #isLeaf() <em>Leaf</em>}' attribute.
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @see #isLeaf()
 	 * @generated
 	 * @ordered
@@ -195,7 +194,6 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	protected StateImpl() {
@@ -204,7 +202,6 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
@@ -214,7 +211,6 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public String getExpression() {
@@ -223,65 +219,76 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public void setExpression(String newExpression) {
 		String oldExpression = expression;
 		expression = newExpression;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET,
-					SGraphPackage.STATE__EXPRESSION, oldExpression, expression));
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATE__EXPRESSION, oldExpression, expression));
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public EList<Reaction> getReactions() {
 		if (reactions == null) {
-			reactions = new EObjectResolvingEList<Reaction>(Reaction.class,
-					this, SGraphPackage.STATE__REACTIONS);
+			reactions = new EObjectResolvingEList<Reaction>(Reaction.class, this, SGraphPackage.STATE__REACTIONS);
 		}
 		return reactions;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public EList<Reaction> getLocalReactions() {
 		if (localReactions == null) {
-			localReactions = new EObjectContainmentEList<Reaction>(
-					Reaction.class, this, SGraphPackage.STATE__LOCAL_REACTIONS);
+			localReactions = new EObjectContainmentEList<Reaction>(Reaction.class, this, SGraphPackage.STATE__LOCAL_REACTIONS);
 		}
 		return localReactions;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public EList<Scope> getScopes() {
 		if (scopes == null) {
-			scopes = new EObjectContainmentEList<Scope>(Scope.class, this,
-					SGraphPackage.STATE__SCOPES);
+			scopes = new EObjectContainmentEList<Scope>(Scope.class, this, SGraphPackage.STATE__SCOPES);
 		}
 		return scopes;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getNamespace() {
+		return namespace;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setNamespace(String newNamespace) {
+		String oldNamespace = namespace;
+		namespace = newNamespace;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATE__NAMESPACE, oldNamespace, namespace));
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public EList<Region> getSubRegions() {
 		if (subRegions == null) {
-			subRegions = new EObjectContainmentEList<Region>(Region.class,
-					this, SGraphPackage.STATE__SUB_REGIONS);
+			subRegions = new EObjectContainmentEList<Region>(Region.class, this, SGraphPackage.STATE__SUB_REGIONS);
 		}
 		return subRegions;
 	}
@@ -297,18 +304,15 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public Statechart getSubstatechart() {
 		if (substatechart != null && substatechart.eIsProxy()) {
-			InternalEObject oldSubstatechart = (InternalEObject) substatechart;
-			substatechart = (Statechart) eResolveProxy(oldSubstatechart);
+			InternalEObject oldSubstatechart = (InternalEObject)substatechart;
+			substatechart = (Statechart)eResolveProxy(oldSubstatechart);
 			if (substatechart != oldSubstatechart) {
 				if (eNotificationRequired())
-					eNotify(new ENotificationImpl(this, Notification.RESOLVE,
-							SGraphPackage.STATE__SUBSTATECHART,
-							oldSubstatechart, substatechart));
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, SGraphPackage.STATE__SUBSTATECHART, oldSubstatechart, substatechart));
 			}
 		}
 		return substatechart;
@@ -316,7 +320,6 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public Statechart basicGetSubstatechart() {
@@ -325,16 +328,13 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public void setSubstatechart(Statechart newSubstatechart) {
 		Statechart oldSubstatechart = substatechart;
 		substatechart = newSubstatechart;
 		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET,
-					SGraphPackage.STATE__SUBSTATECHART, oldSubstatechart,
-					substatechart));
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATE__SUBSTATECHART, oldSubstatechart, substatechart));
 	}
 
 	/**
@@ -382,186 +382,179 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public NotificationChain eInverseRemove(InternalEObject otherEnd,
 			int featureID, NotificationChain msgs) {
 		switch (featureID) {
-		case SGraphPackage.STATE__LOCAL_REACTIONS:
-			return ((InternalEList<?>) getLocalReactions()).basicRemove(
-					otherEnd, msgs);
-		case SGraphPackage.STATE__SCOPES:
-			return ((InternalEList<?>) getScopes()).basicRemove(otherEnd, msgs);
-		case SGraphPackage.STATE__SUB_REGIONS:
-			return ((InternalEList<?>) getSubRegions()).basicRemove(otherEnd,
-					msgs);
+			case SGraphPackage.STATE__LOCAL_REACTIONS:
+				return ((InternalEList<?>)getLocalReactions()).basicRemove(otherEnd, msgs);
+			case SGraphPackage.STATE__SCOPES:
+				return ((InternalEList<?>)getScopes()).basicRemove(otherEnd, msgs);
+			case SGraphPackage.STATE__SUB_REGIONS:
+				return ((InternalEList<?>)getSubRegions()).basicRemove(otherEnd, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
-		case SGraphPackage.STATE__EXPRESSION:
-			return getExpression();
-		case SGraphPackage.STATE__REACTIONS:
-			return getReactions();
-		case SGraphPackage.STATE__LOCAL_REACTIONS:
-			return getLocalReactions();
-		case SGraphPackage.STATE__SCOPES:
-			return getScopes();
-		case SGraphPackage.STATE__SUB_REGIONS:
-			return getSubRegions();
-		case SGraphPackage.STATE__ORTHOGONAL:
-			return isOrthogonal();
-		case SGraphPackage.STATE__SUBSTATECHART:
-			if (resolve)
-				return getSubstatechart();
-			return basicGetSubstatechart();
-		case SGraphPackage.STATE__SUBMACHINE:
-			return isSubmachine();
-		case SGraphPackage.STATE__SIMPLE:
-			return isSimple();
-		case SGraphPackage.STATE__COMPOSITE:
-			return isComposite();
-		case SGraphPackage.STATE__LEAF:
-			return isLeaf();
+			case SGraphPackage.STATE__EXPRESSION:
+				return getExpression();
+			case SGraphPackage.STATE__REACTIONS:
+				return getReactions();
+			case SGraphPackage.STATE__LOCAL_REACTIONS:
+				return getLocalReactions();
+			case SGraphPackage.STATE__SCOPES:
+				return getScopes();
+			case SGraphPackage.STATE__NAMESPACE:
+				return getNamespace();
+			case SGraphPackage.STATE__SUB_REGIONS:
+				return getSubRegions();
+			case SGraphPackage.STATE__ORTHOGONAL:
+				return isOrthogonal();
+			case SGraphPackage.STATE__SUBSTATECHART:
+				if (resolve) return getSubstatechart();
+				return basicGetSubstatechart();
+			case SGraphPackage.STATE__SUBMACHINE:
+				return isSubmachine();
+			case SGraphPackage.STATE__SIMPLE:
+				return isSimple();
+			case SGraphPackage.STATE__COMPOSITE:
+				return isComposite();
+			case SGraphPackage.STATE__LEAF:
+				return isLeaf();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@SuppressWarnings("unchecked")
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
-		case SGraphPackage.STATE__EXPRESSION:
-			setExpression((String) newValue);
-			return;
-		case SGraphPackage.STATE__LOCAL_REACTIONS:
-			getLocalReactions().clear();
-			getLocalReactions().addAll(
-					(Collection<? extends Reaction>) newValue);
-			return;
-		case SGraphPackage.STATE__SCOPES:
-			getScopes().clear();
-			getScopes().addAll((Collection<? extends Scope>) newValue);
-			return;
-		case SGraphPackage.STATE__SUB_REGIONS:
-			getSubRegions().clear();
-			getSubRegions().addAll((Collection<? extends Region>) newValue);
-			return;
-		case SGraphPackage.STATE__SUBSTATECHART:
-			setSubstatechart((Statechart) newValue);
-			return;
+			case SGraphPackage.STATE__EXPRESSION:
+				setExpression((String)newValue);
+				return;
+			case SGraphPackage.STATE__LOCAL_REACTIONS:
+				getLocalReactions().clear();
+				getLocalReactions().addAll((Collection<? extends Reaction>)newValue);
+				return;
+			case SGraphPackage.STATE__SCOPES:
+				getScopes().clear();
+				getScopes().addAll((Collection<? extends Scope>)newValue);
+				return;
+			case SGraphPackage.STATE__NAMESPACE:
+				setNamespace((String)newValue);
+				return;
+			case SGraphPackage.STATE__SUB_REGIONS:
+				getSubRegions().clear();
+				getSubRegions().addAll((Collection<? extends Region>)newValue);
+				return;
+			case SGraphPackage.STATE__SUBSTATECHART:
+				setSubstatechart((Statechart)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
-		case SGraphPackage.STATE__EXPRESSION:
-			setExpression(EXPRESSION_EDEFAULT);
-			return;
-		case SGraphPackage.STATE__LOCAL_REACTIONS:
-			getLocalReactions().clear();
-			return;
-		case SGraphPackage.STATE__SCOPES:
-			getScopes().clear();
-			return;
-		case SGraphPackage.STATE__SUB_REGIONS:
-			getSubRegions().clear();
-			return;
-		case SGraphPackage.STATE__SUBSTATECHART:
-			setSubstatechart((Statechart) null);
-			return;
+			case SGraphPackage.STATE__EXPRESSION:
+				setExpression(EXPRESSION_EDEFAULT);
+				return;
+			case SGraphPackage.STATE__LOCAL_REACTIONS:
+				getLocalReactions().clear();
+				return;
+			case SGraphPackage.STATE__SCOPES:
+				getScopes().clear();
+				return;
+			case SGraphPackage.STATE__NAMESPACE:
+				setNamespace(NAMESPACE_EDEFAULT);
+				return;
+			case SGraphPackage.STATE__SUB_REGIONS:
+				getSubRegions().clear();
+				return;
+			case SGraphPackage.STATE__SUBSTATECHART:
+				setSubstatechart((Statechart)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
-		case SGraphPackage.STATE__EXPRESSION:
-			return EXPRESSION_EDEFAULT == null ? expression != null
-					: !EXPRESSION_EDEFAULT.equals(expression);
-		case SGraphPackage.STATE__REACTIONS:
-			return reactions != null && !reactions.isEmpty();
-		case SGraphPackage.STATE__LOCAL_REACTIONS:
-			return localReactions != null && !localReactions.isEmpty();
-		case SGraphPackage.STATE__SCOPES:
-			return scopes != null && !scopes.isEmpty();
-		case SGraphPackage.STATE__SUB_REGIONS:
-			return subRegions != null && !subRegions.isEmpty();
-		case SGraphPackage.STATE__ORTHOGONAL:
-			return isOrthogonal() != ORTHOGONAL_EDEFAULT;
-		case SGraphPackage.STATE__SUBSTATECHART:
-			return substatechart != null;
-		case SGraphPackage.STATE__SUBMACHINE:
-			return isSubmachine() != SUBMACHINE_EDEFAULT;
-		case SGraphPackage.STATE__SIMPLE:
-			return isSimple() != SIMPLE_EDEFAULT;
-		case SGraphPackage.STATE__COMPOSITE:
-			return isComposite() != COMPOSITE_EDEFAULT;
-		case SGraphPackage.STATE__LEAF:
-			return isLeaf() != LEAF_EDEFAULT;
+			case SGraphPackage.STATE__EXPRESSION:
+				return EXPRESSION_EDEFAULT == null ? expression != null : !EXPRESSION_EDEFAULT.equals(expression);
+			case SGraphPackage.STATE__REACTIONS:
+				return reactions != null && !reactions.isEmpty();
+			case SGraphPackage.STATE__LOCAL_REACTIONS:
+				return localReactions != null && !localReactions.isEmpty();
+			case SGraphPackage.STATE__SCOPES:
+				return scopes != null && !scopes.isEmpty();
+			case SGraphPackage.STATE__NAMESPACE:
+				return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace);
+			case SGraphPackage.STATE__SUB_REGIONS:
+				return subRegions != null && !subRegions.isEmpty();
+			case SGraphPackage.STATE__ORTHOGONAL:
+				return isOrthogonal() != ORTHOGONAL_EDEFAULT;
+			case SGraphPackage.STATE__SUBSTATECHART:
+				return substatechart != null;
+			case SGraphPackage.STATE__SUBMACHINE:
+				return isSubmachine() != SUBMACHINE_EDEFAULT;
+			case SGraphPackage.STATE__SIMPLE:
+				return isSimple() != SIMPLE_EDEFAULT;
+			case SGraphPackage.STATE__COMPOSITE:
+				return isComposite() != COMPOSITE_EDEFAULT;
+			case SGraphPackage.STATE__LEAF:
+				return isLeaf() != LEAF_EDEFAULT;
 		}
 		return super.eIsSet(featureID);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
 		if (baseClass == ExpressionElement.class) {
 			switch (derivedFeatureID) {
-			case SGraphPackage.STATE__EXPRESSION:
-				return SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION;
-			default:
-				return -1;
+				case SGraphPackage.STATE__EXPRESSION: return SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION;
+				default: return -1;
 			}
 		}
 		if (baseClass == ReactiveElement.class) {
 			switch (derivedFeatureID) {
-			case SGraphPackage.STATE__REACTIONS:
-				return SGraphPackage.REACTIVE_ELEMENT__REACTIONS;
-			case SGraphPackage.STATE__LOCAL_REACTIONS:
-				return SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS;
-			default:
-				return -1;
+				case SGraphPackage.STATE__REACTIONS: return SGraphPackage.REACTIVE_ELEMENT__REACTIONS;
+				case SGraphPackage.STATE__LOCAL_REACTIONS: return SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS;
+				default: return -1;
 			}
 		}
 		if (baseClass == ScopedElement.class) {
 			switch (derivedFeatureID) {
-			case SGraphPackage.STATE__SCOPES:
-				return SGraphPackage.SCOPED_ELEMENT__SCOPES;
-			default:
-				return -1;
+				case SGraphPackage.STATE__SCOPES: return SGraphPackage.SCOPED_ELEMENT__SCOPES;
+				case SGraphPackage.STATE__NAMESPACE: return SGraphPackage.SCOPED_ELEMENT__NAMESPACE;
+				default: return -1;
 			}
 		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
@@ -569,35 +562,28 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
 		if (baseClass == ExpressionElement.class) {
 			switch (baseFeatureID) {
-			case SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION:
-				return SGraphPackage.STATE__EXPRESSION;
-			default:
-				return -1;
+				case SGraphPackage.EXPRESSION_ELEMENT__EXPRESSION: return SGraphPackage.STATE__EXPRESSION;
+				default: return -1;
 			}
 		}
 		if (baseClass == ReactiveElement.class) {
 			switch (baseFeatureID) {
-			case SGraphPackage.REACTIVE_ELEMENT__REACTIONS:
-				return SGraphPackage.STATE__REACTIONS;
-			case SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS:
-				return SGraphPackage.STATE__LOCAL_REACTIONS;
-			default:
-				return -1;
+				case SGraphPackage.REACTIVE_ELEMENT__REACTIONS: return SGraphPackage.STATE__REACTIONS;
+				case SGraphPackage.REACTIVE_ELEMENT__LOCAL_REACTIONS: return SGraphPackage.STATE__LOCAL_REACTIONS;
+				default: return -1;
 			}
 		}
 		if (baseClass == ScopedElement.class) {
 			switch (baseFeatureID) {
-			case SGraphPackage.SCOPED_ELEMENT__SCOPES:
-				return SGraphPackage.STATE__SCOPES;
-			default:
-				return -1;
+				case SGraphPackage.SCOPED_ELEMENT__SCOPES: return SGraphPackage.STATE__SCOPES;
+				case SGraphPackage.SCOPED_ELEMENT__NAMESPACE: return SGraphPackage.STATE__NAMESPACE;
+				default: return -1;
 			}
 		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
@@ -605,17 +591,17 @@ public class StateImpl extends VertexImpl implements State {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	public String toString() {
-		if (eIsProxy())
-			return super.toString();
+		if (eIsProxy()) return super.toString();
 
 		StringBuffer result = new StringBuffer(super.toString());
 		result.append(" (expression: ");
 		result.append(expression);
+		result.append(", namespace: ");
+		result.append(namespace);
 		result.append(')');
 		return result.toString();
 	}

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

@@ -41,6 +41,7 @@ import org.yakindu.sct.model.sgraph.Statechart;
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getReactions <em>Reactions</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getLocalReactions <em>Local Reactions</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.StatechartImpl#getScopes <em>Scopes</em>}</li>
+ *   <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>
  * </ul>
  * </p>
@@ -105,6 +106,26 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 	 */
 	protected EList<Scope> scopes;
 
+	/**
+	 * The default value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String NAMESPACE_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getNamespace() <em>Namespace</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getNamespace()
+	 * @generated
+	 * @ordered
+	 */
+	protected String namespace = NAMESPACE_EDEFAULT;
+
 	/**
 	 * The cached value of the '{@link #getRegions() <em>Regions</em>}' containment reference list.
 	 * <!-- begin-user-doc -->
@@ -191,6 +212,27 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 		return scopes;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getNamespace() {
+		return namespace;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setNamespace(String newNamespace) {
+		String oldNamespace = namespace;
+		namespace = newNamespace;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.STATECHART__NAMESPACE, oldNamespace, namespace));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -237,6 +279,8 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 				return getLocalReactions();
 			case SGraphPackage.STATECHART__SCOPES:
 				return getScopes();
+			case SGraphPackage.STATECHART__NAMESPACE:
+				return getNamespace();
 			case SGraphPackage.STATECHART__REGIONS:
 				return getRegions();
 		}
@@ -263,6 +307,9 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 				getScopes().clear();
 				getScopes().addAll((Collection<? extends Scope>)newValue);
 				return;
+			case SGraphPackage.STATECHART__NAMESPACE:
+				setNamespace((String)newValue);
+				return;
 			case SGraphPackage.STATECHART__REGIONS:
 				getRegions().clear();
 				getRegions().addAll((Collection<? extends Region>)newValue);
@@ -288,6 +335,9 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 			case SGraphPackage.STATECHART__SCOPES:
 				getScopes().clear();
 				return;
+			case SGraphPackage.STATECHART__NAMESPACE:
+				setNamespace(NAMESPACE_EDEFAULT);
+				return;
 			case SGraphPackage.STATECHART__REGIONS:
 				getRegions().clear();
 				return;
@@ -311,6 +361,8 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 				return localReactions != null && !localReactions.isEmpty();
 			case SGraphPackage.STATECHART__SCOPES:
 				return scopes != null && !scopes.isEmpty();
+			case SGraphPackage.STATECHART__NAMESPACE:
+				return NAMESPACE_EDEFAULT == null ? namespace != null : !NAMESPACE_EDEFAULT.equals(namespace);
 			case SGraphPackage.STATECHART__REGIONS:
 				return regions != null && !regions.isEmpty();
 		}
@@ -340,6 +392,7 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 		if (baseClass == ScopedElement.class) {
 			switch (derivedFeatureID) {
 				case SGraphPackage.STATECHART__SCOPES: return SGraphPackage.SCOPED_ELEMENT__SCOPES;
+				case SGraphPackage.STATECHART__NAMESPACE: return SGraphPackage.SCOPED_ELEMENT__NAMESPACE;
 				default: return -1;
 			}
 		}
@@ -369,6 +422,7 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 		if (baseClass == ScopedElement.class) {
 			switch (baseFeatureID) {
 				case SGraphPackage.SCOPED_ELEMENT__SCOPES: return SGraphPackage.STATECHART__SCOPES;
+				case SGraphPackage.SCOPED_ELEMENT__NAMESPACE: return SGraphPackage.STATECHART__NAMESPACE;
 				default: return -1;
 			}
 		}
@@ -387,6 +441,8 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 		StringBuffer result = new StringBuffer(super.toString());
 		result.append(" (expression: ");
 		result.append(expression);
+		result.append(", namespace: ");
+		result.append(namespace);
 		result.append(')');
 		return result.toString();
 	}

+ 112 - 111
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/sgraph.ecore

@@ -1,111 +1,112 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
-    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
-    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
-  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
-        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
-        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="ExactlyOneInitialState"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
-        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
-    <eAnnotations source="InjectMembers"/>
-    <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"
-        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
-        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="DisallowTrigger"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
-  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
-        containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
-        containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
-    <eLiterals name="initial" literal="INITIAL"/>
-    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
-    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
-        eType="#//Reaction" changeable="false" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
-        eType="#//Reaction" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="Scope">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
-        eType="#//Declaration" containment="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
-        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
-        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
-        derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
-        eType="#//Scope" containment="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Synchronization" eSuperTypes="#//Pseudostate"/>
-  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
-    <eAnnotations source="InjectMembers"/>
-    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
-      <details key="constraints" value="NameIsNotEmpty"/>
-    </eAnnotations>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
-        upperBound="-1" eType="#//Region" containment="true"/>
-    <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"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
-        changeable="false" volatile="true" transient="true" derived="true"/>
-  </eClassifiers>
-  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
-</ecore:EPackage>
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="sgraph"
+    nsURI="http://www.yakindu.org/sct/2.0.0" nsPrefix="sgraph">
+  <eClassifiers xsi:type="ecore:EClass" name="Pseudostate" abstract="true" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Vertex" abstract="true" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="IncomingTransitionCount OutgoingTransitionCount"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="parentRegion" ordered="false"
+        lowerBound="1" eType="#//Region" eOpposite="#//Region/vertices"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" eOpposite="#//Transition/target"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" ordered="false"
+        upperBound="-1" eType="#//Transition" containment="true" eOpposite="#//Transition/source"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Region" eSuperTypes="#//NamedElement">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="ExactlyOneInitialState"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="vertices" ordered="false"
+        upperBound="-1" eType="#//Vertex" containment="true" eOpposite="#//Vertex/parentRegion"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
+    <eAnnotations source="InjectMembers"/>
+    <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"
+        lowerBound="1" eType="#//Vertex" eOpposite="#//Vertex/outgoingTransitions"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="priority" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="FinalState" eSuperTypes="#//Vertex"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Variable" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Junction" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Event" abstract="true" eSuperTypes="#//Declaration"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Choice" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" ordered="false"
+        lowerBound="1" upperBound="-1" eType="#//Region" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Entry" eSuperTypes="#//Pseudostate">
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="DisallowTrigger"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//EntryKind"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Trigger" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Effect" abstract="true"/>
+  <eClassifiers xsi:type="ecore:EClass" name="ExpressionElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="expression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Declaration" abstract="true" eSuperTypes="#//NamedElement"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Reaction" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="trigger" eType="#//Trigger"
+        containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="effect" eType="#//Effect"
+        containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EEnum" name="EntryKind">
+    <eLiterals name="initial" literal="INITIAL"/>
+    <eLiterals name="shallowHistory" value="1" literal="SHALLOW_HISTORY"/>
+    <eLiterals name="deepHistory" value="2" literal="DEEP_HISTORY"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
+        eType="#//Reaction" changeable="false" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
+        eType="#//Reaction" containment="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
+  <eClassifiers xsi:type="ecore:EClass" name="Scope">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1"
+        eType="#//Declaration" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="events" upperBound="-1"
+        eType="#//Event" changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
+        upperBound="-1" eType="#//Variable" changeable="false" volatile="true" transient="true"
+        derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
+        eType="#//Scope" containment="true"/>
+    <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="#//Vertex #//ExpressionElement #//ReactiveElement #//ScopedElement">
+    <eAnnotations source="InjectMembers"/>
+    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+      <details key="constraints" value="NameIsNotEmpty"/>
+    </eAnnotations>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="subRegions" ordered="false"
+        upperBound="-1" eType="#//Region" containment="true"/>
+    <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"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="simple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="composite" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="leaf" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+        changeable="false" volatile="true" transient="true" derived="true"/>
+  </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Statement"/>
+</ecore:EPackage>