Przeglądaj źródła

Added CompositeElement to SGraph MetaModel as region container

Andreas Mülder 13 lat temu
rodzic
commit
f1cb5b9584
20 zmienionych plików z 1398 dodań i 840 usunięć
  1. BIN
      plugins/org.yakindu.sct.model.sgraph.edit/icons/full/ctool16/CreateCompositeElement_regions_Region.gif
  2. 4 0
      plugins/org.yakindu.sct.model.sgraph.edit/plugin.properties
  3. 171 0
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/CompositeElementItemProvider.java
  4. 10 10
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/StateItemProvider.java
  5. 2 2
      plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/StatechartItemProvider.java
  6. 9 7
      plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore
  7. 59 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/CompositeElement.java
  8. 29 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Region.java
  9. 108 51
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java
  10. 7 25
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/State.java
  11. 1 24
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Statechart.java
  12. 182 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/CompositeElementImpl.java
  13. 74 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/RegionImpl.java
  14. 45 26
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java
  15. 414 277
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StateImpl.java
  16. 30 1
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java
  17. 9 7
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/sgraph.ecore
  18. 19 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphAdapterFactory.java
  19. 24 0
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphSwitch.java
  20. 201 410
      plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphValidator.java

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


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

@@ -142,3 +142,7 @@ _UI_RegularState_type = Regular State
 _UI_Choice_kind_feature = Kind
 _UI_ChoiceKind_dynamic_literal = dynamic
 _UI_ChoiceKind_static_literal = static
+_UI_CompositeElement_type = Composite Element
+_UI_Region_composite_feature = Composite
+_UI_State_subchart_feature = Subchart
+_UI_CompositeElement_regions_feature = Regions

+ 171 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/CompositeElementItemProvider.java

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

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

@@ -79,7 +79,7 @@ public class StateItemProvider
 			addOrthogonalPropertyDescriptor(object);
 			addSubstatechartPropertyDescriptor(object);
 			addSubstatechartIdPropertyDescriptor(object);
-			addSubmachinePropertyDescriptor(object);
+			addSubchartPropertyDescriptor(object);
 			addSimplePropertyDescriptor(object);
 			addCompositePropertyDescriptor(object);
 			addLeafPropertyDescriptor(object);
@@ -242,19 +242,19 @@ public class StateItemProvider
 	}
 
 	/**
-	 * This adds a property descriptor for the Submachine feature.
+	 * This adds a property descriptor for the Subchart feature.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	protected void addSubmachinePropertyDescriptor(Object object) {
+	protected void addSubchartPropertyDescriptor(Object object) {
 		itemPropertyDescriptors.add
 			(createItemPropertyDescriptor
 				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
 				 getResourceLocator(),
-				 getString("_UI_State_submachine_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_State_submachine_feature", "_UI_State_type"),
-				 SGraphPackage.Literals.STATE__SUBMACHINE,
+				 getString("_UI_State_subchart_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_State_subchart_feature", "_UI_State_type"),
+				 SGraphPackage.Literals.STATE__SUBCHART,
 				 false,
 				 false,
 				 false,
@@ -344,7 +344,7 @@ public class StateItemProvider
 			childrenFeatures.add(SGraphPackage.Literals.REACTIVE_ELEMENT__LOCAL_REACTIONS);
 			childrenFeatures.add(SGraphPackage.Literals.SCOPED_ELEMENT__SCOPES);
 			childrenFeatures.add(SGraphPackage.Literals.VERTEX__OUTGOING_TRANSITIONS);
-			childrenFeatures.add(SGraphPackage.Literals.STATE__SUB_REGIONS);
+			childrenFeatures.add(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS);
 		}
 		return childrenFeatures;
 	}
@@ -403,7 +403,7 @@ public class StateItemProvider
 			case SGraphPackage.STATE__NAME:
 			case SGraphPackage.STATE__ORTHOGONAL:
 			case SGraphPackage.STATE__SUBSTATECHART_ID:
-			case SGraphPackage.STATE__SUBMACHINE:
+			case SGraphPackage.STATE__SUBCHART:
 			case SGraphPackage.STATE__SIMPLE:
 			case SGraphPackage.STATE__COMPOSITE:
 			case SGraphPackage.STATE__LEAF:
@@ -412,7 +412,7 @@ public class StateItemProvider
 			case SGraphPackage.STATE__LOCAL_REACTIONS:
 			case SGraphPackage.STATE__SCOPES:
 			case SGraphPackage.STATE__OUTGOING_TRANSITIONS:
-			case SGraphPackage.STATE__SUB_REGIONS:
+			case SGraphPackage.STATE__REGIONS:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
 				return;
 		}
@@ -447,7 +447,7 @@ public class StateItemProvider
 
 		newChildDescriptors.add
 			(createChildParameter
-				(SGraphPackage.Literals.STATE__SUB_REGIONS,
+				(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS,
 				 SGraphFactory.eINSTANCE.createRegion()));
 	}
 

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

@@ -159,7 +159,7 @@ public class StatechartItemProvider
 			super.getChildrenFeatures(object);
 			childrenFeatures.add(SGraphPackage.Literals.REACTIVE_ELEMENT__LOCAL_REACTIONS);
 			childrenFeatures.add(SGraphPackage.Literals.SCOPED_ELEMENT__SCOPES);
-			childrenFeatures.add(SGraphPackage.Literals.STATECHART__REGIONS);
+			childrenFeatures.add(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS);
 		}
 		return childrenFeatures;
 	}
@@ -250,7 +250,7 @@ public class StatechartItemProvider
 
 		newChildDescriptors.add
 			(createChildParameter
-				(SGraphPackage.Literals.STATECHART__REGIONS,
+				(SGraphPackage.Literals.COMPOSITE_ELEMENT__REGIONS,
 				 SGraphFactory.eINSTANCE.createRegion()));
 	}
 

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

@@ -26,6 +26,8 @@
     <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"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="composite" lowerBound="1"
+        eType="#//CompositeElement" eOpposite="#//CompositeElement/regions"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
     <eAnnotations source="InjectMembers"/>
@@ -41,10 +43,8 @@
   <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="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement #//CompositeElement">
     <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">
@@ -91,19 +91,17 @@
     <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="#//ExpressionElement #//ReactiveElement #//ScopedElement #//RegularState">
+  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//ExpressionElement #//ReactiveElement #//ScopedElement #//RegularState #//CompositeElement">
     <eAnnotations source="InjectMembers"/>
     <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
       <details key="constraints" value="NameIsNotEmpty NameIsValidJavaIdentifier"/>
     </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"
         transient="true"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="substatechartId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="subchart" 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"/>
@@ -118,4 +116,8 @@
     <eLiterals name="dynamic"/>
     <eLiterals name="static" value="1"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="CompositeElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" upperBound="-1"
+        eType="#//Region" containment="true" eOpposite="#//Region/composite"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 59 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/CompositeElement.java

@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.model.sgraph;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Composite Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.CompositeElement#getRegions <em>Regions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sgraph.SGraphPackage#getCompositeElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CompositeElement extends EObject {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
+
+	/**
+	 * Returns the value of the '<em><b>Regions</b></em>' containment reference list.
+	 * The list contents are of type {@link org.yakindu.sct.model.sgraph.Region}.
+	 * It is bidirectional and its opposite is '{@link org.yakindu.sct.model.sgraph.Region#getComposite <em>Composite</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Regions</em>' containment reference list isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Regions</em>' containment reference list.
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getCompositeElement_Regions()
+	 * @see org.yakindu.sct.model.sgraph.Region#getComposite
+	 * @model opposite="composite" containment="true"
+	 * @generated
+	 */
+	EList<Region> getRegions();
+
+} // CompositeElement

+ 29 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/Region.java

@@ -22,6 +22,7 @@ import org.eclipse.emf.common.util.EList;
  * <ul>
  *   <li>{@link org.yakindu.sct.model.sgraph.Region#getVertices <em>Vertices</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.Region#getPriority <em>Priority</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.Region#getComposite <em>Composite</em>}</li>
  * </ul>
  * </p>
  *
@@ -81,4 +82,32 @@ public interface Region extends NamedElement {
 	 */
 	void setPriority(int value);
 
+	/**
+	 * Returns the value of the '<em><b>Composite</b></em>' container reference.
+	 * It is bidirectional and its opposite is '{@link org.yakindu.sct.model.sgraph.CompositeElement#getRegions <em>Regions</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Composite</em>' container reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Composite</em>' container reference.
+	 * @see #setComposite(CompositeElement)
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getRegion_Composite()
+	 * @see org.yakindu.sct.model.sgraph.CompositeElement#getRegions
+	 * @model opposite="regions" required="true" transient="false"
+	 * @generated
+	 */
+	CompositeElement getComposite();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sgraph.Region#getComposite <em>Composite</em>}' container reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Composite</em>' container reference.
+	 * @see #getComposite()
+	 * @generated
+	 */
+	void setComposite(CompositeElement value);
+
 } // Region

+ 108 - 51
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/SGraphPackage.java

@@ -246,6 +246,15 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int REGION__PRIORITY = NAMED_ELEMENT_FEATURE_COUNT + 1;
 
+	/**
+	 * The feature id for the '<em><b>Composite</b></em>' container reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int REGION__COMPOSITE = NAMED_ELEMENT_FEATURE_COUNT + 2;
+
 	/**
 	 * The number of structural features of the '<em>Region</em>' class.
 	 * <!-- begin-user-doc -->
@@ -253,7 +262,7 @@ public interface SGraphPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int REGION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2;
+	int REGION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 3;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.ExpressionElementImpl <em>Expression Element</em>}' class.
@@ -1157,13 +1166,13 @@ public interface SGraphPackage extends EPackage {
 	int STATE__OUTGOING_TRANSITIONS = EXPRESSION_ELEMENT_FEATURE_COUNT + 7;
 
 	/**
-	 * The feature id for the '<em><b>Sub Regions</b></em>' containment reference list.
+	 * The feature id for the '<em><b>Regions</b></em>' containment reference list.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUB_REGIONS = EXPRESSION_ELEMENT_FEATURE_COUNT + 8;
+	int STATE__REGIONS = EXPRESSION_ELEMENT_FEATURE_COUNT + 8;
 
 	/**
 	 * The feature id for the '<em><b>Orthogonal</b></em>' attribute.
@@ -1193,13 +1202,13 @@ public interface SGraphPackage extends EPackage {
 	int STATE__SUBSTATECHART_ID = EXPRESSION_ELEMENT_FEATURE_COUNT + 11;
 
 	/**
-	 * The feature id for the '<em><b>Submachine</b></em>' attribute.
+	 * The feature id for the '<em><b>Subchart</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int STATE__SUBMACHINE = EXPRESSION_ELEMENT_FEATURE_COUNT + 12;
+	int STATE__SUBCHART = EXPRESSION_ELEMENT_FEATURE_COUNT + 12;
 
 	/**
 	 * The feature id for the '<em><b>Simple</b></em>' attribute.
@@ -1256,6 +1265,34 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int STATEMENT_FEATURE_COUNT = 0;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.CompositeElementImpl <em>Composite Element</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sgraph.impl.CompositeElementImpl
+	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getCompositeElement()
+	 * @generated
+	 */
+	int COMPOSITE_ELEMENT = 24;
+
+	/**
+	 * The feature id for the '<em><b>Regions</b></em>' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int COMPOSITE_ELEMENT__REGIONS = 0;
+
+	/**
+	 * The number of structural features of the '<em>Composite Element</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int COMPOSITE_ELEMENT_FEATURE_COUNT = 1;
+
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.EntryKind <em>Entry Kind</em>}' enum.
 	 * <!-- begin-user-doc -->
@@ -1264,7 +1301,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getEntryKind()
 	 * @generated
 	 */
-	int ENTRY_KIND = 24;
+	int ENTRY_KIND = 25;
 
 
 	/**
@@ -1275,7 +1312,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getChoiceKind()
 	 * @generated
 	 */
-	int CHOICE_KIND = 25;
+	int CHOICE_KIND = 26;
 
 
 	/**
@@ -1384,6 +1421,17 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EAttribute getRegion_Priority();
 
+	/**
+	 * Returns the meta object for the container reference '{@link org.yakindu.sct.model.sgraph.Region#getComposite <em>Composite</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the container reference '<em>Composite</em>'.
+	 * @see org.yakindu.sct.model.sgraph.Region#getComposite()
+	 * @see #getRegion()
+	 * @generated
+	 */
+	EReference getRegion_Composite();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Transition <em>Transition</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1447,17 +1495,6 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EClass getState();
 
-	/**
-	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.State#getSubRegions <em>Sub Regions</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the containment reference list '<em>Sub Regions</em>'.
-	 * @see org.yakindu.sct.model.sgraph.State#getSubRegions()
-	 * @see #getState()
-	 * @generated
-	 */
-	EReference getState_SubRegions();
-
 	/**
 	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sgraph.State#isOrthogonal <em>Orthogonal</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1492,15 +1529,15 @@ public interface SGraphPackage extends EPackage {
 	EAttribute getState_SubstatechartId();
 
 	/**
-	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sgraph.State#isSubmachine <em>Submachine</em>}'.
+	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sgraph.State#isSubchart <em>Subchart</em>}'.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @return the meta object for the attribute '<em>Submachine</em>'.
-	 * @see org.yakindu.sct.model.sgraph.State#isSubmachine()
+	 * @return the meta object for the attribute '<em>Subchart</em>'.
+	 * @see org.yakindu.sct.model.sgraph.State#isSubchart()
 	 * @see #getState()
 	 * @generated
 	 */
-	EAttribute getState_Submachine();
+	EAttribute getState_Subchart();
 
 	/**
 	 * Returns the meta object for the attribute '{@link org.yakindu.sct.model.sgraph.State#isSimple <em>Simple</em>}'.
@@ -1555,6 +1592,27 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EClass getRegularState();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.CompositeElement <em>Composite Element</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Composite Element</em>'.
+	 * @see org.yakindu.sct.model.sgraph.CompositeElement
+	 * @generated
+	 */
+	EClass getCompositeElement();
+
+	/**
+	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.CompositeElement#getRegions <em>Regions</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference list '<em>Regions</em>'.
+	 * @see org.yakindu.sct.model.sgraph.CompositeElement#getRegions()
+	 * @see #getCompositeElement()
+	 * @generated
+	 */
+	EReference getCompositeElement_Regions();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Variable <em>Variable</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1606,17 +1664,6 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EClass getStatechart();
 
-	/**
-	 * Returns the meta object for the containment reference list '{@link org.yakindu.sct.model.sgraph.Statechart#getRegions <em>Regions</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the containment reference list '<em>Regions</em>'.
-	 * @see org.yakindu.sct.model.sgraph.Statechart#getRegions()
-	 * @see #getStatechart()
-	 * @generated
-	 */
-	EReference getStatechart_Regions();
-
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Entry <em>Entry</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1978,6 +2025,14 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EAttribute REGION__PRIORITY = eINSTANCE.getRegion_Priority();
 
+		/**
+		 * The meta object literal for the '<em><b>Composite</b></em>' container reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference REGION__COMPOSITE = eINSTANCE.getRegion_Composite();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.TransitionImpl <em>Transition</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -2032,14 +2087,6 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EClass STATE = eINSTANCE.getState();
 
-		/**
-		 * The meta object literal for the '<em><b>Sub Regions</b></em>' containment reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference STATE__SUB_REGIONS = eINSTANCE.getState_SubRegions();
-
 		/**
 		 * The meta object literal for the '<em><b>Orthogonal</b></em>' attribute feature.
 		 * <!-- begin-user-doc -->
@@ -2065,12 +2112,12 @@ public interface SGraphPackage extends EPackage {
 		EAttribute STATE__SUBSTATECHART_ID = eINSTANCE.getState_SubstatechartId();
 
 		/**
-		 * The meta object literal for the '<em><b>Submachine</b></em>' attribute feature.
+		 * The meta object literal for the '<em><b>Subchart</b></em>' attribute feature.
 		 * <!-- begin-user-doc -->
 		 * <!-- end-user-doc -->
 		 * @generated
 		 */
-		EAttribute STATE__SUBMACHINE = eINSTANCE.getState_Submachine();
+		EAttribute STATE__SUBCHART = eINSTANCE.getState_Subchart();
 
 		/**
 		 * The meta object literal for the '<em><b>Simple</b></em>' attribute feature.
@@ -2116,6 +2163,24 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EClass REGULAR_STATE = eINSTANCE.getRegularState();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.CompositeElementImpl <em>Composite Element</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sgraph.impl.CompositeElementImpl
+		 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getCompositeElement()
+		 * @generated
+		 */
+		EClass COMPOSITE_ELEMENT = eINSTANCE.getCompositeElement();
+
+		/**
+		 * The meta object literal for the '<em><b>Regions</b></em>' containment reference list feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference COMPOSITE_ELEMENT__REGIONS = eINSTANCE.getCompositeElement_Regions();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.VariableImpl <em>Variable</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -2164,14 +2229,6 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EClass STATECHART = eINSTANCE.getStatechart();
 
-		/**
-		 * The meta object literal for the '<em><b>Regions</b></em>' containment reference list feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EReference STATECHART__REGIONS = eINSTANCE.getStatechart_Regions();
-
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.EntryImpl <em>Entry</em>}' class.
 		 * <!-- begin-user-doc -->

+ 7 - 25
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/State.java

@@ -10,7 +10,6 @@
  */
 package org.yakindu.sct.model.sgraph;
 
-import org.eclipse.emf.common.util.EList;
 
 /**
  * <!-- begin-user-doc -->
@@ -20,11 +19,10 @@ import org.eclipse.emf.common.util.EList;
  * <p>
  * The following features are supported:
  * <ul>
- *   <li>{@link org.yakindu.sct.model.sgraph.State#getSubRegions <em>Sub Regions</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#isOrthogonal <em>Orthogonal</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#getSubstatechart <em>Substatechart</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#getSubstatechartId <em>Substatechart Id</em>}</li>
- *   <li>{@link org.yakindu.sct.model.sgraph.State#isSubmachine <em>Submachine</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.State#isSubchart <em>Subchart</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#isSimple <em>Simple</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#isComposite <em>Composite</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.State#isLeaf <em>Leaf</em>}</li>
@@ -35,7 +33,7 @@ import org.eclipse.emf.common.util.EList;
  * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='NameIsNotEmpty NameIsValidJavaIdentifier'"
  * @generated
  */
-public interface State extends ExpressionElement, ReactiveElement, ScopedElement, RegularState {
+public interface State extends ExpressionElement, ReactiveElement, ScopedElement, RegularState, CompositeElement {
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -43,22 +41,6 @@ public interface State extends ExpressionElement, ReactiveElement, ScopedElement
 	 */
 	String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
 
-	/**
-	 * Returns the value of the '<em><b>Sub Regions</b></em>' containment reference list.
-	 * The list contents are of type {@link org.yakindu.sct.model.sgraph.Region}.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Sub Regions</em>' containment reference list isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Sub Regions</em>' containment reference list.
-	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getState_SubRegions()
-	 * @model containment="true" ordered="false"
-	 * @generated
-	 */
-	EList<Region> getSubRegions();
-
 	/**
 	 * Returns the value of the '<em><b>Orthogonal</b></em>' attribute.
 	 * <!-- begin-user-doc -->
@@ -127,19 +109,19 @@ public interface State extends ExpressionElement, ReactiveElement, ScopedElement
 	void setSubstatechartId(String value);
 
 	/**
-	 * Returns the value of the '<em><b>Submachine</b></em>' attribute.
+	 * Returns the value of the '<em><b>Subchart</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <p>
-	 * If the meaning of the '<em>Submachine</em>' attribute isn't clear,
+	 * If the meaning of the '<em>Subchart</em>' attribute isn't clear,
 	 * there really should be more of a description here...
 	 * </p>
 	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Submachine</em>' attribute.
-	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getState_Submachine()
+	 * @return the value of the '<em>Subchart</em>' attribute.
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getState_Subchart()
 	 * @model transient="true" changeable="false" volatile="true" derived="true"
 	 * @generated
 	 */
-	boolean isSubmachine();
+	boolean isSubchart();
 
 	/**
 	 * Returns the value of the '<em><b>Simple</b></em>' attribute.

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

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

+ 182 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/CompositeElementImpl.java

@@ -0,0 +1,182 @@
+/**
+ * Copyright (c) 2011 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * Contributors:
+ * committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.model.sgraph.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.yakindu.sct.model.sgraph.CompositeElement;
+import org.yakindu.sct.model.sgraph.Region;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Composite Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.CompositeElementImpl#getRegions <em>Regions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class CompositeElementImpl extends EObjectImpl implements CompositeElement {
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
+
+	/**
+	 * The cached value of the '{@link #getRegions() <em>Regions</em>}' containment reference list.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRegions()
+	 * @generated
+	 * @ordered
+	 */
+	protected EList<Region> regions;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected CompositeElementImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SGraphPackage.Literals.COMPOSITE_ELEMENT;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EList<Region> getRegions() {
+		if (regions == null) {
+			regions = new EObjectContainmentWithInverseEList<Region>(Region.class, this, SGraphPackage.COMPOSITE_ELEMENT__REGIONS, SGraphPackage.REGION__COMPOSITE);
+		}
+		return regions;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case SGraphPackage.COMPOSITE_ELEMENT__REGIONS:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getRegions()).basicAdd(otherEnd, msgs);
+		}
+		return super.eInverseAdd(otherEnd, featureID, msgs);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case SGraphPackage.COMPOSITE_ELEMENT__REGIONS:
+				return ((InternalEList<?>)getRegions()).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.COMPOSITE_ELEMENT__REGIONS:
+				return getRegions();
+		}
+		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.COMPOSITE_ELEMENT__REGIONS:
+				getRegions().clear();
+				getRegions().addAll((Collection<? extends Region>)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.COMPOSITE_ELEMENT__REGIONS:
+				getRegions().clear();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.COMPOSITE_ELEMENT__REGIONS:
+				return regions != null && !regions.isEmpty();
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //CompositeElementImpl

+ 74 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/RegionImpl.java

@@ -19,7 +19,9 @@ import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.util.InternalEList;
+import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Region;
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 import org.yakindu.sct.model.sgraph.Vertex;
@@ -33,6 +35,7 @@ import org.yakindu.sct.model.sgraph.Vertex;
  * <ul>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.RegionImpl#getVertices <em>Vertices</em>}</li>
  *   <li>{@link org.yakindu.sct.model.sgraph.impl.RegionImpl#getPriority <em>Priority</em>}</li>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.RegionImpl#getComposite <em>Composite</em>}</li>
  * </ul>
  * </p>
  *
@@ -128,6 +131,47 @@ public class RegionImpl extends NamedElementImpl implements Region {
 			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.REGION__PRIORITY, oldPriority, priority));
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public CompositeElement getComposite() {
+		if (eContainerFeatureID() != SGraphPackage.REGION__COMPOSITE) return null;
+		return (CompositeElement)eContainer();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetComposite(CompositeElement newComposite, NotificationChain msgs) {
+		msgs = eBasicSetContainer((InternalEObject)newComposite, SGraphPackage.REGION__COMPOSITE, msgs);
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setComposite(CompositeElement newComposite) {
+		if (newComposite != eInternalContainer() || (eContainerFeatureID() != SGraphPackage.REGION__COMPOSITE && newComposite != null)) {
+			if (EcoreUtil.isAncestor(this, newComposite))
+				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+			NotificationChain msgs = null;
+			if (eInternalContainer() != null)
+				msgs = eBasicRemoveFromContainer(msgs);
+			if (newComposite != null)
+				msgs = ((InternalEObject)newComposite).eInverseAdd(this, SGraphPackage.COMPOSITE_ELEMENT__REGIONS, CompositeElement.class, msgs);
+			msgs = basicSetComposite(newComposite, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.REGION__COMPOSITE, newComposite, newComposite));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -139,6 +183,10 @@ public class RegionImpl extends NamedElementImpl implements Region {
 		switch (featureID) {
 			case SGraphPackage.REGION__VERTICES:
 				return ((InternalEList<InternalEObject>)(InternalEList<?>)getVertices()).basicAdd(otherEnd, msgs);
+			case SGraphPackage.REGION__COMPOSITE:
+				if (eInternalContainer() != null)
+					msgs = eBasicRemoveFromContainer(msgs);
+				return basicSetComposite((CompositeElement)otherEnd, msgs);
 		}
 		return super.eInverseAdd(otherEnd, featureID, msgs);
 	}
@@ -153,10 +201,26 @@ public class RegionImpl extends NamedElementImpl implements Region {
 		switch (featureID) {
 			case SGraphPackage.REGION__VERTICES:
 				return ((InternalEList<?>)getVertices()).basicRemove(otherEnd, msgs);
+			case SGraphPackage.REGION__COMPOSITE:
+				return basicSetComposite(null, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+		switch (eContainerFeatureID()) {
+			case SGraphPackage.REGION__COMPOSITE:
+				return eInternalContainer().eInverseRemove(this, SGraphPackage.COMPOSITE_ELEMENT__REGIONS, CompositeElement.class, msgs);
+		}
+		return super.eBasicRemoveFromContainerFeature(msgs);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -169,6 +233,8 @@ public class RegionImpl extends NamedElementImpl implements Region {
 				return getVertices();
 			case SGraphPackage.REGION__PRIORITY:
 				return getPriority();
+			case SGraphPackage.REGION__COMPOSITE:
+				return getComposite();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -189,6 +255,9 @@ public class RegionImpl extends NamedElementImpl implements Region {
 			case SGraphPackage.REGION__PRIORITY:
 				setPriority((Integer)newValue);
 				return;
+			case SGraphPackage.REGION__COMPOSITE:
+				setComposite((CompositeElement)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -207,6 +276,9 @@ public class RegionImpl extends NamedElementImpl implements Region {
 			case SGraphPackage.REGION__PRIORITY:
 				setPriority(PRIORITY_EDEFAULT);
 				return;
+			case SGraphPackage.REGION__COMPOSITE:
+				setComposite((CompositeElement)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -223,6 +295,8 @@ public class RegionImpl extends NamedElementImpl implements Region {
 				return vertices != null && !vertices.isEmpty();
 			case SGraphPackage.REGION__PRIORITY:
 				return priority != PRIORITY_EDEFAULT;
+			case SGraphPackage.REGION__COMPOSITE:
+				return getComposite() != null;
 		}
 		return super.eIsSet(featureID);
 	}

+ 45 - 26
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/SGraphPackageImpl.java

@@ -113,6 +113,13 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 */
 	private EClass regularStateEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass compositeElementEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -402,6 +409,15 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
         return (EAttribute)getRegion().getEStructuralFeatures().get(1);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getRegion_Composite() {
+        return (EReference)getRegion().getEStructuralFeatures().get(2);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -465,22 +481,13 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		return stateEClass;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getState_SubRegions() {
-        return (EReference)getState().getEStructuralFeatures().get(0);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	public EAttribute getState_Orthogonal() {
-        return (EAttribute)getState().getEStructuralFeatures().get(1);
+        return (EAttribute)getState().getEStructuralFeatures().get(0);
 	}
 
 	/**
@@ -489,7 +496,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * @generated
 	 */
 	public EReference getState_Substatechart() {
-        return (EReference)getState().getEStructuralFeatures().get(2);
+        return (EReference)getState().getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -498,7 +505,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * @generated
 	 */
 	public EAttribute getState_SubstatechartId() {
-        return (EAttribute)getState().getEStructuralFeatures().get(3);
+        return (EAttribute)getState().getEStructuralFeatures().get(2);
 	}
 
 	/**
@@ -506,8 +513,8 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
-	public EAttribute getState_Submachine() {
-        return (EAttribute)getState().getEStructuralFeatures().get(4);
+	public EAttribute getState_Subchart() {
+        return (EAttribute)getState().getEStructuralFeatures().get(3);
 	}
 
 	/**
@@ -516,7 +523,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * @generated
 	 */
 	public EAttribute getState_Simple() {
-        return (EAttribute)getState().getEStructuralFeatures().get(5);
+        return (EAttribute)getState().getEStructuralFeatures().get(4);
 	}
 
 	/**
@@ -525,7 +532,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * @generated
 	 */
 	public EAttribute getState_Composite() {
-        return (EAttribute)getState().getEStructuralFeatures().get(6);
+        return (EAttribute)getState().getEStructuralFeatures().get(5);
 	}
 
 	/**
@@ -534,7 +541,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 * @generated
 	 */
 	public EAttribute getState_Leaf() {
-        return (EAttribute)getState().getEStructuralFeatures().get(7);
+        return (EAttribute)getState().getEStructuralFeatures().get(6);
 	}
 
 	/**
@@ -561,6 +568,27 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		return regularStateEClass;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getCompositeElement() {
+		if (compositeElementEClass == null) {
+			compositeElementEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(SGraphPackage.eNS_URI).getEClassifiers().get(26);
+		}
+		return compositeElementEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getCompositeElement_Regions() {
+        return (EReference)getCompositeElement().getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -618,15 +646,6 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		return statechartEClass;
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EReference getStatechart_Regions() {
-        return (EReference)getStatechart().getEStructuralFeatures().get(0);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

Plik diff jest za duży
+ 414 - 277
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StateImpl.java


+ 30 - 1
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/StatechartImpl.java

@@ -20,7 +20,9 @@ import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
 import org.eclipse.emf.ecore.util.InternalEList;
+import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Declaration;
 import org.yakindu.sct.model.sgraph.ExpressionElement;
 import org.yakindu.sct.model.sgraph.Reaction;
@@ -227,11 +229,26 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 	 */
 	public EList<Region> getRegions() {
 		if (regions == null) {
-			regions = new EObjectContainmentEList<Region>(Region.class, this, SGraphPackage.STATECHART__REGIONS);
+			regions = new EObjectContainmentWithInverseEList<Region>(Region.class, this, SGraphPackage.STATECHART__REGIONS, SGraphPackage.REGION__COMPOSITE);
 		}
 		return regions;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@SuppressWarnings("unchecked")
+	@Override
+	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+		switch (featureID) {
+			case SGraphPackage.STATECHART__REGIONS:
+				return ((InternalEList<InternalEObject>)(InternalEList<?>)getRegions()).basicAdd(otherEnd, msgs);
+		}
+		return super.eInverseAdd(otherEnd, featureID, msgs);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -374,6 +391,12 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 				default: return -1;
 			}
 		}
+		if (baseClass == CompositeElement.class) {
+			switch (derivedFeatureID) {
+				case SGraphPackage.STATECHART__REGIONS: return SGraphPackage.COMPOSITE_ELEMENT__REGIONS;
+				default: return -1;
+			}
+		}
 		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
 	}
 
@@ -404,6 +427,12 @@ public class StatechartImpl extends NamedElementImpl implements Statechart {
 				default: return -1;
 			}
 		}
+		if (baseClass == CompositeElement.class) {
+			switch (baseFeatureID) {
+				case SGraphPackage.COMPOSITE_ELEMENT__REGIONS: return SGraphPackage.STATECHART__REGIONS;
+				default: return -1;
+			}
+		}
 		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
 	}
 

+ 9 - 7
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/sgraph.ecore

@@ -25,6 +25,8 @@
     <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"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="composite" lowerBound="1"
+        eType="#//CompositeElement" eOpposite="#//CompositeElement/regions"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//ExpressionElement #//Reaction">
     <eAnnotations source="InjectMembers"/>
@@ -40,10 +42,8 @@
   <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="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement">
+  <eClassifiers xsi:type="ecore:EClass" name="Statechart" eSuperTypes="#//NamedElement #//ExpressionElement #//ReactiveElement #//ScopedElement #//CompositeElement">
     <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">
@@ -90,19 +90,17 @@
     <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="#//ExpressionElement #//ReactiveElement #//ScopedElement #//RegularState">
+  <eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//ExpressionElement #//ReactiveElement #//ScopedElement #//RegularState #//CompositeElement">
     <eAnnotations source="InjectMembers"/>
     <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
       <details key="constraints" value="NameIsNotEmpty NameIsValidJavaIdentifier"/>
     </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"
         transient="true"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="substatechartId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="submachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="subchart" 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"/>
@@ -117,4 +115,8 @@
     <eLiterals name="dynamic"/>
     <eLiterals name="static" value="1"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="CompositeElement" abstract="true">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="regions" upperBound="-1"
+        eType="#//Region" containment="true" eOpposite="#//Region/composite"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 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.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.Declaration;
 import org.yakindu.sct.model.sgraph.Effect;
@@ -200,6 +201,10 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 				return createRegularStateAdapter();
 			}
 			@Override
+			public Adapter caseCompositeElement(CompositeElement object) {
+				return createCompositeElementAdapter();
+			}
+			@Override
 			public Adapter defaultCase(EObject object) {
 				return createEObjectAdapter();
 			}
@@ -345,6 +350,20 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.CompositeElement <em>Composite Element</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.sct.model.sgraph.CompositeElement
+	 * @generated
+	 */
+	public Adapter createCompositeElementAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.Variable <em>Variable</em>}'.
 	 * <!-- begin-user-doc -->

+ 24 - 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.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.Declaration;
 import org.yakindu.sct.model.sgraph.Effect;
@@ -180,6 +181,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseExpressionElement(statechart);
 				if (result == null) result = caseReactiveElement(statechart);
 				if (result == null) result = caseScopedElement(statechart);
+				if (result == null) result = caseCompositeElement(statechart);
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
@@ -266,6 +268,7 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = caseReactiveElement(state);
 				if (result == null) result = caseScopedElement(state);
 				if (result == null) result = caseRegularState(state);
+				if (result == null) result = caseCompositeElement(state);
 				if (result == null) result = caseVertex(state);
 				if (result == null) result = caseNamedElement(state);
 				if (result == null) result = defaultCase(theEObject);
@@ -285,6 +288,12 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case SGraphPackage.COMPOSITE_ELEMENT: {
+				CompositeElement compositeElement = (CompositeElement)theEObject;
+				T result = caseCompositeElement(compositeElement);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -424,6 +433,21 @@ public class SGraphSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Composite 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>Composite Element</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseCompositeElement(CompositeElement object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Variable</em>'.
 	 * <!-- begin-user-doc -->

+ 201 - 410
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/util/SGraphValidator.java

@@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.DiagnosticChain;
 import org.eclipse.emf.common.util.ResourceLocator;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.yakindu.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.ChoiceKind;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -69,24 +70,20 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public static final String copyright = "Copyright (c) 2011 committers of YAKINDU and others.\r\nAll rights reserved. This program and the accompanying materials\r\nare made available under the terms of the Eclipse Public License v1.0\r\nwhich accompanies this distribution, and is available at\r\nhttp://www.eclipse.org/legal/epl-v10.html\r\nContributors:\r\ncommitters of YAKINDU - initial API and implementation\r\n";
 
 	/**
-	 * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * The cached model package
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	public static final SGraphValidator INSTANCE = new SGraphValidator();
 
 	/**
-	 * A constant for the
-	 * {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of
-	 * diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes}
-	 * from this package. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @see org.eclipse.emf.common.util.Diagnostic#getSource()
 	 * @see org.eclipse.emf.common.util.Diagnostic#getCode()
 	 * @generated
@@ -94,27 +91,25 @@ public class SGraphValidator extends EObjectValidator {
 	public static final String DIAGNOSTIC_SOURCE = "org.yakindu.sct.model.sgraph";
 
 	/**
-	 * A constant with a fixed name that can be used as the base value for
-	 * additional hand written constants. <!-- begin-user-doc --> <!--
+	 * A constant with a fixed name that can be used as the base value for additional hand written constants.
+	 * <!-- begin-user-doc --> <!--
 	 * end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
 
 	/**
-	 * A constant with a fixed name that can be used as the base value for
-	 * additional hand written constants in a derived class. <!-- begin-user-doc
+	 * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+	 * <!-- begin-user-doc
 	 * --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
 
 	/**
-	 * Creates an instance of the switch. <!-- begin-user-doc --> <!--
+	 * Creates an instance of the switch.
+	 * <!-- begin-user-doc --> <!--
 	 * end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public SGraphValidator() {
@@ -122,164 +117,121 @@ public class SGraphValidator extends EObjectValidator {
 	}
 
 	/**
-	 * Returns the package of this validator switch. <!-- begin-user-doc -->
+	 * Returns the package of this validator switch.
+	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	@Override
 	protected EPackage getEPackage() {
-		return SGraphPackage.eINSTANCE;
+	  return SGraphPackage.eINSTANCE;
 	}
 
 	/**
-	 * Calls <code>validateXXX</code> for the corresponding classifier of the
-	 * model. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
 	protected boolean validate(int classifierID, Object value,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
 		switch (classifierID) {
-		case SGraphPackage.PSEUDOSTATE:
-			return validatePseudostate((Pseudostate) value, diagnostics,
-					context);
-		case SGraphPackage.VERTEX:
-			return validateVertex((Vertex) value, diagnostics, context);
-		case SGraphPackage.NAMED_ELEMENT:
-			return validateNamedElement((NamedElement) value, diagnostics,
-					context);
-		case SGraphPackage.REGION:
-			return validateRegion((Region) value, diagnostics, context);
-		case SGraphPackage.TRANSITION:
-			return validateTransition((Transition) value, diagnostics, context);
-		case SGraphPackage.FINAL_STATE:
-			return validateFinalState((FinalState) value, diagnostics, context);
-		case SGraphPackage.VARIABLE:
-			return validateVariable((Variable) value, diagnostics, context);
-		case SGraphPackage.EVENT:
-			return validateEvent((Event) value, diagnostics, context);
-		case SGraphPackage.CHOICE:
-			return validateChoice((Choice) value, diagnostics, context);
-		case SGraphPackage.STATECHART:
-			return validateStatechart((Statechart) value, diagnostics, context);
-		case SGraphPackage.ENTRY:
-			return validateEntry((Entry) value, diagnostics, context);
-		case SGraphPackage.TRIGGER:
-			return validateTrigger((Trigger) value, diagnostics, context);
-		case SGraphPackage.EFFECT:
-			return validateEffect((Effect) value, diagnostics, context);
-		case SGraphPackage.EXPRESSION_ELEMENT:
-			return validateExpressionElement((ExpressionElement) value,
-					diagnostics, context);
-		case SGraphPackage.DECLARATION:
-			return validateDeclaration((Declaration) value, diagnostics,
-					context);
-		case SGraphPackage.REACTION:
-			return validateReaction((Reaction) value, diagnostics, context);
-		case SGraphPackage.REACTIVE_ELEMENT:
-			return validateReactiveElement((ReactiveElement) value,
-					diagnostics, context);
-		case SGraphPackage.EXIT:
-			return validateExit((Exit) value, diagnostics, context);
-		case SGraphPackage.SCOPE:
-			return validateScope((Scope) value, diagnostics, context);
-		case SGraphPackage.SCOPED_ELEMENT:
-			return validateScopedElement((ScopedElement) value, diagnostics,
-					context);
-		case SGraphPackage.SYNCHRONIZATION:
-			return validateSynchronization((Synchronization) value,
-					diagnostics, context);
-		case SGraphPackage.STATE:
-			return validateState((State) value, diagnostics, context);
-		case SGraphPackage.STATEMENT:
-			return validateStatement((Statement) value, diagnostics, context);
-		case SGraphPackage.REGULAR_STATE:
-			return validateRegularState((RegularState) value, diagnostics,
-					context);
-		case SGraphPackage.ENTRY_KIND:
-			return validateEntryKind((EntryKind) value, diagnostics, context);
-		case SGraphPackage.CHOICE_KIND:
-			return validateChoiceKind((ChoiceKind) value, diagnostics, context);
-		default:
-			return true;
+			case SGraphPackage.PSEUDOSTATE:
+				return validatePseudostate((Pseudostate)value, diagnostics, context);
+			case SGraphPackage.VERTEX:
+				return validateVertex((Vertex)value, diagnostics, context);
+			case SGraphPackage.NAMED_ELEMENT:
+				return validateNamedElement((NamedElement)value, diagnostics, context);
+			case SGraphPackage.REGION:
+				return validateRegion((Region)value, diagnostics, context);
+			case SGraphPackage.TRANSITION:
+				return validateTransition((Transition)value, diagnostics, context);
+			case SGraphPackage.FINAL_STATE:
+				return validateFinalState((FinalState)value, diagnostics, context);
+			case SGraphPackage.VARIABLE:
+				return validateVariable((Variable)value, diagnostics, context);
+			case SGraphPackage.EVENT:
+				return validateEvent((Event)value, diagnostics, context);
+			case SGraphPackage.CHOICE:
+				return validateChoice((Choice)value, diagnostics, context);
+			case SGraphPackage.STATECHART:
+				return validateStatechart((Statechart)value, diagnostics, context);
+			case SGraphPackage.ENTRY:
+				return validateEntry((Entry)value, diagnostics, context);
+			case SGraphPackage.TRIGGER:
+				return validateTrigger((Trigger)value, diagnostics, context);
+			case SGraphPackage.EFFECT:
+				return validateEffect((Effect)value, diagnostics, context);
+			case SGraphPackage.EXPRESSION_ELEMENT:
+				return validateExpressionElement((ExpressionElement)value, diagnostics, context);
+			case SGraphPackage.DECLARATION:
+				return validateDeclaration((Declaration)value, diagnostics, context);
+			case SGraphPackage.REACTION:
+				return validateReaction((Reaction)value, diagnostics, context);
+			case SGraphPackage.REACTIVE_ELEMENT:
+				return validateReactiveElement((ReactiveElement)value, diagnostics, context);
+			case SGraphPackage.EXIT:
+				return validateExit((Exit)value, diagnostics, context);
+			case SGraphPackage.SCOPE:
+				return validateScope((Scope)value, diagnostics, context);
+			case SGraphPackage.SCOPED_ELEMENT:
+				return validateScopedElement((ScopedElement)value, diagnostics, context);
+			case SGraphPackage.SYNCHRONIZATION:
+				return validateSynchronization((Synchronization)value, diagnostics, context);
+			case SGraphPackage.STATE:
+				return validateState((State)value, diagnostics, context);
+			case SGraphPackage.STATEMENT:
+				return validateStatement((Statement)value, diagnostics, context);
+			case SGraphPackage.REGULAR_STATE:
+				return validateRegularState((RegularState)value, diagnostics, context);
+			case SGraphPackage.COMPOSITE_ELEMENT:
+				return validateCompositeElement((CompositeElement)value, diagnostics, context);
+			case SGraphPackage.ENTRY_KIND:
+				return validateEntryKind((EntryKind)value, diagnostics, context);
+			case SGraphPackage.CHOICE_KIND:
+				return validateChoiceKind((ChoiceKind)value, diagnostics, context);
+			default:
+				return true;
 		}
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validatePseudostate(Pseudostate pseudostate,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(pseudostate, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(pseudostate,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(pseudostate, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(pseudostate,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(pseudostate,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(pseudostate, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(pseudostate, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(pseudostate, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(pseudostate, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(pseudostate,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(pseudostate,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(pseudostate, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(pseudostate, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(pseudostate, diagnostics, context);
 		return result;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateVertex(Vertex vertex, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(vertex, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(vertex,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(vertex, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(vertex, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(vertex,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(vertex, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(vertex, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(vertex, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(vertex, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(vertex,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(vertex,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(vertex, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(vertex, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(vertex, diagnostics, context);
 		return result;
 	}
 
@@ -340,46 +292,29 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateNamedElement(NamedElement namedElement,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		return validate_EveryDefaultConstraint(namedElement, diagnostics,
-				context);
+		return validate_EveryDefaultConstraint(namedElement, diagnostics, context);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateRegion(Region region, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(region, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(region,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(region, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(region, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(region,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(region, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(region, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(region, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(region, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateRegion_ExactlyOneInitialState(region,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(region, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(region, diagnostics, context);
+		if (result || diagnostics != null) result &= validateRegion_ExactlyOneInitialState(region, diagnostics, context);
 		return result;
 	}
 
@@ -413,7 +348,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateTransition(Transition transition,
@@ -423,82 +357,43 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateFinalState(FinalState finalState,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(finalState, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(finalState,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(finalState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(finalState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(finalState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(finalState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(finalState, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(finalState, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(finalState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(finalState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(finalState,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(finalState, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(finalState, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(finalState, diagnostics, context);
 		return result;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateState(State state, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(state, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(state, diagnostics,
-				context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(state, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(state, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(state,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(state, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(state, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(state, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(state, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(state,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(state,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateState_NameIsNotEmpty(state, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateState_NameIsValidJavaIdentifier(state,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(state, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validateState_NameIsNotEmpty(state, diagnostics, context);
+		if (result || diagnostics != null) result &= validateState_NameIsValidJavaIdentifier(state, diagnostics, context);
 		return result;
 	}
 
@@ -542,7 +437,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateStatement(Statement statement,
@@ -552,47 +446,35 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateRegularState(RegularState regularState,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(regularState, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(regularState,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(regularState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(regularState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(
-					regularState, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(regularState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(regularState, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(regularState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(regularState, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(regularState,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(regularState,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(regularState, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(regularState, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(regularState, diagnostics, context);
 		return result;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean validateCompositeElement(CompositeElement compositeElement, DiagnosticChain diagnostics, Map<Object, Object> context) {
+		return validate_EveryDefaultConstraint(compositeElement, diagnostics, context);
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateVariable(Variable variable,
@@ -602,7 +484,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateEvent(Event event, DiagnosticChain diagnostics,
@@ -612,44 +493,26 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateChoice(Choice choice, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(choice, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(choice,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(choice, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(choice, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(choice,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(choice, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(choice, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(choice, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(choice, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(choice,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(choice,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(choice, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(choice, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(choice, diagnostics, context);
 		return result;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateStatechart(Statechart statechart,
@@ -659,40 +522,22 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateEntry(Entry entry, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(entry, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(entry, diagnostics,
-				context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(entry, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(entry, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(entry,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(entry, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(entry, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(entry, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(entry, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(entry,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(entry,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateEntry_DisallowTrigger(entry, diagnostics, context);
+		if (!validate_NoCircularContainment(entry, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(entry, diagnostics, context);
+		if (result || diagnostics != null) result &= validateEntry_DisallowTrigger(entry, diagnostics, context);
 		return result;
 	}
 
@@ -720,7 +565,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateTrigger(Trigger trigger,
@@ -730,7 +574,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateEffect(Effect effect, DiagnosticChain diagnostics,
@@ -740,30 +583,25 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateExpressionElement(
 			ExpressionElement expressionElement, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		return validate_EveryDefaultConstraint(expressionElement, diagnostics,
-				context);
+		return validate_EveryDefaultConstraint(expressionElement, diagnostics, context);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateDeclaration(Declaration declaration,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		return validate_EveryDefaultConstraint(declaration, diagnostics,
-				context);
+		return validate_EveryDefaultConstraint(declaration, diagnostics, context);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateReaction(Reaction reaction,
@@ -773,55 +611,35 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateReactiveElement(ReactiveElement reactiveElement,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		return validate_EveryDefaultConstraint(reactiveElement, diagnostics,
-				context);
+		return validate_EveryDefaultConstraint(reactiveElement, diagnostics, context);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateExit(Exit exit, DiagnosticChain diagnostics,
 			Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(exit, diagnostics, context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(exit, diagnostics,
-				context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(exit, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(exit, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(exit,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(exit, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(exit, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(exit, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(exit, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(exit, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(exit, diagnostics,
-					context);
+		if (!validate_NoCircularContainment(exit, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(exit, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(exit, diagnostics, context);
 		return result;
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateScope(Scope scope, DiagnosticChain diagnostics,
@@ -831,53 +649,30 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateScopedElement(ScopedElement scopedElement,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		return validate_EveryDefaultConstraint(scopedElement, diagnostics,
-				context);
+		return validate_EveryDefaultConstraint(scopedElement, diagnostics, context);
 	}
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateSynchronization(Synchronization synchronization,
 			DiagnosticChain diagnostics, Map<Object, Object> context) {
-		if (!validate_NoCircularContainment(synchronization, diagnostics,
-				context))
-			return false;
-		boolean result = validate_EveryMultiplicityConforms(synchronization,
-				diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryDataValueConforms(synchronization,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryReferenceIsContained(synchronization,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryBidirectionalReferenceIsPaired(
-					synchronization, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryProxyResolves(synchronization, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_UniqueID(synchronization, diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validate_EveryKeyUnique(synchronization, diagnostics,
-					context);
-		if (result || diagnostics != null)
-			result &= validate_EveryMapEntryUnique(synchronization,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_IncomingTransitionCount(synchronization,
-					diagnostics, context);
-		if (result || diagnostics != null)
-			result &= validateVertex_OutgoingTransitionCount(synchronization,
-					diagnostics, context);
+		if (!validate_NoCircularContainment(synchronization, diagnostics, context)) return false;
+		boolean result = validate_EveryMultiplicityConforms(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryDataValueConforms(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryProxyResolves(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_UniqueID(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryKeyUnique(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_IncomingTransitionCount(synchronization, diagnostics, context);
+		if (result || diagnostics != null) result &= validateVertex_OutgoingTransitionCount(synchronization, diagnostics, context);
 		return result;
 	}
 
@@ -901,7 +696,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateEntryKind(EntryKind entryKind,
@@ -911,7 +705,6 @@ public class SGraphValidator extends EObjectValidator {
 
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
 	 * @generated
 	 */
 	public boolean validateChoiceKind(ChoiceKind choiceKind,
@@ -920,16 +713,14 @@ public class SGraphValidator extends EObjectValidator {
 	}
 
 	/**
-	 * Returns the resource locator that will be used to fetch messages for this
-	 * validator's diagnostics. <!-- begin-user-doc --> <!-- end-user-doc -->
-	 * 
+	 * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
 	public ResourceLocator getResourceLocator() {
 		// TODO
-		// Specialize this to return a resource locator for messages specific to
-		// this validator.
+		// Specialize this to return a resource locator for messages specific to this validator.
 		// Ensure that you remove @generated or mark it @generated NOT
 		return super.getResourceLocator();
 	}