Kaynağa Gözat

Added ImportDeclaration as new declaration type to handle references to imported variable definitions.

tomqc86@googlemail.com 11 yıl önce
ebeveyn
işleme
8c55575c30

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

@@ -105,4 +105,7 @@
   <eClassifiers xsi:type="ecore:EClass" name="Import">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="importedNamespace" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="ImportDeclaration" eSuperTypes="#//Declaration">
+    <eStructuralFeatures xsi:type="ecore:EReference" name="declaration" eType="#//Declaration"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 64 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/ImportDeclaration.java

@@ -0,0 +1,64 @@
+/**
+ * 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;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Import Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.ImportDeclaration#getDeclaration <em>Declaration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.sct.model.sgraph.SGraphPackage#getImportDeclaration()
+ * @model
+ * @generated
+ */
+public interface ImportDeclaration extends Declaration {
+	/**
+	 * <!-- 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>Declaration</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Declaration</em>' reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Declaration</em>' reference.
+	 * @see #setDeclaration(Declaration)
+	 * @see org.yakindu.sct.model.sgraph.SGraphPackage#getImportDeclaration_Declaration()
+	 * @model
+	 * @generated
+	 */
+	Declaration getDeclaration();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.sct.model.sgraph.ImportDeclaration#getDeclaration <em>Declaration</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Declaration</em>' reference.
+	 * @see #getDeclaration()
+	 * @generated
+	 */
+	void setDeclaration(Declaration value);
+
+} // ImportDeclaration

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

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

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

@@ -1330,6 +1330,43 @@ public interface SGraphPackage extends EPackage {
 	 */
 	int IMPORT_FEATURE_COUNT = 1;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.impl.ImportDeclarationImpl <em>Import Declaration</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.sct.model.sgraph.impl.ImportDeclarationImpl
+	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getImportDeclaration()
+	 * @generated
+	 */
+	int IMPORT_DECLARATION = 25;
+
+	/**
+	 * The feature id for the '<em><b>Name</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int IMPORT_DECLARATION__NAME = DECLARATION__NAME;
+
+	/**
+	 * The feature id for the '<em><b>Declaration</b></em>' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int IMPORT_DECLARATION__DECLARATION = DECLARATION_FEATURE_COUNT + 0;
+
+	/**
+	 * The number of structural features of the '<em>Import Declaration</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int IMPORT_DECLARATION_FEATURE_COUNT = DECLARATION_FEATURE_COUNT + 1;
+
 	/**
 	 * The meta object id for the '{@link org.yakindu.sct.model.sgraph.EntryKind <em>Entry Kind</em>}' enum.
 	 * <!-- begin-user-doc -->
@@ -1338,7 +1375,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getEntryKind()
 	 * @generated
 	 */
-	int ENTRY_KIND = 25;
+	int ENTRY_KIND = 26;
 
 
 	/**
@@ -1349,7 +1386,7 @@ public interface SGraphPackage extends EPackage {
 	 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getChoiceKind()
 	 * @generated
 	 */
-	int CHOICE_KIND = 26;
+	int CHOICE_KIND = 27;
 
 
 	/**
@@ -1618,6 +1655,27 @@ public interface SGraphPackage extends EPackage {
 	 */
 	EAttribute getImport_ImportedNamespace();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.ImportDeclaration <em>Import Declaration</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Import Declaration</em>'.
+	 * @see org.yakindu.sct.model.sgraph.ImportDeclaration
+	 * @generated
+	 */
+	EClass getImportDeclaration();
+
+	/**
+	 * Returns the meta object for the reference '{@link org.yakindu.sct.model.sgraph.ImportDeclaration#getDeclaration <em>Declaration</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the reference '<em>Declaration</em>'.
+	 * @see org.yakindu.sct.model.sgraph.ImportDeclaration#getDeclaration()
+	 * @see #getImportDeclaration()
+	 * @generated
+	 */
+	EReference getImportDeclaration_Declaration();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.sct.model.sgraph.Variable <em>Variable</em>}'.
 	 * <!-- begin-user-doc -->
@@ -2192,6 +2250,24 @@ public interface SGraphPackage extends EPackage {
 		 */
 		EAttribute IMPORT__IMPORTED_NAMESPACE = eINSTANCE.getImport_ImportedNamespace();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.ImportDeclarationImpl <em>Import Declaration</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.sct.model.sgraph.impl.ImportDeclarationImpl
+		 * @see org.yakindu.sct.model.sgraph.impl.SGraphPackageImpl#getImportDeclaration()
+		 * @generated
+		 */
+		EClass IMPORT_DECLARATION = eINSTANCE.getImportDeclaration();
+
+		/**
+		 * The meta object literal for the '<em><b>Declaration</b></em>' reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference IMPORT_DECLARATION__DECLARATION = eINSTANCE.getImportDeclaration_Declaration();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.sct.model.sgraph.impl.VariableImpl <em>Variable</em>}' class.
 		 * <!-- begin-user-doc -->

+ 171 - 0
plugins/org.yakindu.sct.model.sgraph/src/org/yakindu/sct/model/sgraph/impl/ImportDeclarationImpl.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.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.yakindu.sct.model.sgraph.Declaration;
+import org.yakindu.sct.model.sgraph.ImportDeclaration;
+import org.yakindu.sct.model.sgraph.SGraphPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Import Declaration</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.sct.model.sgraph.impl.ImportDeclarationImpl#getDeclaration <em>Declaration</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ImportDeclarationImpl extends DeclarationImpl implements ImportDeclaration {
+	/**
+	 * <!-- 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 #getDeclaration() <em>Declaration</em>}' reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDeclaration()
+	 * @generated
+	 * @ordered
+	 */
+	protected Declaration declaration;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected ImportDeclarationImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return SGraphPackage.Literals.IMPORT_DECLARATION;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Declaration getDeclaration() {
+		if (declaration != null && declaration.eIsProxy()) {
+			InternalEObject oldDeclaration = (InternalEObject)declaration;
+			declaration = (Declaration)eResolveProxy(oldDeclaration);
+			if (declaration != oldDeclaration) {
+				if (eNotificationRequired())
+					eNotify(new ENotificationImpl(this, Notification.RESOLVE, SGraphPackage.IMPORT_DECLARATION__DECLARATION, oldDeclaration, declaration));
+			}
+		}
+		return declaration;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Declaration basicGetDeclaration() {
+		return declaration;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDeclaration(Declaration newDeclaration) {
+		Declaration oldDeclaration = declaration;
+		declaration = newDeclaration;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, SGraphPackage.IMPORT_DECLARATION__DECLARATION, oldDeclaration, declaration));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case SGraphPackage.IMPORT_DECLARATION__DECLARATION:
+				if (resolve) return getDeclaration();
+				return basicGetDeclaration();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case SGraphPackage.IMPORT_DECLARATION__DECLARATION:
+				setDeclaration((Declaration)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.IMPORT_DECLARATION__DECLARATION:
+				setDeclaration((Declaration)null);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case SGraphPackage.IMPORT_DECLARATION__DECLARATION:
+				return declaration != null;
+		}
+		return super.eIsSet(featureID);
+	}
+
+} //ImportDeclarationImpl

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

@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject;
 import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.impl.EFactoryImpl;
 import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.yakindu.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.ChoiceKind;
 import org.yakindu.sct.model.sgraph.Entry;
@@ -98,6 +99,7 @@ public class SGraphFactoryImpl extends EFactoryImpl implements SGraphFactory {
 			case SGraphPackage.STATE: return createState();
 			case SGraphPackage.REGULAR_STATE: return createRegularState();
 			case SGraphPackage.IMPORT: return createImport();
+			case SGraphPackage.IMPORT_DECLARATION: return createImportDeclaration();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -267,6 +269,16 @@ public class SGraphFactoryImpl extends EFactoryImpl implements SGraphFactory {
 		return import_;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public ImportDeclaration createImportDeclaration() {
+		ImportDeclarationImpl importDeclaration = new ImportDeclarationImpl();
+		return importDeclaration;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

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

@@ -28,6 +28,7 @@ import org.yakindu.sct.model.sgraph.Event;
 import org.yakindu.sct.model.sgraph.Exit;
 import org.yakindu.sct.model.sgraph.FinalState;
 import org.yakindu.sct.model.sgraph.Import;
+import org.yakindu.sct.model.sgraph.ImportDeclaration;
 import org.yakindu.sct.model.sgraph.Pseudostate;
 import org.yakindu.sct.model.sgraph.Reaction;
 import org.yakindu.sct.model.sgraph.ReactionProperty;
@@ -124,6 +125,13 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 	 */
 	private EClass importEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass importDeclarationEClass = null;
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -539,6 +547,24 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		return (EAttribute)importEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getImportDeclaration() {
+		return importDeclarationEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getImportDeclaration_Declaration() {
+		return (EReference)importDeclarationEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -935,6 +961,9 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		importEClass = createEClass(IMPORT);
 		createEAttribute(importEClass, IMPORT__IMPORTED_NAMESPACE);
 
+		importDeclarationEClass = createEClass(IMPORT_DECLARATION);
+		createEReference(importDeclarationEClass, IMPORT_DECLARATION__DECLARATION);
+
 		// Create enums
 		entryKindEEnum = createEEnum(ENTRY_KIND);
 		choiceKindEEnum = createEEnum(CHOICE_KIND);
@@ -998,6 +1027,7 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		stateEClass.getESuperTypes().add(this.getCompositeElement());
 		stateEClass.getESuperTypes().add(theBasePackage.getDocumentedElement());
 		regularStateEClass.getESuperTypes().add(this.getVertex());
+		importDeclarationEClass.getESuperTypes().add(this.getDeclaration());
 
 		// Initialize classes and features; add operations and parameters
 		initEClass(pseudostateEClass, Pseudostate.class, "Pseudostate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -1080,6 +1110,9 @@ public class SGraphPackageImpl extends EPackageImpl implements SGraphPackage {
 		initEClass(importEClass, Import.class, "Import", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEAttribute(getImport_ImportedNamespace(), ecorePackage.getEString(), "importedNamespace", null, 0, 1, Import.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(importDeclarationEClass, ImportDeclaration.class, "ImportDeclaration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEReference(getImportDeclaration_Declaration(), this.getDeclaration(), null, "declaration", null, 0, 1, ImportDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		// Initialize enums and add enum literals
 		initEEnum(entryKindEEnum, EntryKind.class, "EntryKind");
 		addEEnumLiteral(entryKindEEnum, EntryKind.INITIAL);

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

@@ -109,12 +109,12 @@ public class ScopeImpl extends EObjectImpl implements Scope {
 	}
 
 	/**
-	 * <!-- begin-user-doc --> <!-- end-user-doc -->
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	@Override
-	public NotificationChain eInverseRemove(InternalEObject otherEnd,
-			int featureID, NotificationChain msgs) {
+	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
 		switch (featureID) {
 			case SGraphPackage.SCOPE__DECLARATIONS:
 				return ((InternalEList<?>)getDeclarations()).basicRemove(otherEnd, msgs);

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

@@ -16,6 +16,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 import org.eclipse.emf.ecore.EObject;
 import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
+import org.yakindu.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -207,6 +208,10 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 				return createImportAdapter();
 			}
 			@Override
+			public Adapter caseImportDeclaration(ImportDeclaration object) {
+				return createImportDeclarationAdapter();
+			}
+			@Override
 			public Adapter caseNamedElement(NamedElement object) {
 				return createNamedElementAdapter();
 			}
@@ -388,6 +393,20 @@ public class SGraphAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.sct.model.sgraph.ImportDeclaration <em>Import Declaration</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.ImportDeclaration
+	 * @generated
+	 */
+	public Adapter createImportDeclarationAdapter() {
+		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

@@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
 import org.yakindu.base.base.DocumentedElement;
 import org.yakindu.base.base.NamedElement;
+import org.yakindu.sct.model.sgraph.*;
 import org.yakindu.sct.model.sgraph.Choice;
 import org.yakindu.sct.model.sgraph.CompositeElement;
 import org.yakindu.sct.model.sgraph.Declaration;
@@ -299,6 +300,14 @@ public class SGraphSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case SGraphPackage.IMPORT_DECLARATION: {
+				ImportDeclaration importDeclaration = (ImportDeclaration)theEObject;
+				T result = caseImportDeclaration(importDeclaration);
+				if (result == null) result = caseDeclaration(importDeclaration);
+				if (result == null) result = caseNamedElement(importDeclaration);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -468,6 +477,21 @@ public class SGraphSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Import Declaration</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>Import Declaration</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseImportDeclaration(ImportDeclaration object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>Variable</em>'.
 	 * <!-- begin-user-doc -->