Browse Source

Added domain ID to Types Package

Andreas Mülder 10 years ago
parent
commit
e33762c395

+ 5 - 0
plugins/org.yakindu.base.types/model/types.ecore

@@ -4,6 +4,8 @@
   <eClassifiers xsi:type="ecore:EClass" name="Package" eSuperTypes="base.ecore#//NamedElement">
     <eStructuralFeatures xsi:type="ecore:EReference" name="member" upperBound="-1"
         eType="#//PackageMember" containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="domain" eType="#//Domain"
+        containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Type" abstract="true" eSuperTypes="#//PackageMember">
     <eStructuralFeatures xsi:type="ecore:EReference" name="constraint" upperBound="-1"
@@ -63,4 +65,7 @@
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="lowerBound" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="upperBound" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong"/>
   </eClassifiers>
+  <eClassifiers xsi:type="ecore:EClass" name="Domain">
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="domainID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+  </eClassifiers>
 </ecore:EPackage>

+ 50 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Domain.java

@@ -0,0 +1,50 @@
+/**
+ */
+package org.yakindu.base.types;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ *   <li>{@link org.yakindu.base.types.Domain#getDomainID <em>Domain ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.yakindu.base.types.TypesPackage#getDomain()
+ * @model
+ * @generated
+ */
+public interface Domain extends EObject {
+	/**
+	 * Returns the value of the '<em><b>Domain ID</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Domain ID</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Domain ID</em>' attribute.
+	 * @see #setDomainID(String)
+	 * @see org.yakindu.base.types.TypesPackage#getDomain_DomainID()
+	 * @model
+	 * @generated
+	 */
+	String getDomainID();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.base.types.Domain#getDomainID <em>Domain ID</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Domain ID</em>' attribute.
+	 * @see #getDomainID()
+	 * @generated
+	 */
+	void setDomainID(String value);
+
+} // Domain

+ 27 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/Package.java

@@ -14,6 +14,7 @@ import org.yakindu.base.base.NamedElement;
  * The following features are supported:
  * <ul>
  *   <li>{@link org.yakindu.base.types.Package#getMember <em>Member</em>}</li>
+ *   <li>{@link org.yakindu.base.types.Package#getDomain <em>Domain</em>}</li>
  * </ul>
  * </p>
  *
@@ -38,4 +39,30 @@ public interface Package extends NamedElement {
 	 */
 	EList<PackageMember> getMember();
 
+	/**
+	 * Returns the value of the '<em><b>Domain</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Domain</em>' reference isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Domain</em>' containment reference.
+	 * @see #setDomain(Domain)
+	 * @see org.yakindu.base.types.TypesPackage#getPackage_Domain()
+	 * @model containment="true"
+	 * @generated
+	 */
+	Domain getDomain();
+
+	/**
+	 * Sets the value of the '{@link org.yakindu.base.types.Package#getDomain <em>Domain</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Domain</em>' containment reference.
+	 * @see #getDomain()
+	 * @generated
+	 */
+	void setDomain(Domain value);
+
 } // Package

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

@@ -151,6 +151,15 @@ public interface TypesFactory extends EFactory {
 	 */
 	RangeConstraint createRangeConstraint();
 
+	/**
+	 * Returns a new object of class '<em>Domain</em>'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return a new object of class '<em>Domain</em>'.
+	 * @generated
+	 */
+	Domain createDomain();
+
 	/**
 	 * Returns the package supported by this factory.
 	 * <!-- begin-user-doc -->

+ 96 - 1
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/TypesPackage.java

@@ -88,6 +88,15 @@ public interface TypesPackage extends EPackage {
 	 */
 	int PACKAGE__MEMBER = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 0;
 
+	/**
+	 * The feature id for the '<em><b>Domain</b></em>' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int PACKAGE__DOMAIN = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
+
 	/**
 	 * The number of structural features of the '<em>Package</em>' class.
 	 * <!-- begin-user-doc -->
@@ -95,7 +104,7 @@ public interface TypesPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int PACKAGE_FEATURE_COUNT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 1;
+	int PACKAGE_FEATURE_COUNT = BasePackage.NAMED_ELEMENT_FEATURE_COUNT + 2;
 
 	/**
 	 * The meta object id for the '{@link org.yakindu.base.types.impl.PackageMemberImpl <em>Package Member</em>}' class.
@@ -917,6 +926,34 @@ public interface TypesPackage extends EPackage {
 	 */
 	int RANGE_CONSTRAINT_FEATURE_COUNT = TYPE_CONSTRAINT_FEATURE_COUNT + 2;
 
+	/**
+	 * The meta object id for the '{@link org.yakindu.base.types.impl.DomainImpl <em>Domain</em>}' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see org.yakindu.base.types.impl.DomainImpl
+	 * @see org.yakindu.base.types.impl.TypesPackageImpl#getDomain()
+	 * @generated
+	 */
+	int DOMAIN = 17;
+
+	/**
+	 * The feature id for the '<em><b>Domain ID</b></em>' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int DOMAIN__DOMAIN_ID = 0;
+
+	/**
+	 * The number of structural features of the '<em>Domain</em>' class.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	int DOMAIN_FEATURE_COUNT = 1;
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.Package <em>Package</em>}'.
 	 * <!-- begin-user-doc -->
@@ -938,6 +975,17 @@ public interface TypesPackage extends EPackage {
 	 */
 	EReference getPackage_Member();
 
+	/**
+	 * Returns the meta object for the containment reference '{@link org.yakindu.base.types.Package#getDomain <em>Domain</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the containment reference '<em>Domain</em>'.
+	 * @see org.yakindu.base.types.Package#getDomain()
+	 * @see #getPackage()
+	 * @generated
+	 */
+	EReference getPackage_Domain();
+
 	/**
 	 * Returns the meta object for class '{@link org.yakindu.base.types.Type <em>Type</em>}'.
 	 * <!-- begin-user-doc -->
@@ -1296,6 +1344,27 @@ public interface TypesPackage extends EPackage {
 	 */
 	EAttribute getRangeConstraint_UpperBound();
 
+	/**
+	 * Returns the meta object for class '{@link org.yakindu.base.types.Domain <em>Domain</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for class '<em>Domain</em>'.
+	 * @see org.yakindu.base.types.Domain
+	 * @generated
+	 */
+	EClass getDomain();
+
+	/**
+	 * Returns the meta object for the attribute '{@link org.yakindu.base.types.Domain#getDomainID <em>Domain ID</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Domain ID</em>'.
+	 * @see org.yakindu.base.types.Domain#getDomainID()
+	 * @see #getDomain()
+	 * @generated
+	 */
+	EAttribute getDomain_DomainID();
+
 	/**
 	 * Returns the factory that creates the instances of the model.
 	 * <!-- begin-user-doc -->
@@ -1336,6 +1405,14 @@ public interface TypesPackage extends EPackage {
 		 */
 		EReference PACKAGE__MEMBER = eINSTANCE.getPackage_Member();
 
+		/**
+		 * The meta object literal for the '<em><b>Domain</b></em>' containment reference feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EReference PACKAGE__DOMAIN = eINSTANCE.getPackage_Domain();
+
 		/**
 		 * The meta object literal for the '{@link org.yakindu.base.types.impl.TypeImpl <em>Type</em>}' class.
 		 * <!-- begin-user-doc -->
@@ -1640,6 +1717,24 @@ public interface TypesPackage extends EPackage {
 		 */
 		EAttribute RANGE_CONSTRAINT__UPPER_BOUND = eINSTANCE.getRangeConstraint_UpperBound();
 
+		/**
+		 * The meta object literal for the '{@link org.yakindu.base.types.impl.DomainImpl <em>Domain</em>}' class.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @see org.yakindu.base.types.impl.DomainImpl
+		 * @see org.yakindu.base.types.impl.TypesPackageImpl#getDomain()
+		 * @generated
+		 */
+		EClass DOMAIN = eINSTANCE.getDomain();
+
+		/**
+		 * The meta object literal for the '<em><b>Domain ID</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute DOMAIN__DOMAIN_ID = eINSTANCE.getDomain_DomainID();
+
 	}
 
 } //TypesPackage

+ 163 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/DomainImpl.java

@@ -0,0 +1,163 @@
+/**
+ */
+package org.yakindu.base.types.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.yakindu.base.types.Domain;
+import org.yakindu.base.types.TypesPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Domain</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link org.yakindu.base.types.impl.DomainImpl#getDomainID <em>Domain ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DomainImpl extends EObjectImpl implements Domain {
+	/**
+	 * The default value of the '{@link #getDomainID() <em>Domain ID</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDomainID()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final String DOMAIN_ID_EDEFAULT = null;
+
+	/**
+	 * The cached value of the '{@link #getDomainID() <em>Domain ID</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDomainID()
+	 * @generated
+	 * @ordered
+	 */
+	protected String domainID = DOMAIN_ID_EDEFAULT;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected DomainImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return TypesPackage.Literals.DOMAIN;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public String getDomainID() {
+		return domainID;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDomainID(String newDomainID) {
+		String oldDomainID = domainID;
+		domainID = newDomainID;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.DOMAIN__DOMAIN_ID, oldDomainID, domainID));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case TypesPackage.DOMAIN__DOMAIN_ID:
+				return getDomainID();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case TypesPackage.DOMAIN__DOMAIN_ID:
+				setDomainID((String)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case TypesPackage.DOMAIN__DOMAIN_ID:
+				setDomainID(DOMAIN_ID_EDEFAULT);
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case TypesPackage.DOMAIN__DOMAIN_ID:
+				return DOMAIN_ID_EDEFAULT == null ? domainID != null : !DOMAIN_ID_EDEFAULT.equals(domainID);
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (domainID: ");
+		result.append(domainID);
+		result.append(')');
+		return result.toString();
+	}
+
+} //DomainImpl

+ 68 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/PackageImpl.java

@@ -4,13 +4,16 @@ package org.yakindu.base.types.impl;
 
 import java.util.Collection;
 
+import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.notify.NotificationChain;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
 import org.eclipse.emf.ecore.util.EObjectContainmentEList;
 import org.eclipse.emf.ecore.util.InternalEList;
 import org.yakindu.base.base.impl.NamedElementImpl;
+import org.yakindu.base.types.Domain;
 import org.yakindu.base.types.PackageMember;
 import org.yakindu.base.types.TypesPackage;
 
@@ -22,6 +25,7 @@ import org.yakindu.base.types.TypesPackage;
  * The following features are implemented:
  * <ul>
  *   <li>{@link org.yakindu.base.types.impl.PackageImpl#getMember <em>Member</em>}</li>
+ *   <li>{@link org.yakindu.base.types.impl.PackageImpl#getDomain <em>Domain</em>}</li>
  * </ul>
  * </p>
  *
@@ -37,6 +41,15 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 	 * @ordered
 	 */
 	protected EList<PackageMember> member;
+	/**
+	 * The cached value of the '{@link #getDomain() <em>Domain</em>}' containment reference.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getDomain()
+	 * @generated
+	 * @ordered
+	 */
+	protected Domain domain;
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -68,6 +81,49 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 		return member;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Domain getDomain() {
+		return domain;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public NotificationChain basicSetDomain(Domain newDomain, NotificationChain msgs) {
+		Domain oldDomain = domain;
+		domain = newDomain;
+		if (eNotificationRequired()) {
+			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TypesPackage.PACKAGE__DOMAIN, oldDomain, newDomain);
+			if (msgs == null) msgs = notification; else msgs.add(notification);
+		}
+		return msgs;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setDomain(Domain newDomain) {
+		if (newDomain != domain) {
+			NotificationChain msgs = null;
+			if (domain != null)
+				msgs = ((InternalEObject)domain).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TypesPackage.PACKAGE__DOMAIN, null, msgs);
+			if (newDomain != null)
+				msgs = ((InternalEObject)newDomain).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TypesPackage.PACKAGE__DOMAIN, null, msgs);
+			msgs = basicSetDomain(newDomain, msgs);
+			if (msgs != null) msgs.dispatch();
+		}
+		else if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, TypesPackage.PACKAGE__DOMAIN, newDomain, newDomain));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -78,6 +134,8 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 		switch (featureID) {
 			case TypesPackage.PACKAGE__MEMBER:
 				return ((InternalEList<?>)getMember()).basicRemove(otherEnd, msgs);
+			case TypesPackage.PACKAGE__DOMAIN:
+				return basicSetDomain(null, msgs);
 		}
 		return super.eInverseRemove(otherEnd, featureID, msgs);
 	}
@@ -92,6 +150,8 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 		switch (featureID) {
 			case TypesPackage.PACKAGE__MEMBER:
 				return getMember();
+			case TypesPackage.PACKAGE__DOMAIN:
+				return getDomain();
 		}
 		return super.eGet(featureID, resolve, coreType);
 	}
@@ -109,6 +169,9 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 				getMember().clear();
 				getMember().addAll((Collection<? extends PackageMember>)newValue);
 				return;
+			case TypesPackage.PACKAGE__DOMAIN:
+				setDomain((Domain)newValue);
+				return;
 		}
 		super.eSet(featureID, newValue);
 	}
@@ -124,6 +187,9 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 			case TypesPackage.PACKAGE__MEMBER:
 				getMember().clear();
 				return;
+			case TypesPackage.PACKAGE__DOMAIN:
+				setDomain((Domain)null);
+				return;
 		}
 		super.eUnset(featureID);
 	}
@@ -138,6 +204,8 @@ public class PackageImpl extends NamedElementImpl implements org.yakindu.base.ty
 		switch (featureID) {
 			case TypesPackage.PACKAGE__MEMBER:
 				return member != null && !member.isEmpty();
+			case TypesPackage.PACKAGE__DOMAIN:
+				return domain != null;
 		}
 		return super.eIsSet(featureID);
 	}

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

@@ -12,6 +12,7 @@ import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.impl.EFactoryImpl;
 import org.eclipse.emf.ecore.plugin.EcorePlugin;
 import org.yakindu.base.types.ComplexType;
+import org.yakindu.base.types.Domain;
 import org.yakindu.base.types.EnumerationType;
 import org.yakindu.base.types.Enumerator;
 import org.yakindu.base.types.Event;
@@ -85,6 +86,7 @@ public class TypesFactoryImpl extends EFactoryImpl implements TypesFactory {
 			case TypesPackage.PARAMETERIZED_TYPE: return createParameterizedType();
 			case TypesPackage.PACKAGE_MEMBER: return createPackageMember();
 			case TypesPackage.RANGE_CONSTRAINT: return createRangeConstraint();
+			case TypesPackage.DOMAIN: return createDomain();
 			default:
 				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
 		}
@@ -230,6 +232,16 @@ public class TypesFactoryImpl extends EFactoryImpl implements TypesFactory {
 		return rangeConstraint;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public Domain createDomain() {
+		DomainImpl domain = new DomainImpl();
+		return domain;
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->

+ 43 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/impl/TypesPackageImpl.java

@@ -13,6 +13,7 @@ import org.eclipse.emf.ecore.EReference;
 import org.eclipse.emf.ecore.impl.EPackageImpl;
 import org.yakindu.base.base.BasePackage;
 import org.yakindu.base.types.ComplexType;
+import org.yakindu.base.types.Domain;
 import org.yakindu.base.types.EnumerationType;
 import org.yakindu.base.types.Enumerator;
 import org.yakindu.base.types.Event;
@@ -145,6 +146,13 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 	 */
 	private EClass rangeConstraintEClass = null;
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	private EClass domainEClass = null;
+
 	/**
 	 * Creates an instance of the model <b>Package</b>, registered with
 	 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the
@@ -227,6 +235,15 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		return (EReference)packageEClass.getEStructuralFeatures().get(0);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EReference getPackage_Domain() {
+		return (EReference)packageEClass.getEStructuralFeatures().get(1);
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -512,6 +529,24 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		return (EAttribute)rangeConstraintEClass.getEStructuralFeatures().get(1);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EClass getDomain() {
+		return domainEClass;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getDomain_DomainID() {
+		return (EAttribute)domainEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc --> <!-- end-user-doc -->
 	 * @generated
@@ -540,6 +575,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		// Create classes and their features
 		packageEClass = createEClass(PACKAGE);
 		createEReference(packageEClass, PACKAGE__MEMBER);
+		createEReference(packageEClass, PACKAGE__DOMAIN);
 
 		typeEClass = createEClass(TYPE);
 		createEReference(typeEClass, TYPE__CONSTRAINT);
@@ -590,6 +626,9 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		rangeConstraintEClass = createEClass(RANGE_CONSTRAINT);
 		createEAttribute(rangeConstraintEClass, RANGE_CONSTRAINT__LOWER_BOUND);
 		createEAttribute(rangeConstraintEClass, RANGE_CONSTRAINT__UPPER_BOUND);
+
+		domainEClass = createEClass(DOMAIN);
+		createEAttribute(domainEClass, DOMAIN__DOMAIN_ID);
 	}
 
 	/**
@@ -643,6 +682,7 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		// Initialize classes and features; add operations and parameters
 		initEClass(packageEClass, org.yakindu.base.types.Package.class, "Package", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getPackage_Member(), this.getPackageMember(), null, "member", null, 0, -1, org.yakindu.base.types.Package.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+		initEReference(getPackage_Domain(), this.getDomain(), null, "domain", null, 0, 1, org.yakindu.base.types.Package.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEClass(typeEClass, Type.class, "Type", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getType_Constraint(), this.getTypeConstraint(), null, "constraint", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -696,6 +736,9 @@ public class TypesPackageImpl extends EPackageImpl implements TypesPackage {
 		initEAttribute(getRangeConstraint_LowerBound(), ecorePackage.getELong(), "lowerBound", null, 0, 1, RangeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEAttribute(getRangeConstraint_UpperBound(), ecorePackage.getELong(), "upperBound", null, 0, 1, RangeConstraint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
+		initEClass(domainEClass, Domain.class, "Domain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getDomain_DomainID(), ecorePackage.getEString(), "domainID", null, 0, 1, Domain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
 		// Create resource
 		createResource(eNS_URI);
 	}

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

@@ -12,6 +12,7 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
 import org.eclipse.emf.ecore.EObject;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.ComplexType;
+import org.yakindu.base.types.Domain;
 import org.yakindu.base.types.EnumerationType;
 import org.yakindu.base.types.Enumerator;
 import org.yakindu.base.types.Event;
@@ -151,6 +152,10 @@ public class TypesAdapterFactory extends AdapterFactoryImpl {
 				return createRangeConstraintAdapter();
 			}
 			@Override
+			public Adapter caseDomain(Domain object) {
+				return createDomainAdapter();
+			}
+			@Override
 			public Adapter caseNamedElement(NamedElement object) {
 				return createNamedElementAdapter();
 			}
@@ -430,6 +435,20 @@ public class TypesAdapterFactory extends AdapterFactoryImpl {
 		return null;
 	}
 
+	/**
+	 * Creates a new adapter for an object of class '{@link org.yakindu.base.types.Domain <em>Domain</em>}'.
+	 * <!-- begin-user-doc -->
+	 * This default implementation returns null so that we can easily ignore cases;
+	 * it's useful to ignore a case when inheritance will catch all the cases anyway.
+	 * <!-- end-user-doc -->
+	 * @return the new adapter.
+	 * @see org.yakindu.base.types.Domain
+	 * @generated
+	 */
+	public Adapter createDomainAdapter() {
+		return null;
+	}
+
 	/**
 	 * Creates a new adapter for the default case.
 	 * <!-- begin-user-doc --> This

+ 22 - 0
plugins/org.yakindu.base.types/src-gen/org/yakindu/base/types/util/TypesSwitch.java

@@ -11,6 +11,7 @@ import org.eclipse.emf.ecore.EPackage;
 import org.eclipse.emf.ecore.util.Switch;
 import org.yakindu.base.base.NamedElement;
 import org.yakindu.base.types.ComplexType;
+import org.yakindu.base.types.Domain;
 import org.yakindu.base.types.EnumerationType;
 import org.yakindu.base.types.Enumerator;
 import org.yakindu.base.types.Event;
@@ -219,6 +220,12 @@ public class TypesSwitch<T> extends Switch<T> {
 				if (result == null) result = defaultCase(theEObject);
 				return result;
 			}
+			case TypesPackage.DOMAIN: {
+				Domain domain = (Domain)theEObject;
+				T result = caseDomain(domain);
+				if (result == null) result = defaultCase(theEObject);
+				return result;
+			}
 			default: return defaultCase(theEObject);
 		}
 	}
@@ -483,6 +490,21 @@ public class TypesSwitch<T> extends Switch<T> {
 		return null;
 	}
 
+	/**
+	 * Returns the result of interpreting the object as an instance of '<em>Domain</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>Domain</em>'.
+	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+	 * @generated
+	 */
+	public T caseDomain(Domain object) {
+		return null;
+	}
+
 	/**
 	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
 	 * <!-- begin-user-doc --> This implementation returns

+ 1 - 1
plugins/org.yakindu.base.types/src/org/yakindu/base/types/inferrer/AbstractTypeSystemInferrer.java

@@ -74,7 +74,7 @@ public abstract class AbstractTypeSystemInferrer implements ITypeSystemInferrer
 	}
 
 	protected Type inferTypeDispatch(EObject object) {
-		if (object.eIsProxy())
+		if (object == null || object.eIsProxy())
 			return null;
 		try {
 			return typeCache.get(object);