[509716] - Regenerating models and parser
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/.classpath b/tests/org.eclipse.qvtd.cs2as.compiler.tests/.classpath
index 8a9a8d7..69a03c0 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/.classpath
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/.classpath
@@ -12,5 +12,6 @@
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="emf-gen"/>
+ <classpathentry kind="src" path="src-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/META-INF/MANIFEST.MF b/tests/org.eclipse.qvtd.cs2as.compiler.tests/META-INF/MANIFEST.MF
index 01827fc..c5bbea4 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,21 @@
org.eclipse.ocl.examples.autogen;bundle-version="[1.1.0,1.3.0)";resolution:=optional,
org.eclipse.qvtd.codegen;bundle-version="[0.14.0,1.0.0)";resolution:=optional,
org.eclipse.xsd;bundle-version="[2.11.0,3.0.0)";resolution:=optional,
- org.eclipse.osgi
+ org.eclipse.osgi,
+ org.eclipse.xtext.xbase.lib,
+ org.antlr.runtime,
+ org.eclipse.xtext.util,
+ org.eclipse.xtend.lib,
+ org.eclipse.xtext
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Export-Package: org.eclipse.qvtd.cs2as.compiler.tests
+Export-Package: org.eclipse.qvtd.cs2as.compiler.tests,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.generator,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.scoping,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.serializer,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services,
+ org.eclipse.qvtd.cs2as.compiler.tests.models.companies.validation
+Import-Package: org.apache.log4j
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CSTrace.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CSTrace.java
new file mode 100644
index 0000000..3f22f20
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CSTrace.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>CS Trace</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.CSTrace#getAst <em>Ast</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getCSTrace()
+ * @model abstract="true"
+ * @generated
+ */
+public interface CSTrace extends EObject {
+ /**
+ * Returns the value of the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ast</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Ast</em>' reference.
+ * @see #setAst(Visitable)
+ * @see cs2as.companies.CompaniesPackage#getCSTrace_Ast()
+ * @model type="cs2as.company.Visitable" transient="true"
+ * @generated
+ */
+ Visitable getAst();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.CSTrace#getAst <em>Ast</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Ast</em>' reference.
+ * @see #getAst()
+ * @generated
+ */
+ void setAst(Visitable value);
+
+} // CSTrace
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesFactory.java
new file mode 100644
index 0000000..f1aaa16
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesFactory.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.CompaniesPackage
+ * @generated
+ */
+public interface CompaniesFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CompaniesFactory eINSTANCE = cs2as.companies.impl.CompaniesFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>company</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>company</em>'.
+ * @generated
+ */
+ company createcompany();
+
+ /**
+ * Returns a new object of class '<em>department</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>department</em>'.
+ * @generated
+ */
+ department createdepartment();
+
+ /**
+ * Returns a new object of class '<em>department manager</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>department manager</em>'.
+ * @generated
+ */
+ department_manager createdepartment_manager();
+
+ /**
+ * Returns a new object of class '<em>department employees</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>department employees</em>'.
+ * @generated
+ */
+ department_employees createdepartment_employees();
+
+ /**
+ * Returns a new object of class '<em>employee</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>employee</em>'.
+ * @generated
+ */
+ employee createemployee();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ CompaniesPackage getCompaniesPackage();
+
+} //CompaniesFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesPackage.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesPackage.java
new file mode 100644
index 0000000..527f0a0
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/CompaniesPackage.java
@@ -0,0 +1,734 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.CompaniesFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CompaniesPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "companies";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://cs2as/tests/companies/CS/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "companies";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CompaniesPackage eINSTANCE = cs2as.companies.impl.CompaniesPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.CSTraceImpl <em>CS Trace</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.CSTraceImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getCSTrace()
+ * @generated
+ */
+ int CS_TRACE = 5;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CS_TRACE__AST = 0;
+
+ /**
+ * The number of structural features of the '<em>CS Trace</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CS_TRACE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.companyImpl <em>company</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.companyImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getcompany()
+ * @generated
+ */
+ int COMPANY = 0;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__AST = CS_TRACE__AST;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__NAME = CS_TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Deparment</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__DEPARMENT = CS_TRACE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>company</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY_FEATURE_COUNT = CS_TRACE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.departmentImpl <em>department</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.departmentImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment()
+ * @generated
+ */
+ int DEPARTMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__AST = CS_TRACE__AST;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__NAME = CS_TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Department manager</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__DEPARTMENT_MANAGER = CS_TRACE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Department employees</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__DEPARTMENT_EMPLOYEES = CS_TRACE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Deparment</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__DEPARMENT = CS_TRACE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>department</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_FEATURE_COUNT = CS_TRACE_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.department_managerImpl <em>department manager</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.department_managerImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment_manager()
+ * @generated
+ */
+ int DEPARTMENT_MANAGER = 2;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_MANAGER__AST = CS_TRACE__AST;
+
+ /**
+ * The feature id for the '<em><b>Employee</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_MANAGER__EMPLOYEE = CS_TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>department manager</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_MANAGER_FEATURE_COUNT = CS_TRACE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.department_employeesImpl <em>department employees</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.department_employeesImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment_employees()
+ * @generated
+ */
+ int DEPARTMENT_EMPLOYEES = 3;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_EMPLOYEES__AST = CS_TRACE__AST;
+
+ /**
+ * The feature id for the '<em><b>Employee</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_EMPLOYEES__EMPLOYEE = CS_TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>department employees</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_EMPLOYEES_FEATURE_COUNT = CS_TRACE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link cs2as.companies.impl.employeeImpl <em>employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.employeeImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getemployee()
+ * @generated
+ */
+ int EMPLOYEE = 4;
+
+ /**
+ * The feature id for the '<em><b>Ast</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__AST = CS_TRACE__AST;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__NAME = CS_TRACE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__ADDRESS = CS_TRACE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Salary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__SALARY = CS_TRACE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Mentor</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__MENTOR = CS_TRACE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>employee</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_FEATURE_COUNT = CS_TRACE_FEATURE_COUNT + 4;
+
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.company <em>company</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>company</em>'.
+ * @see cs2as.companies.company
+ * @generated
+ */
+ EClass getcompany();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.company#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.companies.company#getName()
+ * @see #getcompany()
+ * @generated
+ */
+ EAttribute getcompany_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.companies.company#getDeparment <em>Deparment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Deparment</em>'.
+ * @see cs2as.companies.company#getDeparment()
+ * @see #getcompany()
+ * @generated
+ */
+ EReference getcompany_Deparment();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.department <em>department</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>department</em>'.
+ * @see cs2as.companies.department
+ * @generated
+ */
+ EClass getdepartment();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.department#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.companies.department#getName()
+ * @see #getdepartment()
+ * @generated
+ */
+ EAttribute getdepartment_Name();
+
+ /**
+ * Returns the meta object for the containment reference '{@link cs2as.companies.department#getDepartment_manager <em>Department manager</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Department manager</em>'.
+ * @see cs2as.companies.department#getDepartment_manager()
+ * @see #getdepartment()
+ * @generated
+ */
+ EReference getdepartment_Department_manager();
+
+ /**
+ * Returns the meta object for the containment reference '{@link cs2as.companies.department#getDepartment_employees <em>Department employees</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Department employees</em>'.
+ * @see cs2as.companies.department#getDepartment_employees()
+ * @see #getdepartment()
+ * @generated
+ */
+ EReference getdepartment_Department_employees();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.companies.department#getDeparment <em>Deparment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Deparment</em>'.
+ * @see cs2as.companies.department#getDeparment()
+ * @see #getdepartment()
+ * @generated
+ */
+ EReference getdepartment_Deparment();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.department_manager <em>department manager</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>department manager</em>'.
+ * @see cs2as.companies.department_manager
+ * @generated
+ */
+ EClass getdepartment_manager();
+
+ /**
+ * Returns the meta object for the containment reference '{@link cs2as.companies.department_manager#getEmployee <em>Employee</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Employee</em>'.
+ * @see cs2as.companies.department_manager#getEmployee()
+ * @see #getdepartment_manager()
+ * @generated
+ */
+ EReference getdepartment_manager_Employee();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.department_employees <em>department employees</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>department employees</em>'.
+ * @see cs2as.companies.department_employees
+ * @generated
+ */
+ EClass getdepartment_employees();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.companies.department_employees#getEmployee <em>Employee</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Employee</em>'.
+ * @see cs2as.companies.department_employees#getEmployee()
+ * @see #getdepartment_employees()
+ * @generated
+ */
+ EReference getdepartment_employees_Employee();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.employee <em>employee</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>employee</em>'.
+ * @see cs2as.companies.employee
+ * @generated
+ */
+ EClass getemployee();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.employee#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.companies.employee#getName()
+ * @see #getemployee()
+ * @generated
+ */
+ EAttribute getemployee_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.employee#getAddress <em>Address</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Address</em>'.
+ * @see cs2as.companies.employee#getAddress()
+ * @see #getemployee()
+ * @generated
+ */
+ EAttribute getemployee_Address();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.employee#getSalary <em>Salary</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Salary</em>'.
+ * @see cs2as.companies.employee#getSalary()
+ * @see #getemployee()
+ * @generated
+ */
+ EAttribute getemployee_Salary();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.companies.employee#getMentor <em>Mentor</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Mentor</em>'.
+ * @see cs2as.companies.employee#getMentor()
+ * @see #getemployee()
+ * @generated
+ */
+ EAttribute getemployee_Mentor();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.companies.CSTrace <em>CS Trace</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>CS Trace</em>'.
+ * @see cs2as.companies.CSTrace
+ * @generated
+ */
+ EClass getCSTrace();
+
+ /**
+ * Returns the meta object for the reference '{@link cs2as.companies.CSTrace#getAst <em>Ast</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Ast</em>'.
+ * @see cs2as.companies.CSTrace#getAst()
+ * @see #getCSTrace()
+ * @generated
+ */
+ EReference getCSTrace_Ast();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ CompaniesFactory getCompaniesFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.companyImpl <em>company</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.companyImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getcompany()
+ * @generated
+ */
+ EClass COMPANY = eINSTANCE.getcompany();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMPANY__NAME = eINSTANCE.getcompany_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Deparment</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMPANY__DEPARMENT = eINSTANCE.getcompany_Deparment();
+
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.departmentImpl <em>department</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.departmentImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment()
+ * @generated
+ */
+ EClass DEPARTMENT = eINSTANCE.getdepartment();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPARTMENT__NAME = eINSTANCE.getdepartment_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Department manager</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__DEPARTMENT_MANAGER = eINSTANCE.getdepartment_Department_manager();
+
+ /**
+ * The meta object literal for the '<em><b>Department employees</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__DEPARTMENT_EMPLOYEES = eINSTANCE.getdepartment_Department_employees();
+
+ /**
+ * The meta object literal for the '<em><b>Deparment</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__DEPARMENT = eINSTANCE.getdepartment_Deparment();
+
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.department_managerImpl <em>department manager</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.department_managerImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment_manager()
+ * @generated
+ */
+ EClass DEPARTMENT_MANAGER = eINSTANCE.getdepartment_manager();
+
+ /**
+ * The meta object literal for the '<em><b>Employee</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT_MANAGER__EMPLOYEE = eINSTANCE.getdepartment_manager_Employee();
+
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.department_employeesImpl <em>department employees</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.department_employeesImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getdepartment_employees()
+ * @generated
+ */
+ EClass DEPARTMENT_EMPLOYEES = eINSTANCE.getdepartment_employees();
+
+ /**
+ * The meta object literal for the '<em><b>Employee</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT_EMPLOYEES__EMPLOYEE = eINSTANCE.getdepartment_employees_Employee();
+
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.employeeImpl <em>employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.employeeImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getemployee()
+ * @generated
+ */
+ EClass EMPLOYEE = eINSTANCE.getemployee();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__NAME = eINSTANCE.getemployee_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__ADDRESS = eINSTANCE.getemployee_Address();
+
+ /**
+ * The meta object literal for the '<em><b>Salary</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__SALARY = eINSTANCE.getemployee_Salary();
+
+ /**
+ * The meta object literal for the '<em><b>Mentor</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__MENTOR = eINSTANCE.getemployee_Mentor();
+
+ /**
+ * The meta object literal for the '{@link cs2as.companies.impl.CSTraceImpl <em>CS Trace</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.impl.CSTraceImpl
+ * @see cs2as.companies.impl.CompaniesPackageImpl#getCSTrace()
+ * @generated
+ */
+ EClass CS_TRACE = eINSTANCE.getCSTrace();
+
+ /**
+ * The meta object literal for the '<em><b>Ast</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CS_TRACE__AST = eINSTANCE.getCSTrace_Ast();
+
+ }
+
+} //CompaniesPackage
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/company.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/company.java
new file mode 100644
index 0000000..f6f832c
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/company.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>company</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.company#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.company#getDeparment <em>Deparment</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getcompany()
+ * @model
+ * @generated
+ */
+public interface company extends CSTrace {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.companies.CompaniesPackage#getcompany_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.company#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Deparment</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.companies.department}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Deparment</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>Deparment</em>' containment reference list.
+ * @see cs2as.companies.CompaniesPackage#getcompany_Deparment()
+ * @model containment="true"
+ * @generated
+ */
+ EList<department> getDeparment();
+
+} // company
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department.java
new file mode 100644
index 0000000..07946f3
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department.java
@@ -0,0 +1,129 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>department</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.department#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.department#getDepartment_manager <em>Department manager</em>}</li>
+ * <li>{@link cs2as.companies.department#getDepartment_employees <em>Department employees</em>}</li>
+ * <li>{@link cs2as.companies.department#getDeparment <em>Deparment</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getdepartment()
+ * @model
+ * @generated
+ */
+public interface department extends CSTrace {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.companies.CompaniesPackage#getdepartment_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.department#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Department manager</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Department manager</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Department manager</em>' containment reference.
+ * @see #setDepartment_manager(department_manager)
+ * @see cs2as.companies.CompaniesPackage#getdepartment_Department_manager()
+ * @model containment="true"
+ * @generated
+ */
+ department_manager getDepartment_manager();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.department#getDepartment_manager <em>Department manager</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Department manager</em>' containment reference.
+ * @see #getDepartment_manager()
+ * @generated
+ */
+ void setDepartment_manager(department_manager value);
+
+ /**
+ * Returns the value of the '<em><b>Department employees</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Department employees</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Department employees</em>' containment reference.
+ * @see #setDepartment_employees(department_employees)
+ * @see cs2as.companies.CompaniesPackage#getdepartment_Department_employees()
+ * @model containment="true"
+ * @generated
+ */
+ department_employees getDepartment_employees();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.department#getDepartment_employees <em>Department employees</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Department employees</em>' containment reference.
+ * @see #getDepartment_employees()
+ * @generated
+ */
+ void setDepartment_employees(department_employees value);
+
+ /**
+ * Returns the value of the '<em><b>Deparment</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.companies.department}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Deparment</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>Deparment</em>' containment reference list.
+ * @see cs2as.companies.CompaniesPackage#getdepartment_Deparment()
+ * @model containment="true"
+ * @generated
+ */
+ EList<department> getDeparment();
+
+} // department
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_employees.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_employees.java
new file mode 100644
index 0000000..dcef0d5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_employees.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>department employees</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.department_employees#getEmployee <em>Employee</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getdepartment_employees()
+ * @model
+ * @generated
+ */
+public interface department_employees extends CSTrace {
+ /**
+ * Returns the value of the '<em><b>Employee</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.companies.employee}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Employee</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>Employee</em>' containment reference list.
+ * @see cs2as.companies.CompaniesPackage#getdepartment_employees_Employee()
+ * @model containment="true"
+ * @generated
+ */
+ EList<employee> getEmployee();
+
+} // department_employees
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_manager.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_manager.java
new file mode 100644
index 0000000..1e1cd14
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/department_manager.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>department manager</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.department_manager#getEmployee <em>Employee</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getdepartment_manager()
+ * @model
+ * @generated
+ */
+public interface department_manager extends CSTrace {
+ /**
+ * Returns the value of the '<em><b>Employee</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Employee</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Employee</em>' containment reference.
+ * @see #setEmployee(employee)
+ * @see cs2as.companies.CompaniesPackage#getdepartment_manager_Employee()
+ * @model containment="true"
+ * @generated
+ */
+ employee getEmployee();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.department_manager#getEmployee <em>Employee</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Employee</em>' containment reference.
+ * @see #getEmployee()
+ * @generated
+ */
+ void setEmployee(employee value);
+
+} // department_manager
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/employee.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/employee.java
new file mode 100644
index 0000000..fd3f020
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/employee.java
@@ -0,0 +1,138 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>employee</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.employee#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.employee#getAddress <em>Address</em>}</li>
+ * <li>{@link cs2as.companies.employee#getSalary <em>Salary</em>}</li>
+ * <li>{@link cs2as.companies.employee#getMentor <em>Mentor</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.companies.CompaniesPackage#getemployee()
+ * @model
+ * @generated
+ */
+public interface employee extends CSTrace {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.companies.CompaniesPackage#getemployee_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.employee#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Address</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Address</em>' attribute.
+ * @see #setAddress(String)
+ * @see cs2as.companies.CompaniesPackage#getemployee_Address()
+ * @model
+ * @generated
+ */
+ String getAddress();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.employee#getAddress <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Address</em>' attribute.
+ * @see #getAddress()
+ * @generated
+ */
+ void setAddress(String value);
+
+ /**
+ * Returns the value of the '<em><b>Salary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Salary</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Salary</em>' attribute.
+ * @see #setSalary(double)
+ * @see cs2as.companies.CompaniesPackage#getemployee_Salary()
+ * @model
+ * @generated
+ */
+ double getSalary();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.employee#getSalary <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Salary</em>' attribute.
+ * @see #getSalary()
+ * @generated
+ */
+ void setSalary(double value);
+
+ /**
+ * Returns the value of the '<em><b>Mentor</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mentor</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mentor</em>' attribute.
+ * @see #setMentor(String)
+ * @see cs2as.companies.CompaniesPackage#getemployee_Mentor()
+ * @model
+ * @generated
+ */
+ String getMentor();
+
+ /**
+ * Sets the value of the '{@link cs2as.companies.employee#getMentor <em>Mentor</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Mentor</em>' attribute.
+ * @see #getMentor()
+ * @generated
+ */
+ void setMentor(String value);
+
+} // employee
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CSTraceImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CSTraceImpl.java
new file mode 100644
index 0000000..0884eca
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CSTraceImpl.java
@@ -0,0 +1,168 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CSTrace;
+import cs2as.companies.CompaniesPackage;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>CS Trace</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.CSTraceImpl#getAst <em>Ast</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public abstract class CSTraceImpl extends MinimalEObjectImpl.Container implements CSTrace {
+ /**
+ * The cached value of the '{@link #getAst() <em>Ast</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAst()
+ * @generated
+ * @ordered
+ */
+ protected Visitable ast;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CSTraceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.CS_TRACE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Visitable getAst() {
+ if (ast != null && ((EObject)ast).eIsProxy()) {
+ InternalEObject oldAst = (InternalEObject)ast;
+ ast = (Visitable)eResolveProxy(oldAst);
+ if (ast != oldAst) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompaniesPackage.CS_TRACE__AST, oldAst, ast));
+ }
+ }
+ return ast;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Visitable basicGetAst() {
+ return ast;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAst(Visitable newAst) {
+ Visitable oldAst = ast;
+ ast = newAst;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.CS_TRACE__AST, oldAst, ast));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CompaniesPackage.CS_TRACE__AST:
+ if (resolve) return getAst();
+ return basicGetAst();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CompaniesPackage.CS_TRACE__AST:
+ setAst((Visitable)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.CS_TRACE__AST:
+ setAst((Visitable)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.CS_TRACE__AST:
+ return ast != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+} //CSTraceImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesFactoryImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesFactoryImpl.java
new file mode 100644
index 0000000..453e18d
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesFactoryImpl.java
@@ -0,0 +1,147 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.*;
+
+import org.eclipse.emf.ecore.EClass;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompaniesFactoryImpl extends EFactoryImpl implements CompaniesFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompaniesFactory init() {
+ try {
+ CompaniesFactory theCompaniesFactory = (CompaniesFactory)EPackage.Registry.INSTANCE.getEFactory(CompaniesPackage.eNS_URI);
+ if (theCompaniesFactory != null) {
+ return theCompaniesFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new CompaniesFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompaniesFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case CompaniesPackage.COMPANY: return createcompany();
+ case CompaniesPackage.DEPARTMENT: return createdepartment();
+ case CompaniesPackage.DEPARTMENT_MANAGER: return createdepartment_manager();
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES: return createdepartment_employees();
+ case CompaniesPackage.EMPLOYEE: return createemployee();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public company createcompany() {
+ companyImpl company = new companyImpl();
+ return company;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public department createdepartment() {
+ departmentImpl department = new departmentImpl();
+ return department;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public department_manager createdepartment_manager() {
+ department_managerImpl department_manager = new department_managerImpl();
+ return department_manager;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public department_employees createdepartment_employees() {
+ department_employeesImpl department_employees = new department_employeesImpl();
+ return department_employees;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public employee createemployee() {
+ employeeImpl employee = new employeeImpl();
+ return employee;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompaniesPackage getCompaniesPackage() {
+ return (CompaniesPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static CompaniesPackage getPackage() {
+ return CompaniesPackage.eINSTANCE;
+ }
+
+} //CompaniesFactoryImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesPackageImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesPackageImpl.java
new file mode 100644
index 0000000..d52a1b1
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/CompaniesPackageImpl.java
@@ -0,0 +1,437 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CSTrace;
+import cs2as.companies.CompaniesFactory;
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.company;
+import cs2as.companies.department;
+import cs2as.companies.department_employees;
+import cs2as.companies.department_manager;
+import cs2as.companies.employee;
+
+import cs2as.company.CompanyPackage;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompaniesPackageImpl extends EPackageImpl implements CompaniesPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass companyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass departmentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass department_managerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass department_employeesEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass employeeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass csTraceEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see cs2as.companies.CompaniesPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private CompaniesPackageImpl() {
+ super(eNS_URI, CompaniesFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link CompaniesPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static CompaniesPackage init() {
+ if (isInited) return (CompaniesPackage)EPackage.Registry.INSTANCE.getEPackage(CompaniesPackage.eNS_URI);
+
+ // Obtain or create and register package
+ Object ePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ CompaniesPackageImpl theCompaniesPackage = (CompaniesPackageImpl)(ePackage instanceof CompaniesPackageImpl ? ePackage : new CompaniesPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ CompanyPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theCompaniesPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theCompaniesPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theCompaniesPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(CompaniesPackage.eNS_URI, theCompaniesPackage);
+ return theCompaniesPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getcompany() {
+ return companyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getcompany_Name() {
+ return (EAttribute)companyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getcompany_Deparment() {
+ return (EReference)companyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getdepartment() {
+ return departmentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getdepartment_Name() {
+ return (EAttribute)departmentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getdepartment_Department_manager() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getdepartment_Department_employees() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getdepartment_Deparment() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getdepartment_manager() {
+ return department_managerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getdepartment_manager_Employee() {
+ return (EReference)department_managerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getdepartment_employees() {
+ return department_employeesEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getdepartment_employees_Employee() {
+ return (EReference)department_employeesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getemployee() {
+ return employeeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getemployee_Name() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getemployee_Address() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getemployee_Salary() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getemployee_Mentor() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCSTrace() {
+ return csTraceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCSTrace_Ast() {
+ return (EReference)csTraceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompaniesFactory getCompaniesFactory() {
+ return (CompaniesFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ companyEClass = createEClass(COMPANY);
+ createEAttribute(companyEClass, COMPANY__NAME);
+ createEReference(companyEClass, COMPANY__DEPARMENT);
+
+ departmentEClass = createEClass(DEPARTMENT);
+ createEAttribute(departmentEClass, DEPARTMENT__NAME);
+ createEReference(departmentEClass, DEPARTMENT__DEPARTMENT_MANAGER);
+ createEReference(departmentEClass, DEPARTMENT__DEPARTMENT_EMPLOYEES);
+ createEReference(departmentEClass, DEPARTMENT__DEPARMENT);
+
+ department_managerEClass = createEClass(DEPARTMENT_MANAGER);
+ createEReference(department_managerEClass, DEPARTMENT_MANAGER__EMPLOYEE);
+
+ department_employeesEClass = createEClass(DEPARTMENT_EMPLOYEES);
+ createEReference(department_employeesEClass, DEPARTMENT_EMPLOYEES__EMPLOYEE);
+
+ employeeEClass = createEClass(EMPLOYEE);
+ createEAttribute(employeeEClass, EMPLOYEE__NAME);
+ createEAttribute(employeeEClass, EMPLOYEE__ADDRESS);
+ createEAttribute(employeeEClass, EMPLOYEE__SALARY);
+ createEAttribute(employeeEClass, EMPLOYEE__MENTOR);
+
+ csTraceEClass = createEClass(CS_TRACE);
+ createEReference(csTraceEClass, CS_TRACE__AST);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ CompanyPackage theCompanyPackage = (CompanyPackage)EPackage.Registry.INSTANCE.getEPackage(CompanyPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ companyEClass.getESuperTypes().add(this.getCSTrace());
+ departmentEClass.getESuperTypes().add(this.getCSTrace());
+ department_managerEClass.getESuperTypes().add(this.getCSTrace());
+ department_employeesEClass.getESuperTypes().add(this.getCSTrace());
+ employeeEClass.getESuperTypes().add(this.getCSTrace());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(companyEClass, company.class, "company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getcompany_Name(), ecorePackage.getEString(), "name", null, 0, 1, company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getcompany_Deparment(), this.getdepartment(), null, "deparment", null, 0, -1, company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(departmentEClass, department.class, "department", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getdepartment_Name(), ecorePackage.getEString(), "name", null, 0, 1, department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getdepartment_Department_manager(), this.getdepartment_manager(), null, "department_manager", null, 0, 1, department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getdepartment_Department_employees(), this.getdepartment_employees(), null, "department_employees", null, 0, 1, department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getdepartment_Deparment(), this.getdepartment(), null, "deparment", null, 0, -1, department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(department_managerEClass, department_manager.class, "department_manager", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getdepartment_manager_Employee(), this.getemployee(), null, "employee", null, 0, 1, department_manager.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(department_employeesEClass, department_employees.class, "department_employees", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getdepartment_employees_Employee(), this.getemployee(), null, "employee", null, 0, -1, department_employees.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(employeeEClass, employee.class, "employee", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getemployee_Name(), ecorePackage.getEString(), "name", null, 0, 1, employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getemployee_Address(), ecorePackage.getEString(), "address", null, 0, 1, employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getemployee_Salary(), ecorePackage.getEDouble(), "salary", null, 0, 1, employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getemployee_Mentor(), ecorePackage.getEString(), "mentor", null, 0, 1, employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(csTraceEClass, CSTrace.class, "CSTrace", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getCSTrace_Ast(), theCompanyPackage.getVisitable(), null, "ast", null, 0, 1, CSTrace.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //CompaniesPackageImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/companyImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/companyImpl.java
new file mode 100644
index 0000000..ae926ec
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/companyImpl.java
@@ -0,0 +1,230 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.company;
+import cs2as.companies.department;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>company</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.companyImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.impl.companyImpl#getDeparment <em>Deparment</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class companyImpl extends CSTraceImpl implements company {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getDeparment() <em>Deparment</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDeparment()
+ * @generated
+ * @ordered
+ */
+ protected EList<department> deparment;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected companyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.COMPANY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.COMPANY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<department> getDeparment() {
+ if (deparment == null) {
+ deparment = new EObjectContainmentEList<department>(department.class, this, CompaniesPackage.COMPANY__DEPARMENT);
+ }
+ return deparment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompaniesPackage.COMPANY__DEPARMENT:
+ return ((InternalEList<?>)getDeparment()).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 CompaniesPackage.COMPANY__NAME:
+ return getName();
+ case CompaniesPackage.COMPANY__DEPARMENT:
+ return getDeparment();
+ }
+ 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 CompaniesPackage.COMPANY__NAME:
+ setName((String)newValue);
+ return;
+ case CompaniesPackage.COMPANY__DEPARMENT:
+ getDeparment().clear();
+ getDeparment().addAll((Collection<? extends department>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.COMPANY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompaniesPackage.COMPANY__DEPARMENT:
+ getDeparment().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.COMPANY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompaniesPackage.COMPANY__DEPARMENT:
+ return deparment != null && !deparment.isEmpty();
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+
+} //companyImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/departmentImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/departmentImpl.java
new file mode 100644
index 0000000..279a910
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/departmentImpl.java
@@ -0,0 +1,363 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.department;
+import cs2as.companies.department_employees;
+import cs2as.companies.department_manager;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>department</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.departmentImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.impl.departmentImpl#getDepartment_manager <em>Department manager</em>}</li>
+ * <li>{@link cs2as.companies.impl.departmentImpl#getDepartment_employees <em>Department employees</em>}</li>
+ * <li>{@link cs2as.companies.impl.departmentImpl#getDeparment <em>Deparment</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class departmentImpl extends CSTraceImpl implements department {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getDepartment_manager() <em>Department manager</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDepartment_manager()
+ * @generated
+ * @ordered
+ */
+ protected department_manager department_manager;
+
+ /**
+ * The cached value of the '{@link #getDepartment_employees() <em>Department employees</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDepartment_employees()
+ * @generated
+ * @ordered
+ */
+ protected department_employees department_employees;
+
+ /**
+ * The cached value of the '{@link #getDeparment() <em>Deparment</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDeparment()
+ * @generated
+ * @ordered
+ */
+ protected EList<department> deparment;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected departmentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.DEPARTMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public department_manager getDepartment_manager() {
+ return department_manager;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetDepartment_manager(department_manager newDepartment_manager, NotificationChain msgs) {
+ department_manager oldDepartment_manager = department_manager;
+ department_manager = newDepartment_manager;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER, oldDepartment_manager, newDepartment_manager);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDepartment_manager(department_manager newDepartment_manager) {
+ if (newDepartment_manager != department_manager) {
+ NotificationChain msgs = null;
+ if (department_manager != null)
+ msgs = ((InternalEObject)department_manager).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER, null, msgs);
+ if (newDepartment_manager != null)
+ msgs = ((InternalEObject)newDepartment_manager).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER, null, msgs);
+ msgs = basicSetDepartment_manager(newDepartment_manager, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER, newDepartment_manager, newDepartment_manager));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public department_employees getDepartment_employees() {
+ return department_employees;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetDepartment_employees(department_employees newDepartment_employees, NotificationChain msgs) {
+ department_employees oldDepartment_employees = department_employees;
+ department_employees = newDepartment_employees;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES, oldDepartment_employees, newDepartment_employees);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setDepartment_employees(department_employees newDepartment_employees) {
+ if (newDepartment_employees != department_employees) {
+ NotificationChain msgs = null;
+ if (department_employees != null)
+ msgs = ((InternalEObject)department_employees).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES, null, msgs);
+ if (newDepartment_employees != null)
+ msgs = ((InternalEObject)newDepartment_employees).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES, null, msgs);
+ msgs = basicSetDepartment_employees(newDepartment_employees, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES, newDepartment_employees, newDepartment_employees));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<department> getDeparment() {
+ if (deparment == null) {
+ deparment = new EObjectContainmentEList<department>(department.class, this, CompaniesPackage.DEPARTMENT__DEPARMENT);
+ }
+ return deparment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER:
+ return basicSetDepartment_manager(null, msgs);
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES:
+ return basicSetDepartment_employees(null, msgs);
+ case CompaniesPackage.DEPARTMENT__DEPARMENT:
+ return ((InternalEList<?>)getDeparment()).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 CompaniesPackage.DEPARTMENT__NAME:
+ return getName();
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER:
+ return getDepartment_manager();
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES:
+ return getDepartment_employees();
+ case CompaniesPackage.DEPARTMENT__DEPARMENT:
+ return getDeparment();
+ }
+ 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 CompaniesPackage.DEPARTMENT__NAME:
+ setName((String)newValue);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER:
+ setDepartment_manager((department_manager)newValue);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES:
+ setDepartment_employees((department_employees)newValue);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARMENT:
+ getDeparment().clear();
+ getDeparment().addAll((Collection<? extends department>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER:
+ setDepartment_manager((department_manager)null);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES:
+ setDepartment_employees((department_employees)null);
+ return;
+ case CompaniesPackage.DEPARTMENT__DEPARMENT:
+ getDeparment().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_MANAGER:
+ return department_manager != null;
+ case CompaniesPackage.DEPARTMENT__DEPARTMENT_EMPLOYEES:
+ return department_employees != null;
+ case CompaniesPackage.DEPARTMENT__DEPARMENT:
+ return deparment != null && !deparment.isEmpty();
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+
+} //departmentImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_employeesImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_employeesImpl.java
new file mode 100644
index 0000000..bc60100
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_employeesImpl.java
@@ -0,0 +1,159 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.department_employees;
+import cs2as.companies.employee;
+
+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.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>department employees</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.department_employeesImpl#getEmployee <em>Employee</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class department_employeesImpl extends CSTraceImpl implements department_employees {
+ /**
+ * The cached value of the '{@link #getEmployee() <em>Employee</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEmployee()
+ * @generated
+ * @ordered
+ */
+ protected EList<employee> employee;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected department_employeesImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.DEPARTMENT_EMPLOYEES;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<employee> getEmployee() {
+ if (employee == null) {
+ employee = new EObjectContainmentEList<employee>(employee.class, this, CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE);
+ }
+ return employee;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE:
+ return ((InternalEList<?>)getEmployee()).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 CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE:
+ return getEmployee();
+ }
+ 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 CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE:
+ getEmployee().clear();
+ getEmployee().addAll((Collection<? extends employee>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE:
+ getEmployee().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES__EMPLOYEE:
+ return employee != null && !employee.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+} //department_employeesImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_managerImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_managerImpl.java
new file mode 100644
index 0000000..3d43252
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/department_managerImpl.java
@@ -0,0 +1,184 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.department_manager;
+import cs2as.companies.employee;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>department manager</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.department_managerImpl#getEmployee <em>Employee</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class department_managerImpl extends CSTraceImpl implements department_manager {
+ /**
+ * The cached value of the '{@link #getEmployee() <em>Employee</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEmployee()
+ * @generated
+ * @ordered
+ */
+ protected employee employee;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected department_managerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.DEPARTMENT_MANAGER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public employee getEmployee() {
+ return employee;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetEmployee(employee newEmployee, NotificationChain msgs) {
+ employee oldEmployee = employee;
+ employee = newEmployee;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE, oldEmployee, newEmployee);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setEmployee(employee newEmployee) {
+ if (newEmployee != employee) {
+ NotificationChain msgs = null;
+ if (employee != null)
+ msgs = ((InternalEObject)employee).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE, null, msgs);
+ if (newEmployee != null)
+ msgs = ((InternalEObject)newEmployee).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE, null, msgs);
+ msgs = basicSetEmployee(newEmployee, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE, newEmployee, newEmployee));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE:
+ return basicSetEmployee(null, 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 CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE:
+ return getEmployee();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE:
+ setEmployee((employee)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE:
+ setEmployee((employee)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.DEPARTMENT_MANAGER__EMPLOYEE:
+ return employee != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+
+} //department_managerImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/employeeImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/employeeImpl.java
new file mode 100644
index 0000000..c3ff343
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/impl/employeeImpl.java
@@ -0,0 +1,333 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.impl;
+
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.employee;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>employee</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.companies.impl.employeeImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.companies.impl.employeeImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link cs2as.companies.impl.employeeImpl#getSalary <em>Salary</em>}</li>
+ * <li>{@link cs2as.companies.impl.employeeImpl#getMentor <em>Mentor</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class employeeImpl extends CSTraceImpl implements employee {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected static final String ADDRESS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected String address = ADDRESS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSalary() <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSalary()
+ * @generated
+ * @ordered
+ */
+ protected static final double SALARY_EDEFAULT = 0.0;
+
+ /**
+ * The cached value of the '{@link #getSalary() <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSalary()
+ * @generated
+ * @ordered
+ */
+ protected double salary = SALARY_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getMentor() <em>Mentor</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMentor()
+ * @generated
+ * @ordered
+ */
+ protected static final String MENTOR_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMentor() <em>Mentor</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMentor()
+ * @generated
+ * @ordered
+ */
+ protected String mentor = MENTOR_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected employeeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompaniesPackage.Literals.EMPLOYEE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.EMPLOYEE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAddress(String newAddress) {
+ String oldAddress = address;
+ address = newAddress;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.EMPLOYEE__ADDRESS, oldAddress, address));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public double getSalary() {
+ return salary;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSalary(double newSalary) {
+ double oldSalary = salary;
+ salary = newSalary;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.EMPLOYEE__SALARY, oldSalary, salary));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getMentor() {
+ return mentor;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMentor(String newMentor) {
+ String oldMentor = mentor;
+ mentor = newMentor;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompaniesPackage.EMPLOYEE__MENTOR, oldMentor, mentor));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CompaniesPackage.EMPLOYEE__NAME:
+ return getName();
+ case CompaniesPackage.EMPLOYEE__ADDRESS:
+ return getAddress();
+ case CompaniesPackage.EMPLOYEE__SALARY:
+ return getSalary();
+ case CompaniesPackage.EMPLOYEE__MENTOR:
+ return getMentor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CompaniesPackage.EMPLOYEE__NAME:
+ setName((String)newValue);
+ return;
+ case CompaniesPackage.EMPLOYEE__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case CompaniesPackage.EMPLOYEE__SALARY:
+ setSalary((Double)newValue);
+ return;
+ case CompaniesPackage.EMPLOYEE__MENTOR:
+ setMentor((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.EMPLOYEE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompaniesPackage.EMPLOYEE__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case CompaniesPackage.EMPLOYEE__SALARY:
+ setSalary(SALARY_EDEFAULT);
+ return;
+ case CompaniesPackage.EMPLOYEE__MENTOR:
+ setMentor(MENTOR_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompaniesPackage.EMPLOYEE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompaniesPackage.EMPLOYEE__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case CompaniesPackage.EMPLOYEE__SALARY:
+ return salary != SALARY_EDEFAULT;
+ case CompaniesPackage.EMPLOYEE__MENTOR:
+ return MENTOR_EDEFAULT == null ? mentor != null : !MENTOR_EDEFAULT.equals(mentor);
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(", address: ");
+ result.append(address);
+ result.append(", salary: ");
+ result.append(salary);
+ result.append(", mentor: ");
+ result.append(mentor);
+ result.append(')');
+ return result.toString();
+ }
+
+
+} //employeeImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesAdapterFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesAdapterFactory.java
new file mode 100644
index 0000000..cfa9fed
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesAdapterFactory.java
@@ -0,0 +1,220 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.util;
+
+import cs2as.companies.*;
+
+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.eclipse.jdt.annotation.Nullable;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.CompaniesPackage
+ * @generated
+ */
+public class CompaniesAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CompaniesPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompaniesAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = CompaniesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CompaniesSwitch<@Nullable Adapter> modelSwitch =
+ new CompaniesSwitch<@Nullable Adapter>() {
+ @Override
+ public Adapter casecompany(company object) {
+ return createcompanyAdapter();
+ }
+ @Override
+ public Adapter casedepartment(department object) {
+ return createdepartmentAdapter();
+ }
+ @Override
+ public Adapter casedepartment_manager(department_manager object) {
+ return createdepartment_managerAdapter();
+ }
+ @Override
+ public Adapter casedepartment_employees(department_employees object) {
+ return createdepartment_employeesAdapter();
+ }
+ @Override
+ public Adapter caseemployee(employee object) {
+ return createemployeeAdapter();
+ }
+ @Override
+ public Adapter caseCSTrace(CSTrace object) {
+ return createCSTraceAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.company <em>company</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 cs2as.companies.company
+ * @generated
+ */
+ public Adapter createcompanyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.department <em>department</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 cs2as.companies.department
+ * @generated
+ */
+ public Adapter createdepartmentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.department_manager <em>department manager</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 cs2as.companies.department_manager
+ * @generated
+ */
+ public Adapter createdepartment_managerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.department_employees <em>department employees</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 cs2as.companies.department_employees
+ * @generated
+ */
+ public Adapter createdepartment_employeesAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.employee <em>employee</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 cs2as.companies.employee
+ * @generated
+ */
+ public Adapter createemployeeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.companies.CSTrace <em>CS Trace</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 cs2as.companies.CSTrace
+ * @generated
+ */
+ public Adapter createCSTraceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //CompaniesAdapterFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesSwitch.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesSwitch.java
new file mode 100644
index 0000000..047c812
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/companies/util/CompaniesSwitch.java
@@ -0,0 +1,230 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.companies.util;
+
+import cs2as.companies.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see cs2as.companies.CompaniesPackage
+ * @generated
+ */
+public class CompaniesSwitch<@Nullable T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CompaniesPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompaniesSwitch() {
+ if (modelPackage == null) {
+ modelPackage = CompaniesPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case CompaniesPackage.COMPANY: {
+ company company = (company)theEObject;
+ T result = casecompany(company);
+ if (result == null) result = caseCSTrace(company);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompaniesPackage.DEPARTMENT: {
+ department department = (department)theEObject;
+ T result = casedepartment(department);
+ if (result == null) result = caseCSTrace(department);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompaniesPackage.DEPARTMENT_MANAGER: {
+ department_manager department_manager = (department_manager)theEObject;
+ T result = casedepartment_manager(department_manager);
+ if (result == null) result = caseCSTrace(department_manager);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES: {
+ department_employees department_employees = (department_employees)theEObject;
+ T result = casedepartment_employees(department_employees);
+ if (result == null) result = caseCSTrace(department_employees);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompaniesPackage.EMPLOYEE: {
+ employee employee = (employee)theEObject;
+ T result = caseemployee(employee);
+ if (result == null) result = caseCSTrace(employee);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompaniesPackage.CS_TRACE: {
+ CSTrace csTrace = (CSTrace)theEObject;
+ T result = caseCSTrace(csTrace);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>company</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>company</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casecompany(company object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>department</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>department</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casedepartment(department object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>department manager</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>department manager</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casedepartment_manager(department_manager object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>department employees</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>department employees</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casedepartment_employees(department_employees object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>employee</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>employee</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseemployee(employee object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>CS Trace</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>CS Trace</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCSTrace(CSTrace object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //CompaniesSwitch
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Company.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Company.java
new file mode 100644
index 0000000..30da76f
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Company.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Company</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.Company#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.Company#getDepts <em>Depts</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.company.CompanyPackage#getCompany()
+ * @model superTypes="cs2as.company.Visitable"
+ * @generated
+ */
+public interface Company extends EObject, Visitable {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.company.CompanyPackage#getCompany_Name()
+ * @model required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Company!name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Company#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Depts</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.company.Department}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Depts</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>Depts</em>' containment reference list.
+ * @see cs2as.company.CompanyPackage#getCompany_Depts()
+ * @model containment="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Company!depts'"
+ * @generated
+ */
+ EList<Department> getDepts();
+
+} // Company
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyFactory.java
new file mode 100644
index 0000000..703055d
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyFactory.java
@@ -0,0 +1,68 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.CompanyPackage
+ * @generated
+ */
+public interface CompanyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CompanyFactory eINSTANCE = cs2as.company.impl.CompanyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Company</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Company</em>'.
+ * @generated
+ */
+ Company createCompany();
+
+ /**
+ * Returns a new object of class '<em>Department</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Department</em>'.
+ * @generated
+ */
+ Department createDepartment();
+
+ /**
+ * Returns a new object of class '<em>Employee</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Employee</em>'.
+ * @generated
+ */
+ Employee createEmployee();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ CompanyPackage getCompanyPackage();
+
+} //CompanyFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyPackage.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyPackage.java
new file mode 100644
index 0000000..064f06b
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyPackage.java
@@ -0,0 +1,566 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see cs2as.company.CompanyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface CompanyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "company";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://cs2as/tests/companies/AS/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "comas";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ CompanyPackage eINSTANCE = cs2as.company.impl.CompanyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link cs2as.company.util.Visitable <em>Visitable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.util.Visitable
+ * @see cs2as.company.impl.CompanyPackageImpl#getVisitable()
+ * @generated
+ */
+ int VISITABLE = 3;
+
+ /**
+ * The number of structural features of the '<em>Visitable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VISITABLE_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the '<em>Visitable</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int VISITABLE_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link cs2as.company.impl.CompanyImpl <em>Company</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.CompanyImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getCompany()
+ * @generated
+ */
+ int COMPANY = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__NAME = VISITABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Depts</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY__DEPTS = VISITABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Company</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY_FEATURE_COUNT = VISITABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of operations of the '<em>Company</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMPANY_OPERATION_COUNT = VISITABLE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link cs2as.company.impl.DepartmentImpl <em>Department</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.DepartmentImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getDepartment()
+ * @generated
+ */
+ int DEPARTMENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__NAME = VISITABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Manager</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__MANAGER = VISITABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Subdepts</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__SUBDEPTS = VISITABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Employees</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT__EMPLOYEES = VISITABLE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Department</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_FEATURE_COUNT = VISITABLE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Department</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DEPARTMENT_OPERATION_COUNT = VISITABLE_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link cs2as.company.impl.EmployeeImpl <em>Employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.EmployeeImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getEmployee()
+ * @generated
+ */
+ int EMPLOYEE = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__NAME = VISITABLE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__ADDRESS = VISITABLE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Salary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__SALARY = VISITABLE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Mentor</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE__MENTOR = VISITABLE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Employee</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_FEATURE_COUNT = VISITABLE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of operations of the '<em>Employee</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPLOYEE_OPERATION_COUNT = VISITABLE_OPERATION_COUNT + 0;
+
+
+ /**
+ * Returns the meta object for class '{@link cs2as.company.Company <em>Company</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Company</em>'.
+ * @see cs2as.company.Company
+ * @generated
+ */
+ EClass getCompany();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.company.Company#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.company.Company#getName()
+ * @see #getCompany()
+ * @generated
+ */
+ EAttribute getCompany_Name();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.company.Company#getDepts <em>Depts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Depts</em>'.
+ * @see cs2as.company.Company#getDepts()
+ * @see #getCompany()
+ * @generated
+ */
+ EReference getCompany_Depts();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.company.Department <em>Department</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Department</em>'.
+ * @see cs2as.company.Department
+ * @generated
+ */
+ EClass getDepartment();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.company.Department#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.company.Department#getName()
+ * @see #getDepartment()
+ * @generated
+ */
+ EAttribute getDepartment_Name();
+
+ /**
+ * Returns the meta object for the containment reference '{@link cs2as.company.Department#getManager <em>Manager</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Manager</em>'.
+ * @see cs2as.company.Department#getManager()
+ * @see #getDepartment()
+ * @generated
+ */
+ EReference getDepartment_Manager();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.company.Department#getSubdepts <em>Subdepts</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Subdepts</em>'.
+ * @see cs2as.company.Department#getSubdepts()
+ * @see #getDepartment()
+ * @generated
+ */
+ EReference getDepartment_Subdepts();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link cs2as.company.Department#getEmployees <em>Employees</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Employees</em>'.
+ * @see cs2as.company.Department#getEmployees()
+ * @see #getDepartment()
+ * @generated
+ */
+ EReference getDepartment_Employees();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.company.Employee <em>Employee</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Employee</em>'.
+ * @see cs2as.company.Employee
+ * @generated
+ */
+ EClass getEmployee();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.company.Employee#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see cs2as.company.Employee#getName()
+ * @see #getEmployee()
+ * @generated
+ */
+ EAttribute getEmployee_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.company.Employee#getAddress <em>Address</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Address</em>'.
+ * @see cs2as.company.Employee#getAddress()
+ * @see #getEmployee()
+ * @generated
+ */
+ EAttribute getEmployee_Address();
+
+ /**
+ * Returns the meta object for the attribute '{@link cs2as.company.Employee#getSalary <em>Salary</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Salary</em>'.
+ * @see cs2as.company.Employee#getSalary()
+ * @see #getEmployee()
+ * @generated
+ */
+ EAttribute getEmployee_Salary();
+
+ /**
+ * Returns the meta object for the reference '{@link cs2as.company.Employee#getMentor <em>Mentor</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Mentor</em>'.
+ * @see cs2as.company.Employee#getMentor()
+ * @see #getEmployee()
+ * @generated
+ */
+ EReference getEmployee_Mentor();
+
+ /**
+ * Returns the meta object for class '{@link cs2as.company.util.Visitable <em>Visitable</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Visitable</em>'.
+ * @see cs2as.company.util.Visitable
+ * @model instanceClass="cs2as.company.util.Visitable"
+ * @generated
+ */
+ EClass getVisitable();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ CompanyFactory getCompanyFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link cs2as.company.impl.CompanyImpl <em>Company</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.CompanyImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getCompany()
+ * @generated
+ */
+ EClass COMPANY = eINSTANCE.getCompany();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMPANY__NAME = eINSTANCE.getCompany_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Depts</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMPANY__DEPTS = eINSTANCE.getCompany_Depts();
+
+ /**
+ * The meta object literal for the '{@link cs2as.company.impl.DepartmentImpl <em>Department</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.DepartmentImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getDepartment()
+ * @generated
+ */
+ EClass DEPARTMENT = eINSTANCE.getDepartment();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DEPARTMENT__NAME = eINSTANCE.getDepartment_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Manager</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__MANAGER = eINSTANCE.getDepartment_Manager();
+
+ /**
+ * The meta object literal for the '<em><b>Subdepts</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__SUBDEPTS = eINSTANCE.getDepartment_Subdepts();
+
+ /**
+ * The meta object literal for the '<em><b>Employees</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DEPARTMENT__EMPLOYEES = eINSTANCE.getDepartment_Employees();
+
+ /**
+ * The meta object literal for the '{@link cs2as.company.impl.EmployeeImpl <em>Employee</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.impl.EmployeeImpl
+ * @see cs2as.company.impl.CompanyPackageImpl#getEmployee()
+ * @generated
+ */
+ EClass EMPLOYEE = eINSTANCE.getEmployee();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__NAME = eINSTANCE.getEmployee_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Address</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__ADDRESS = eINSTANCE.getEmployee_Address();
+
+ /**
+ * The meta object literal for the '<em><b>Salary</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EMPLOYEE__SALARY = eINSTANCE.getEmployee_Salary();
+
+ /**
+ * The meta object literal for the '<em><b>Mentor</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EMPLOYEE__MENTOR = eINSTANCE.getEmployee_Mentor();
+
+ /**
+ * The meta object literal for the '{@link cs2as.company.util.Visitable <em>Visitable</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.util.Visitable
+ * @see cs2as.company.impl.CompanyPackageImpl#getVisitable()
+ * @generated
+ */
+ EClass VISITABLE = eINSTANCE.getVisitable();
+
+ }
+
+} //CompanyPackage
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyTables.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyTables.java
new file mode 100644
index 0000000..e9f3797
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/CompanyTables.java
@@ -0,0 +1,584 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *************************************************************************
+ * This code is 100% auto-generated
+ * from:
+ * /org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.ecore
+ * using:
+ * /org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ * org.eclipse.ocl.examples.codegen.oclinecore.OCLinEcoreTables
+ *
+ * Do not edit it.
+ *******************************************************************************/
+package cs2as.company;
+
+import cs2as.company.CompanyTables;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorPackage;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorProperty;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorType;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreLibraryOppositeProperty;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorFragment;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorOperation;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorProperty;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorPropertyWithImplementation;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorStandardLibrary;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorType;
+import org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables;
+
+/**
+ * CompanyTables provides the dispatch tables for the company for use by the OCL dispatcher.
+ *
+ * In order to ensure correct static initialization, a top level class element must be accessed
+ * before any nested class element. Therefore an access to PACKAGE.getClass() is recommended.
+ */
+@SuppressWarnings("nls")
+public class CompanyTables
+{
+ static {
+ Init.initStart();
+ }
+
+ /**
+ * The package descriptor for the package.
+ */
+ public static final @NonNull EcoreExecutorPackage PACKAGE = new EcoreExecutorPackage(CompanyPackage.eINSTANCE);
+
+ /**
+ * The library of all packages and types.
+ */
+ public static final @NonNull ExecutorStandardLibrary LIBRARY = OCLstdlibTables.LIBRARY;
+
+ /**
+ * Constants used by auto-generated code.
+ */
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0 = org.eclipse.ocl.pivot.ids.IdManager.getNsURIPackageId("http://cs2as/tests/companies/AS/1.0", null, cs2as.company.CompanyPackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_www_eclipse_org_s_emf_s_2002_s_Ecore = org.eclipse.ocl.pivot.ids.IdManager.getNsURIPackageId("http://www.eclipse.org/emf/2002/Ecore", null, org.eclipse.emf.ecore.EcorePackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Company = cs2as.company.CompanyTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0.getClassId("Company", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Department = cs2as.company.CompanyTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0.getClassId("Department", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Employee = cs2as.company.CompanyTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0.getClassId("Employee", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull DataTypeId DATAid_EDouble = cs2as.company.CompanyTables.PACKid_http_c_s_s_www_eclipse_org_s_emf_s_2002_s_Ecore.getDataTypeId("EDouble", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId BAG_CLSSid_Employee = org.eclipse.ocl.pivot.ids.TypeId.BAG.getSpecializedId(cs2as.company.CompanyTables.CLSSid_Employee);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Department = org.eclipse.ocl.pivot.ids.TypeId.ORDERED_SET.getSpecializedId(cs2as.company.CompanyTables.CLSSid_Department);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Employee = org.eclipse.ocl.pivot.ids.TypeId.ORDERED_SET.getSpecializedId(cs2as.company.CompanyTables.CLSSid_Employee);
+
+ /**
+ * The type parameters for templated types and operations.
+ */
+ public static class TypeParameters {
+ static {
+ Init.initStart();
+ CompanyTables.init();
+ }
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::TypeParameters and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The type descriptors for each type.
+ */
+ public static class Types {
+ static {
+ Init.initStart();
+ TypeParameters.init();
+ }
+
+ public static final @NonNull EcoreExecutorType _Company = new EcoreExecutorType(CompanyPackage.Literals.COMPANY, PACKAGE, 0);
+ public static final @NonNull EcoreExecutorType _Department = new EcoreExecutorType(CompanyPackage.Literals.DEPARTMENT, PACKAGE, 0);
+ public static final @NonNull EcoreExecutorType _Employee = new EcoreExecutorType(CompanyPackage.Literals.EMPLOYEE, PACKAGE, 0);
+ public static final @NonNull EcoreExecutorType _Visitable = new EcoreExecutorType(CompanyPackage.Literals.VISITABLE, PACKAGE, 0 | ExecutorType.ABSTRACT);
+
+ private static final @NonNull EcoreExecutorType @NonNull [] types = {
+ _Company,
+ _Department,
+ _Employee,
+ _Visitable
+ };
+
+ /*
+ * Install the type descriptors in the package descriptor.
+ */
+ static {
+ PACKAGE.init(LIBRARY, types);
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::Types and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The fragment descriptors for the local elements of each type and its supertypes.
+ */
+ public static class Fragments {
+ static {
+ Init.initStart();
+ Types.init();
+ }
+
+ private static final @NonNull ExecutorFragment _Company__Company = new ExecutorFragment(Types._Company, CompanyTables.Types._Company);
+ private static final @NonNull ExecutorFragment _Company__OclAny = new ExecutorFragment(Types._Company, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _Company__OclElement = new ExecutorFragment(Types._Company, OCLstdlibTables.Types._OclElement);
+ private static final @NonNull ExecutorFragment _Company__Visitable = new ExecutorFragment(Types._Company, CompanyTables.Types._Visitable);
+
+ private static final @NonNull ExecutorFragment _Department__Department = new ExecutorFragment(Types._Department, CompanyTables.Types._Department);
+ private static final @NonNull ExecutorFragment _Department__OclAny = new ExecutorFragment(Types._Department, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _Department__OclElement = new ExecutorFragment(Types._Department, OCLstdlibTables.Types._OclElement);
+ private static final @NonNull ExecutorFragment _Department__Visitable = new ExecutorFragment(Types._Department, CompanyTables.Types._Visitable);
+
+ private static final @NonNull ExecutorFragment _Employee__Employee = new ExecutorFragment(Types._Employee, CompanyTables.Types._Employee);
+ private static final @NonNull ExecutorFragment _Employee__OclAny = new ExecutorFragment(Types._Employee, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _Employee__OclElement = new ExecutorFragment(Types._Employee, OCLstdlibTables.Types._OclElement);
+ private static final @NonNull ExecutorFragment _Employee__Visitable = new ExecutorFragment(Types._Employee, CompanyTables.Types._Visitable);
+
+ private static final @NonNull ExecutorFragment _Visitable__OclAny = new ExecutorFragment(Types._Visitable, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _Visitable__OclElement = new ExecutorFragment(Types._Visitable, OCLstdlibTables.Types._OclElement);
+ private static final @NonNull ExecutorFragment _Visitable__Visitable = new ExecutorFragment(Types._Visitable, CompanyTables.Types._Visitable);
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::Fragments and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The parameter lists shared by operations.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Parameters {
+ static {
+ Init.initStart();
+ Fragments.init();
+ }
+
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::Parameters and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The operation descriptors for each operation of each type.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Operations {
+ static {
+ Init.initStart();
+ Parameters.init();
+ }
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::Operations and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The property descriptors for each property of each type.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Properties {
+ static {
+ Init.initStart();
+ Operations.init();
+ }
+
+ public static final @NonNull ExecutorProperty _Company__depts = new EcoreExecutorProperty(CompanyPackage.Literals.COMPANY__DEPTS, Types._Company, 0);
+ public static final @NonNull ExecutorProperty _Company__name = new EcoreExecutorProperty(CompanyPackage.Literals.COMPANY__NAME, Types._Company, 1);
+
+ public static final @NonNull ExecutorProperty _Department__employees = new EcoreExecutorProperty(CompanyPackage.Literals.DEPARTMENT__EMPLOYEES, Types._Department, 0);
+ public static final @NonNull ExecutorProperty _Department__manager = new EcoreExecutorProperty(CompanyPackage.Literals.DEPARTMENT__MANAGER, Types._Department, 1);
+ public static final @NonNull ExecutorProperty _Department__name = new EcoreExecutorProperty(CompanyPackage.Literals.DEPARTMENT__NAME, Types._Department, 2);
+ public static final @NonNull ExecutorProperty _Department__subdepts = new EcoreExecutorProperty(CompanyPackage.Literals.DEPARTMENT__SUBDEPTS, Types._Department, 3);
+ public static final @NonNull ExecutorProperty _Department__Company__depts = new ExecutorPropertyWithImplementation("Company", Types._Department, 4, new EcoreLibraryOppositeProperty(CompanyPackage.Literals.COMPANY__DEPTS));
+ public static final @NonNull ExecutorProperty _Department__Department__subdepts = new ExecutorPropertyWithImplementation("Department", Types._Department, 5, new EcoreLibraryOppositeProperty(CompanyPackage.Literals.DEPARTMENT__SUBDEPTS));
+
+ public static final @NonNull ExecutorProperty _Employee__address = new EcoreExecutorProperty(CompanyPackage.Literals.EMPLOYEE__ADDRESS, Types._Employee, 0);
+ public static final @NonNull ExecutorProperty _Employee__mentor = new EcoreExecutorProperty(CompanyPackage.Literals.EMPLOYEE__MENTOR, Types._Employee, 1);
+ public static final @NonNull ExecutorProperty _Employee__name = new EcoreExecutorProperty(CompanyPackage.Literals.EMPLOYEE__NAME, Types._Employee, 2);
+ public static final @NonNull ExecutorProperty _Employee__salary = new EcoreExecutorProperty(CompanyPackage.Literals.EMPLOYEE__SALARY, Types._Employee, 3);
+ public static final @NonNull ExecutorProperty _Employee__Department__employees = new ExecutorPropertyWithImplementation("Department", Types._Employee, 4, new EcoreLibraryOppositeProperty(CompanyPackage.Literals.DEPARTMENT__EMPLOYEES));
+ public static final @NonNull ExecutorProperty _Employee__Department__manager = new ExecutorPropertyWithImplementation("Department", Types._Employee, 5, new EcoreLibraryOppositeProperty(CompanyPackage.Literals.DEPARTMENT__MANAGER));
+ public static final @NonNull ExecutorProperty _Employee__Employee__mentor = new ExecutorPropertyWithImplementation("Employee", Types._Employee, 6, new EcoreLibraryOppositeProperty(CompanyPackage.Literals.EMPLOYEE__MENTOR));
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::Properties and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The fragments for all base types in depth order: OclAny first, OclSelf last.
+ */
+ public static class TypeFragments {
+ static {
+ Init.initStart();
+ Properties.init();
+ }
+
+ private static final @NonNull ExecutorFragment @NonNull [] _Company =
+ {
+ Fragments._Company__OclAny /* 0 */,
+ Fragments._Company__OclElement /* 1 */,
+ Fragments._Company__Visitable /* 2 */,
+ Fragments._Company__Company /* 3 */
+ };
+ private static final int @NonNull [] __Company = { 1,1,1,1 };
+
+ private static final @NonNull ExecutorFragment @NonNull [] _Department =
+ {
+ Fragments._Department__OclAny /* 0 */,
+ Fragments._Department__OclElement /* 1 */,
+ Fragments._Department__Visitable /* 2 */,
+ Fragments._Department__Department /* 3 */
+ };
+ private static final int @NonNull [] __Department = { 1,1,1,1 };
+
+ private static final @NonNull ExecutorFragment @NonNull [] _Employee =
+ {
+ Fragments._Employee__OclAny /* 0 */,
+ Fragments._Employee__OclElement /* 1 */,
+ Fragments._Employee__Visitable /* 2 */,
+ Fragments._Employee__Employee /* 3 */
+ };
+ private static final int @NonNull [] __Employee = { 1,1,1,1 };
+
+ private static final @NonNull ExecutorFragment @NonNull [] _Visitable =
+ {
+ Fragments._Visitable__OclAny /* 0 */,
+ Fragments._Visitable__OclElement /* 1 */,
+ Fragments._Visitable__Visitable /* 2 */
+ };
+ private static final int @NonNull [] __Visitable = { 1,1,1 };
+
+ /**
+ * Install the fragment descriptors in the class descriptors.
+ */
+ static {
+ Types._Company.initFragments(_Company, __Company);
+ Types._Department.initFragments(_Department, __Department);
+ Types._Employee.initFragments(_Employee, __Employee);
+ Types._Visitable.initFragments(_Visitable, __Visitable);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::TypeFragments and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of local operations or local operation overrides for each fragment of each type.
+ */
+ public static class FragmentOperations {
+ static {
+ Init.initStart();
+ TypeFragments.init();
+ }
+
+ private static final @NonNull ExecutorOperation @NonNull [] _Company__Company = {};
+ private static final @NonNull ExecutorOperation @NonNull [] _Company__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Company__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Company__Visitable = {};
+
+ private static final @NonNull ExecutorOperation @NonNull [] _Department__Department = {};
+ private static final @NonNull ExecutorOperation @NonNull [] _Department__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Department__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Department__Visitable = {};
+
+ private static final @NonNull ExecutorOperation @NonNull [] _Employee__Employee = {};
+ private static final @NonNull ExecutorOperation @NonNull [] _Employee__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Employee__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Employee__Visitable = {};
+
+ private static final @NonNull ExecutorOperation @NonNull [] _Visitable__Visitable = {};
+ private static final @NonNull ExecutorOperation @NonNull [] _Visitable__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Visitable__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+
+ /*
+ * Install the operation descriptors in the fragment descriptors.
+ */
+ static {
+ Fragments._Company__Company.initOperations(_Company__Company);
+ Fragments._Company__OclAny.initOperations(_Company__OclAny);
+ Fragments._Company__OclElement.initOperations(_Company__OclElement);
+ Fragments._Company__Visitable.initOperations(_Company__Visitable);
+
+ Fragments._Department__Department.initOperations(_Department__Department);
+ Fragments._Department__OclAny.initOperations(_Department__OclAny);
+ Fragments._Department__OclElement.initOperations(_Department__OclElement);
+ Fragments._Department__Visitable.initOperations(_Department__Visitable);
+
+ Fragments._Employee__Employee.initOperations(_Employee__Employee);
+ Fragments._Employee__OclAny.initOperations(_Employee__OclAny);
+ Fragments._Employee__OclElement.initOperations(_Employee__OclElement);
+ Fragments._Employee__Visitable.initOperations(_Employee__Visitable);
+
+ Fragments._Visitable__OclAny.initOperations(_Visitable__OclAny);
+ Fragments._Visitable__OclElement.initOperations(_Visitable__OclElement);
+ Fragments._Visitable__Visitable.initOperations(_Visitable__Visitable);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::FragmentOperations and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of local properties for the local fragment of each type.
+ */
+ public static class FragmentProperties {
+ static {
+ Init.initStart();
+ FragmentOperations.init();
+ }
+
+ private static final @NonNull ExecutorProperty @NonNull [] _Company = {
+ CompanyTables.Properties._Company__depts,
+ CompanyTables.Properties._Company__name
+ };
+
+ private static final @NonNull ExecutorProperty @NonNull [] _Department = {
+ CompanyTables.Properties._Department__employees,
+ CompanyTables.Properties._Department__manager,
+ CompanyTables.Properties._Department__name,
+ CompanyTables.Properties._Department__subdepts
+ };
+
+ private static final @NonNull ExecutorProperty @NonNull [] _Employee = {
+ CompanyTables.Properties._Employee__address,
+ CompanyTables.Properties._Employee__mentor,
+ CompanyTables.Properties._Employee__name,
+ CompanyTables.Properties._Employee__salary
+ };
+
+ private static final @NonNull ExecutorProperty @NonNull [] _Visitable = {};
+
+ /**
+ * Install the property descriptors in the fragment descriptors.
+ */
+ static {
+ Fragments._Company__Company.initProperties(_Company);
+ Fragments._Department__Department.initProperties(_Department);
+ Fragments._Employee__Employee.initProperties(_Employee);
+ Fragments._Visitable__Visitable.initProperties(_Visitable);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::FragmentProperties and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of enumeration literals for each enumeration.
+ */
+ public static class EnumerationLiterals {
+ static {
+ Init.initStart();
+ FragmentProperties.init();
+ }
+
+ /**
+ * Install the enumeration literals in the enumerations.
+ */
+ static {
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of CompanyTables::EnumerationLiterals and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The multiple packages above avoid problems with the Java 65536 byte limit but introduce a difficulty in ensuring that
+ * static construction occurs in the disciplined order of the packages when construction may start in any of the packages.
+ * The problem is resolved by ensuring that the static construction of each package first initializes its immediate predecessor.
+ * On completion of predecessor initialization, the residual packages are initialized by starting an initialization in the last package.
+ * This class maintains a count so that the various predecessors can distinguish whether they are the starting point and so
+ * ensure that residual construction occurs just once after all predecessors.
+ */
+ private static class Init {
+ /**
+ * Counter of nested static constructions. On return to zero residual construction starts. -ve once residual construction started.
+ */
+ private static int initCount = 0;
+
+ /**
+ * Invoked at the start of a static construction to defer residual cobstruction until primary constructions complete.
+ */
+ private static void initStart() {
+ if (initCount >= 0) {
+ initCount++;
+ }
+ }
+
+ /**
+ * Invoked at the end of a static construction to activate residual cobstruction once primary constructions complete.
+ */
+ private static void initEnd() {
+ if (initCount > 0) {
+ if (--initCount == 0) {
+ initCount = -1;
+ EnumerationLiterals.init();
+ }
+ }
+ }
+ }
+
+ static {
+ Init.initEnd();
+ }
+
+ /*
+ * Force initialization of outer fields. Inner fields are lazily initialized.
+ */
+ public static void init() {}
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Department.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Department.java
new file mode 100644
index 0000000..1f3f1b5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Department.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Department</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.Department#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.Department#getManager <em>Manager</em>}</li>
+ * <li>{@link cs2as.company.Department#getSubdepts <em>Subdepts</em>}</li>
+ * <li>{@link cs2as.company.Department#getEmployees <em>Employees</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.company.CompanyPackage#getDepartment()
+ * @model superTypes="cs2as.company.Visitable"
+ * @generated
+ */
+public interface Department extends EObject, Visitable {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.company.CompanyPackage#getDepartment_Name()
+ * @model required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Department!name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Department#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Manager</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Manager</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Manager</em>' containment reference.
+ * @see #setManager(Employee)
+ * @see cs2as.company.CompanyPackage#getDepartment_Manager()
+ * @model containment="true" required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Department!manager'"
+ * @generated
+ */
+ Employee getManager();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Department#getManager <em>Manager</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Manager</em>' containment reference.
+ * @see #getManager()
+ * @generated
+ */
+ void setManager(Employee value);
+
+ /**
+ * Returns the value of the '<em><b>Subdepts</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.company.Department}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Subdepts</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>Subdepts</em>' containment reference list.
+ * @see cs2as.company.CompanyPackage#getDepartment_Subdepts()
+ * @model containment="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Department!subdepts'"
+ * @generated
+ */
+ EList<Department> getSubdepts();
+
+ /**
+ * Returns the value of the '<em><b>Employees</b></em>' containment reference list.
+ * The list contents are of type {@link cs2as.company.Employee}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Employees</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>Employees</em>' containment reference list.
+ * @see cs2as.company.CompanyPackage#getDepartment_Employees()
+ * @model containment="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Department!employees'"
+ * @generated
+ */
+ EList<Employee> getEmployees();
+
+} // Department
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Employee.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Employee.java
new file mode 100644
index 0000000..0b583c6
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/Employee.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Employee</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.Employee#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.Employee#getAddress <em>Address</em>}</li>
+ * <li>{@link cs2as.company.Employee#getSalary <em>Salary</em>}</li>
+ * <li>{@link cs2as.company.Employee#getMentor <em>Mentor</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.company.CompanyPackage#getEmployee()
+ * @model superTypes="cs2as.company.Visitable"
+ * @generated
+ */
+public interface Employee extends EObject, Visitable {
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see cs2as.company.CompanyPackage#getEmployee_Name()
+ * @model required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Employee!name'"
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Employee#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Address</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Address</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Address</em>' attribute.
+ * @see #setAddress(String)
+ * @see cs2as.company.CompanyPackage#getEmployee_Address()
+ * @model required="true" ordered="false"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Employee!address'"
+ * @generated
+ */
+ String getAddress();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Employee#getAddress <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Address</em>' attribute.
+ * @see #getAddress()
+ * @generated
+ */
+ void setAddress(String value);
+
+ /**
+ * Returns the value of the '<em><b>Salary</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Salary</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Salary</em>' attribute.
+ * @see #setSalary(double)
+ * @see cs2as.company.CompanyPackage#getEmployee_Salary()
+ * @model required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Employee!salary'"
+ * @generated
+ */
+ double getSalary();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Employee#getSalary <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Salary</em>' attribute.
+ * @see #getSalary()
+ * @generated
+ */
+ void setSalary(double value);
+
+ /**
+ * Returns the value of the '<em><b>Mentor</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mentor</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mentor</em>' reference.
+ * @see #setMentor(Employee)
+ * @see cs2as.company.CompanyPackage#getEmployee_Mentor()
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/AS/1.0!Employee!mentor'"
+ * @generated
+ */
+ Employee getMentor();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.Employee#getMentor <em>Mentor</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Mentor</em>' reference.
+ * @see #getMentor()
+ * @generated
+ */
+ void setMentor(Employee value);
+
+} // Employee
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyFactoryImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyFactoryImpl.java
new file mode 100644
index 0000000..780f85f
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyFactoryImpl.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.impl;
+
+import cs2as.company.*;
+
+import org.eclipse.emf.ecore.EClass;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompanyFactoryImpl extends EFactoryImpl implements CompanyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static CompanyFactory init() {
+ try {
+ CompanyFactory theCompanyFactory = (CompanyFactory)EPackage.Registry.INSTANCE.getEFactory(CompanyPackage.eNS_URI);
+ if (theCompanyFactory != null) {
+ return theCompanyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new CompanyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompanyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case CompanyPackage.COMPANY: return createCompany();
+ case CompanyPackage.DEPARTMENT: return createDepartment();
+ case CompanyPackage.EMPLOYEE: return createEmployee();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Company createCompany() {
+ CompanyImpl company = new CompanyImpl();
+ return company;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Department createDepartment() {
+ DepartmentImpl department = new DepartmentImpl();
+ return department;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee createEmployee() {
+ EmployeeImpl employee = new EmployeeImpl();
+ return employee;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompanyPackage getCompanyPackage() {
+ return (CompanyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static CompanyPackage getPackage() {
+ return CompanyPackage.eINSTANCE;
+ }
+
+} //CompanyFactoryImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyImpl.java
new file mode 100644
index 0000000..d034274
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyImpl.java
@@ -0,0 +1,243 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.impl;
+
+import cs2as.company.Company;
+import cs2as.company.CompanyPackage;
+import cs2as.company.Department;
+
+import cs2as.company.util.Visitor;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Company</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.impl.CompanyImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.impl.CompanyImpl#getDepts <em>Depts</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class CompanyImpl extends MinimalEObjectImpl.Container implements Company {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getDepts() <em>Depts</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getDepts()
+ * @generated
+ * @ordered
+ */
+ protected EList<Department> depts;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CompanyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompanyPackage.Literals.COMPANY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.COMPANY__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Department> getDepts() {
+ if (depts == null) {
+ depts = new EObjectContainmentEList<Department>(Department.class, this, CompanyPackage.COMPANY__DEPTS);
+ }
+ return depts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompanyPackage.COMPANY__DEPTS:
+ return ((InternalEList<?>)getDepts()).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 CompanyPackage.COMPANY__NAME:
+ return getName();
+ case CompanyPackage.COMPANY__DEPTS:
+ return getDepts();
+ }
+ 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 CompanyPackage.COMPANY__NAME:
+ setName((String)newValue);
+ return;
+ case CompanyPackage.COMPANY__DEPTS:
+ getDepts().clear();
+ getDepts().addAll((Collection<? extends Department>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.COMPANY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompanyPackage.COMPANY__DEPTS:
+ getDepts().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.COMPANY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompanyPackage.COMPANY__DEPTS:
+ return depts != null && !depts.isEmpty();
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ * @generated
+ */
+ @Override
+ public <R> R accept(@NonNull Visitor<R> visitor) {
+ return visitor.visitCompany(this);
+ }
+
+} //CompanyImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyPackageImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyPackageImpl.java
new file mode 100644
index 0000000..d5f1fde
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/CompanyPackageImpl.java
@@ -0,0 +1,372 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.impl;
+
+import cs2as.company.Company;
+import cs2as.company.CompanyFactory;
+import cs2as.company.CompanyPackage;
+import cs2as.company.Department;
+import cs2as.company.Employee;
+
+import cs2as.company.util.Visitable;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CompanyPackageImpl extends EPackageImpl implements CompanyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass companyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass departmentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass employeeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass visitableEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see cs2as.company.CompanyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private CompanyPackageImpl() {
+ super(eNS_URI, CompanyFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link CompanyPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static CompanyPackage init() {
+ if (isInited) return (CompanyPackage)EPackage.Registry.INSTANCE.getEPackage(CompanyPackage.eNS_URI);
+
+ // Obtain or create and register package
+ Object ePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ CompanyPackageImpl theCompanyPackage = (CompanyPackageImpl)(ePackage instanceof CompanyPackageImpl ? ePackage : new CompanyPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theCompanyPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theCompanyPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theCompanyPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(CompanyPackage.eNS_URI, theCompanyPackage);
+ return theCompanyPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCompany() {
+ return companyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCompany_Name() {
+ return (EAttribute)companyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCompany_Depts() {
+ return (EReference)companyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDepartment() {
+ return departmentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDepartment_Name() {
+ return (EAttribute)departmentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDepartment_Manager() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDepartment_Subdepts() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDepartment_Employees() {
+ return (EReference)departmentEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEmployee() {
+ return employeeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEmployee_Name() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEmployee_Address() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEmployee_Salary() {
+ return (EAttribute)employeeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getEmployee_Mentor() {
+ return (EReference)employeeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getVisitable() {
+ return visitableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompanyFactory getCompanyFactory() {
+ return (CompanyFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ companyEClass = createEClass(COMPANY);
+ createEAttribute(companyEClass, COMPANY__NAME);
+ createEReference(companyEClass, COMPANY__DEPTS);
+
+ departmentEClass = createEClass(DEPARTMENT);
+ createEAttribute(departmentEClass, DEPARTMENT__NAME);
+ createEReference(departmentEClass, DEPARTMENT__MANAGER);
+ createEReference(departmentEClass, DEPARTMENT__SUBDEPTS);
+ createEReference(departmentEClass, DEPARTMENT__EMPLOYEES);
+
+ employeeEClass = createEClass(EMPLOYEE);
+ createEAttribute(employeeEClass, EMPLOYEE__NAME);
+ createEAttribute(employeeEClass, EMPLOYEE__ADDRESS);
+ createEAttribute(employeeEClass, EMPLOYEE__SALARY);
+ createEReference(employeeEClass, EMPLOYEE__MENTOR);
+
+ visitableEClass = createEClass(VISITABLE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ companyEClass.getESuperTypes().add(this.getVisitable());
+ departmentEClass.getESuperTypes().add(this.getVisitable());
+ employeeEClass.getESuperTypes().add(this.getVisitable());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(companyEClass, Company.class, "Company", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCompany_Name(), ecorePackage.getEString(), "name", null, 1, 1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getCompany_Depts(), this.getDepartment(), null, "depts", null, 0, -1, Company.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(departmentEClass, Department.class, "Department", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDepartment_Name(), ecorePackage.getEString(), "name", null, 1, 1, Department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getDepartment_Manager(), this.getEmployee(), null, "manager", null, 1, 1, Department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEReference(getDepartment_Subdepts(), this.getDepartment(), null, "subdepts", null, 0, -1, Department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDepartment_Employees(), this.getEmployee(), null, "employees", null, 0, -1, Department.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(employeeEClass, Employee.class, "Employee", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEmployee_Name(), ecorePackage.getEString(), "name", null, 1, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getEmployee_Address(), ecorePackage.getEString(), "address", null, 1, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
+ initEAttribute(getEmployee_Salary(), ecorePackage.getEDouble(), "salary", null, 1, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getEmployee_Mentor(), this.getEmployee(), null, "mentor", null, 0, 1, Employee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(visitableEClass, Visitable.class, "Visitable", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ });
+ }
+
+} //CompanyPackageImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/DepartmentImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/DepartmentImpl.java
new file mode 100644
index 0000000..3f27abf
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/DepartmentImpl.java
@@ -0,0 +1,345 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.impl;
+
+import cs2as.company.CompanyPackage;
+import cs2as.company.Department;
+import cs2as.company.Employee;
+
+import cs2as.company.util.Visitor;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Department</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.impl.DepartmentImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.impl.DepartmentImpl#getManager <em>Manager</em>}</li>
+ * <li>{@link cs2as.company.impl.DepartmentImpl#getSubdepts <em>Subdepts</em>}</li>
+ * <li>{@link cs2as.company.impl.DepartmentImpl#getEmployees <em>Employees</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class DepartmentImpl extends MinimalEObjectImpl.Container implements Department {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getManager() <em>Manager</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getManager()
+ * @generated
+ * @ordered
+ */
+ protected Employee manager;
+
+ /**
+ * The cached value of the '{@link #getSubdepts() <em>Subdepts</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubdepts()
+ * @generated
+ * @ordered
+ */
+ protected EList<Department> subdepts;
+
+ /**
+ * The cached value of the '{@link #getEmployees() <em>Employees</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getEmployees()
+ * @generated
+ * @ordered
+ */
+ protected EList<Employee> employees;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DepartmentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompanyPackage.Literals.DEPARTMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.DEPARTMENT__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee getManager() {
+ return manager;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetManager(Employee newManager, NotificationChain msgs) {
+ Employee oldManager = manager;
+ manager = newManager;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, CompanyPackage.DEPARTMENT__MANAGER, oldManager, newManager);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setManager(Employee newManager) {
+ if (newManager != manager) {
+ NotificationChain msgs = null;
+ if (manager != null)
+ msgs = ((InternalEObject)manager).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - CompanyPackage.DEPARTMENT__MANAGER, null, msgs);
+ if (newManager != null)
+ msgs = ((InternalEObject)newManager).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - CompanyPackage.DEPARTMENT__MANAGER, null, msgs);
+ msgs = basicSetManager(newManager, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.DEPARTMENT__MANAGER, newManager, newManager));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Department> getSubdepts() {
+ if (subdepts == null) {
+ subdepts = new EObjectContainmentEList<Department>(Department.class, this, CompanyPackage.DEPARTMENT__SUBDEPTS);
+ }
+ return subdepts;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Employee> getEmployees() {
+ if (employees == null) {
+ employees = new EObjectContainmentEList<Employee>(Employee.class, this, CompanyPackage.DEPARTMENT__EMPLOYEES);
+ }
+ return employees;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case CompanyPackage.DEPARTMENT__MANAGER:
+ return basicSetManager(null, msgs);
+ case CompanyPackage.DEPARTMENT__SUBDEPTS:
+ return ((InternalEList<?>)getSubdepts()).basicRemove(otherEnd, msgs);
+ case CompanyPackage.DEPARTMENT__EMPLOYEES:
+ return ((InternalEList<?>)getEmployees()).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 CompanyPackage.DEPARTMENT__NAME:
+ return getName();
+ case CompanyPackage.DEPARTMENT__MANAGER:
+ return getManager();
+ case CompanyPackage.DEPARTMENT__SUBDEPTS:
+ return getSubdepts();
+ case CompanyPackage.DEPARTMENT__EMPLOYEES:
+ return getEmployees();
+ }
+ 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 CompanyPackage.DEPARTMENT__NAME:
+ setName((String)newValue);
+ return;
+ case CompanyPackage.DEPARTMENT__MANAGER:
+ setManager((Employee)newValue);
+ return;
+ case CompanyPackage.DEPARTMENT__SUBDEPTS:
+ getSubdepts().clear();
+ getSubdepts().addAll((Collection<? extends Department>)newValue);
+ return;
+ case CompanyPackage.DEPARTMENT__EMPLOYEES:
+ getEmployees().clear();
+ getEmployees().addAll((Collection<? extends Employee>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.DEPARTMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompanyPackage.DEPARTMENT__MANAGER:
+ setManager((Employee)null);
+ return;
+ case CompanyPackage.DEPARTMENT__SUBDEPTS:
+ getSubdepts().clear();
+ return;
+ case CompanyPackage.DEPARTMENT__EMPLOYEES:
+ getEmployees().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.DEPARTMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompanyPackage.DEPARTMENT__MANAGER:
+ return manager != null;
+ case CompanyPackage.DEPARTMENT__SUBDEPTS:
+ return subdepts != null && !subdepts.isEmpty();
+ case CompanyPackage.DEPARTMENT__EMPLOYEES:
+ return employees != null && !employees.isEmpty();
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ * @generated
+ */
+ @Override
+ public <R> R accept(@NonNull Visitor<R> visitor) {
+ return visitor.visitDepartment(this);
+ }
+
+} //DepartmentImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/EmployeeImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/EmployeeImpl.java
new file mode 100644
index 0000000..4a8e0cd
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/impl/EmployeeImpl.java
@@ -0,0 +1,353 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.impl;
+
+import cs2as.company.CompanyPackage;
+import cs2as.company.Employee;
+
+import cs2as.company.util.Visitor;
+
+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.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Employee</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.impl.EmployeeImpl#getName <em>Name</em>}</li>
+ * <li>{@link cs2as.company.impl.EmployeeImpl#getAddress <em>Address</em>}</li>
+ * <li>{@link cs2as.company.impl.EmployeeImpl#getSalary <em>Salary</em>}</li>
+ * <li>{@link cs2as.company.impl.EmployeeImpl#getMentor <em>Mentor</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class EmployeeImpl extends MinimalEObjectImpl.Container implements Employee {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected static final String ADDRESS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getAddress() <em>Address</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAddress()
+ * @generated
+ * @ordered
+ */
+ protected String address = ADDRESS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSalary() <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSalary()
+ * @generated
+ * @ordered
+ */
+ protected static final double SALARY_EDEFAULT = 0.0;
+
+ /**
+ * The cached value of the '{@link #getSalary() <em>Salary</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSalary()
+ * @generated
+ * @ordered
+ */
+ protected double salary = SALARY_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getMentor() <em>Mentor</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMentor()
+ * @generated
+ * @ordered
+ */
+ protected Employee mentor;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmployeeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return CompanyPackage.Literals.EMPLOYEE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.EMPLOYEE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAddress(String newAddress) {
+ String oldAddress = address;
+ address = newAddress;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.EMPLOYEE__ADDRESS, oldAddress, address));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public double getSalary() {
+ return salary;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSalary(double newSalary) {
+ double oldSalary = salary;
+ salary = newSalary;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.EMPLOYEE__SALARY, oldSalary, salary));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee getMentor() {
+ if (mentor != null && mentor.eIsProxy()) {
+ InternalEObject oldMentor = (InternalEObject)mentor;
+ mentor = (Employee)eResolveProxy(oldMentor);
+ if (mentor != oldMentor) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, CompanyPackage.EMPLOYEE__MENTOR, oldMentor, mentor));
+ }
+ }
+ return mentor;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Employee basicGetMentor() {
+ return mentor;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMentor(Employee newMentor) {
+ Employee oldMentor = mentor;
+ mentor = newMentor;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, CompanyPackage.EMPLOYEE__MENTOR, oldMentor, mentor));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case CompanyPackage.EMPLOYEE__NAME:
+ return getName();
+ case CompanyPackage.EMPLOYEE__ADDRESS:
+ return getAddress();
+ case CompanyPackage.EMPLOYEE__SALARY:
+ return getSalary();
+ case CompanyPackage.EMPLOYEE__MENTOR:
+ if (resolve) return getMentor();
+ return basicGetMentor();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case CompanyPackage.EMPLOYEE__NAME:
+ setName((String)newValue);
+ return;
+ case CompanyPackage.EMPLOYEE__ADDRESS:
+ setAddress((String)newValue);
+ return;
+ case CompanyPackage.EMPLOYEE__SALARY:
+ setSalary((Double)newValue);
+ return;
+ case CompanyPackage.EMPLOYEE__MENTOR:
+ setMentor((Employee)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.EMPLOYEE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case CompanyPackage.EMPLOYEE__ADDRESS:
+ setAddress(ADDRESS_EDEFAULT);
+ return;
+ case CompanyPackage.EMPLOYEE__SALARY:
+ setSalary(SALARY_EDEFAULT);
+ return;
+ case CompanyPackage.EMPLOYEE__MENTOR:
+ setMentor((Employee)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case CompanyPackage.EMPLOYEE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case CompanyPackage.EMPLOYEE__ADDRESS:
+ return ADDRESS_EDEFAULT == null ? address != null : !ADDRESS_EDEFAULT.equals(address);
+ case CompanyPackage.EMPLOYEE__SALARY:
+ return salary != SALARY_EDEFAULT;
+ case CompanyPackage.EMPLOYEE__MENTOR:
+ return mentor != null;
+ }
+ 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(" (name: ");
+ result.append(name);
+ result.append(", address: ");
+ result.append(address);
+ result.append(", salary: ");
+ result.append(salary);
+ result.append(')');
+ return result.toString();
+ }
+
+ /**
+ * {@inheritDoc}
+ * @generated
+ */
+ @Override
+ public <R> R accept(@NonNull Visitor<R> visitor) {
+ return visitor.visitEmployee(this);
+ }
+
+} //EmployeeImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupEnvironment.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupEnvironment.java
new file mode 100644
index 0000000..4784fba
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupEnvironment.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup;
+
+import cs2as.company.Employee;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.ocl.pivot.evaluation.Executor;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Environment</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.lookup.LookupEnvironment#getNamedElements <em>Named Elements</em>}</li>
+ * <li>{@link cs2as.company.lookup.LookupEnvironment#getParentEnv <em>Parent Env</em>}</li>
+ * </ul>
+ *
+ * @see cs2as.company.lookup.LookupPackage#getLookupEnvironment()
+ * @model
+ * @generated
+ */
+public interface LookupEnvironment extends EObject {
+ /**
+ * Returns the value of the '<em><b>Named Elements</b></em>' reference list.
+ * The list contents are of type {@link cs2as.company.Employee}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Named Elements</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Named Elements</em>' reference list.
+ * @see cs2as.company.lookup.LookupPackage#getLookupEnvironment_NamedElements()
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/lookup/1.0!LookupEnvironment!namedElements'"
+ * @generated
+ */
+ EList<Employee> getNamedElements();
+
+ /**
+ * Returns the value of the '<em><b>Parent Env</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent Env</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Parent Env</em>' reference.
+ * @see #setParentEnv(LookupEnvironment)
+ * @see cs2as.company.lookup.LookupPackage#getLookupEnvironment_ParentEnv()
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://cs2as/tests/companies/lookup/1.0!LookupEnvironment!parentEnv'"
+ * @generated
+ */
+ LookupEnvironment getParentEnv();
+
+ /**
+ * Sets the value of the '{@link cs2as.company.lookup.LookupEnvironment#getParentEnv <em>Parent Env</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Parent Env</em>' reference.
+ * @see #getParentEnv()
+ * @generated
+ */
+ void setParentEnv(LookupEnvironment value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model required="true" elementsType="org.eclipse.ocl.pivot.oclstdlib.Collection<NE>" elementsRequired="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * LookupEnvironment{namedElements = namedElements->includingAll(elements)}\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_namedElements = idResolver.getProperty(<%cs2as.company.lookup.LookupTables%>.PROPid_namedElements);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(<%cs2as.company.lookup.LookupTables%>.CLSSid_LookupEnvironment, null);\nfinal /*@Thrown\052/ cs2as.company.lookup.@<%org.eclipse.jdt.annotation.NonNull%> LookupEnvironment symbol_0 = (<%cs2as.company.lookup.LookupEnvironment%>)TYP_lookup_c_c_LookupEnvironment_0.createInstance();\n@SuppressWarnings(\"null\")\nfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%cs2as.company.Employee%>> namedElements = this.getNamedElements();\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(<%cs2as.company.lookup.LookupTables%>.ORD_CLSSid_Employee, namedElements);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> CollectionValue BOXED_elements = idResolver.createCollectionOfAll(<%cs2as.company.lookup.LookupTables%>.COL_TMPLid_, elements);\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> CollectionValue includingAll = <%org.eclipse.ocl.pivot.library.collection.CollectionIncludingAllOperation%>.INSTANCE.evaluate(BOXED_namedElements, BOXED_elements);\nfinal <%java.util.List%><? extends <%java.lang.Object%>> UNBOXED_includingAll = includingAll.asEcoreObjects(idResolver, <%java.lang.Object%>.class);\nassert UNBOXED_includingAll != null;\nCTORid_namedElements.initValue(symbol_0, UNBOXED_includingAll);\nreturn symbol_0;'"
+ * @generated
+ */
+ <NE extends Employee> LookupEnvironment addElements(Collection<NE> elements);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model required="true"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * LookupEnvironment{namedElements = namedElements->including(element)}\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Property CTORid_namedElements = idResolver.getProperty(<%cs2as.company.lookup.LookupTables%>.PROPid_namedElements);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(<%cs2as.company.lookup.LookupTables%>.CLSSid_LookupEnvironment, null);\nfinal /*@Thrown\052/ cs2as.company.lookup.@<%org.eclipse.jdt.annotation.NonNull%> LookupEnvironment symbol_0 = (<%cs2as.company.lookup.LookupEnvironment%>)TYP_lookup_c_c_LookupEnvironment_0.createInstance();\n@SuppressWarnings(\"null\")\nfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%cs2as.company.Employee%>> namedElements = this.getNamedElements();\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(<%cs2as.company.lookup.LookupTables%>.ORD_CLSSid_Employee, namedElements);\nfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue including = (<%org.eclipse.ocl.pivot.values.OrderedSetValue%>)<%org.eclipse.ocl.pivot.library.collection.CollectionIncludingOperation%>.INSTANCE.evaluate(BOXED_namedElements, element);\nfinal <%java.util.List%><<%cs2as.company.Employee%>> UNBOXED_including = including.asEcoreObjects(idResolver, cs2as.company.Employee.class);\nassert UNBOXED_including != null;\nCTORid_namedElements.initValue(symbol_0, UNBOXED_including);\nreturn symbol_0;'"
+ * @generated
+ */
+ LookupEnvironment addElement(Employee element);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='throw new <%java.lang.UnsupportedOperationException%>(\"Enviroment::hasFinalResult() has been created for CG purposes. Don\'t call this method\");'"
+ * @generated
+ */
+ boolean hasFinalResult();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation" type="cs2as.company.lookup.Executor"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='throw new <%java.lang.UnsupportedOperationException%>(\"Enviroment::getEvaluator() has been created for CG purposes. Don\'t call this method\");'"
+ * @generated
+ */
+ Executor getExecutor();
+
+} // LookupEnvironment
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupFactory.java
new file mode 100644
index 0000000..52eb7dd
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupFactory.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.LookupPackage
+ * @generated
+ */
+public interface LookupFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ LookupFactory eINSTANCE = cs2as.company.lookup.impl.LookupFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Environment</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Environment</em>'.
+ * @generated
+ */
+ LookupEnvironment createLookupEnvironment();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ LookupPackage getLookupPackage();
+
+} //LookupFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupPackage.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupPackage.java
new file mode 100644
index 0000000..ab49b3d
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupPackage.java
@@ -0,0 +1,354 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.LookupFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface LookupPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "lookup";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://cs2as/tests/companies/lookup/1.0";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "lookup";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ LookupPackage eINSTANCE = cs2as.company.lookup.impl.LookupPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link cs2as.company.lookup.impl.LookupEnvironmentImpl <em>Environment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.impl.LookupEnvironmentImpl
+ * @see cs2as.company.lookup.impl.LookupPackageImpl#getLookupEnvironment()
+ * @generated
+ */
+ int LOOKUP_ENVIRONMENT = 0;
+
+ /**
+ * The feature id for the '<em><b>Named Elements</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT__NAMED_ELEMENTS = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent Env</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT__PARENT_ENV = 1;
+
+ /**
+ * The number of structural features of the '<em>Environment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT_FEATURE_COUNT = 2;
+
+ /**
+ * The operation id for the '<em>Add Elements</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION = 0;
+
+ /**
+ * The operation id for the '<em>Add Element</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT___ADD_ELEMENT__EMPLOYEE = 1;
+
+ /**
+ * The operation id for the '<em>Has Final Result</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT___HAS_FINAL_RESULT = 2;
+
+ /**
+ * The operation id for the '<em>Get Executor</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT___GET_EXECUTOR = 3;
+
+ /**
+ * The number of operations of the '<em>Environment</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LOOKUP_ENVIRONMENT_OPERATION_COUNT = 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.ocl.pivot.evaluation.Executor <em>Executor</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.ocl.pivot.evaluation.Executor
+ * @see cs2as.company.lookup.impl.LookupPackageImpl#getExecutor()
+ * @generated
+ */
+ int EXECUTOR = 1;
+
+ /**
+ * The number of structural features of the '<em>Executor</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXECUTOR_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the '<em>Executor</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXECUTOR_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link cs2as.company.lookup.LookupEnvironment <em>Environment</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Environment</em>'.
+ * @see cs2as.company.lookup.LookupEnvironment
+ * @generated
+ */
+ EClass getLookupEnvironment();
+
+ /**
+ * Returns the meta object for the reference list '{@link cs2as.company.lookup.LookupEnvironment#getNamedElements <em>Named Elements</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Named Elements</em>'.
+ * @see cs2as.company.lookup.LookupEnvironment#getNamedElements()
+ * @see #getLookupEnvironment()
+ * @generated
+ */
+ EReference getLookupEnvironment_NamedElements();
+
+ /**
+ * Returns the meta object for the reference '{@link cs2as.company.lookup.LookupEnvironment#getParentEnv <em>Parent Env</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Parent Env</em>'.
+ * @see cs2as.company.lookup.LookupEnvironment#getParentEnv()
+ * @see #getLookupEnvironment()
+ * @generated
+ */
+ EReference getLookupEnvironment_ParentEnv();
+
+ /**
+ * Returns the meta object for the '{@link cs2as.company.lookup.LookupEnvironment#addElements(java.util.Collection) <em>Add Elements</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Add Elements</em>' operation.
+ * @see cs2as.company.lookup.LookupEnvironment#addElements(java.util.Collection)
+ * @generated
+ */
+ EOperation getLookupEnvironment__AddElements__Collection();
+
+ /**
+ * Returns the meta object for the '{@link cs2as.company.lookup.LookupEnvironment#addElement(cs2as.company.Employee) <em>Add Element</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Add Element</em>' operation.
+ * @see cs2as.company.lookup.LookupEnvironment#addElement(cs2as.company.Employee)
+ * @generated
+ */
+ EOperation getLookupEnvironment__AddElement__Employee();
+
+ /**
+ * Returns the meta object for the '{@link cs2as.company.lookup.LookupEnvironment#hasFinalResult() <em>Has Final Result</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Has Final Result</em>' operation.
+ * @see cs2as.company.lookup.LookupEnvironment#hasFinalResult()
+ * @generated
+ */
+ EOperation getLookupEnvironment__HasFinalResult();
+
+ /**
+ * Returns the meta object for the '{@link cs2as.company.lookup.LookupEnvironment#getExecutor() <em>Get Executor</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Get Executor</em>' operation.
+ * @see cs2as.company.lookup.LookupEnvironment#getExecutor()
+ * @generated
+ */
+ EOperation getLookupEnvironment__GetExecutor();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.ocl.pivot.evaluation.Executor <em>Executor</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Executor</em>'.
+ * @see org.eclipse.ocl.pivot.evaluation.Executor
+ * @model instanceClass="org.eclipse.ocl.pivot.evaluation.Executor"
+ * @generated
+ */
+ EClass getExecutor();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ LookupFactory getLookupFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link cs2as.company.lookup.impl.LookupEnvironmentImpl <em>Environment</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.impl.LookupEnvironmentImpl
+ * @see cs2as.company.lookup.impl.LookupPackageImpl#getLookupEnvironment()
+ * @generated
+ */
+ EClass LOOKUP_ENVIRONMENT = eINSTANCE.getLookupEnvironment();
+
+ /**
+ * The meta object literal for the '<em><b>Named Elements</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LOOKUP_ENVIRONMENT__NAMED_ELEMENTS = eINSTANCE.getLookupEnvironment_NamedElements();
+
+ /**
+ * The meta object literal for the '<em><b>Parent Env</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LOOKUP_ENVIRONMENT__PARENT_ENV = eINSTANCE.getLookupEnvironment_ParentEnv();
+
+ /**
+ * The meta object literal for the '<em><b>Add Elements</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION = eINSTANCE.getLookupEnvironment__AddElements__Collection();
+
+ /**
+ * The meta object literal for the '<em><b>Add Element</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation LOOKUP_ENVIRONMENT___ADD_ELEMENT__EMPLOYEE = eINSTANCE.getLookupEnvironment__AddElement__Employee();
+
+ /**
+ * The meta object literal for the '<em><b>Has Final Result</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation LOOKUP_ENVIRONMENT___HAS_FINAL_RESULT = eINSTANCE.getLookupEnvironment__HasFinalResult();
+
+ /**
+ * The meta object literal for the '<em><b>Get Executor</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation LOOKUP_ENVIRONMENT___GET_EXECUTOR = eINSTANCE.getLookupEnvironment__GetExecutor();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.ocl.pivot.evaluation.Executor <em>Executor</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.ocl.pivot.evaluation.Executor
+ * @see cs2as.company.lookup.impl.LookupPackageImpl#getExecutor()
+ * @generated
+ */
+ EClass EXECUTOR = eINSTANCE.getExecutor();
+
+ }
+
+} //LookupPackage
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupTables.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupTables.java
new file mode 100644
index 0000000..587b866
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/LookupTables.java
@@ -0,0 +1,474 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *************************************************************************
+ * This code is 100% auto-generated
+ * from:
+ * /org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Lookup.ecore
+ * using:
+ * /org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Lookup.genmodel
+ * org.eclipse.ocl.examples.codegen.oclinecore.OCLinEcoreTables
+ *
+ * Do not edit it.
+ *******************************************************************************/
+package cs2as.company.lookup;
+
+import cs2as.company.CompanyTables;
+import cs2as.company.lookup.LookupTables;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.ocl.pivot.ParameterTypes;
+import org.eclipse.ocl.pivot.TemplateParameters;
+import org.eclipse.ocl.pivot.ids.TypeId;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorPackage;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorProperty;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreExecutorType;
+import org.eclipse.ocl.pivot.internal.library.ecore.EcoreLibraryOppositeProperty;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorFragment;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorOperation;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorProperty;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorPropertyWithImplementation;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorSpecializedType;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorStandardLibrary;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorType;
+import org.eclipse.ocl.pivot.internal.library.executor.ExecutorTypeParameter;
+import org.eclipse.ocl.pivot.oclstdlib.OCLstdlibTables;
+import org.eclipse.ocl.pivot.utilities.TypeUtil;
+
+/**
+ * LookupTables provides the dispatch tables for the lookup for use by the OCL dispatcher.
+ *
+ * In order to ensure correct static initialization, a top level class element must be accessed
+ * before any nested class element. Therefore an access to PACKAGE.getClass() is recommended.
+ */
+@SuppressWarnings("nls")
+public class LookupTables
+{
+ static {
+ Init.initStart();
+ }
+
+ /**
+ * The package descriptor for the package.
+ */
+ public static final @NonNull EcoreExecutorPackage PACKAGE = new EcoreExecutorPackage(LookupPackage.eINSTANCE);
+
+ /**
+ * The library of all packages and types.
+ */
+ public static final @NonNull ExecutorStandardLibrary LIBRARY = OCLstdlibTables.LIBRARY;
+
+ /**
+ * Constants used by auto-generated code.
+ */
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId COL_PRIMid_OclAny = org.eclipse.ocl.pivot.ids.TypeId.COLLECTION.getSpecializedId(org.eclipse.ocl.pivot.ids.TypeId.OCL_ANY);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId COL_TMPLid_ = org.eclipse.ocl.pivot.ids.TypeId.COLLECTION.getSpecializedId(org.eclipse.ocl.pivot.ids.IdManager.getTemplateParameterId(0));
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0 = org.eclipse.ocl.pivot.ids.IdManager.getNsURIPackageId("http://cs2as/tests/companies/AS/1.0", null, cs2as.company.CompanyPackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull NsURIPackageId PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_lookup_s_1_0 = org.eclipse.ocl.pivot.ids.IdManager.getNsURIPackageId("http://cs2as/tests/companies/lookup/1.0", null, cs2as.company.lookup.LookupPackage.eINSTANCE);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Employee = cs2as.company.lookup.LookupTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_AS_s_1_0.getClassId("Employee", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_Executor = cs2as.company.lookup.LookupTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_lookup_s_1_0.getClassId("Executor", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull ClassId CLSSid_LookupEnvironment = cs2as.company.lookup.LookupTables.PACKid_http_c_s_s_cs2as_s_tests_s_companies_s_lookup_s_1_0.getClassId("LookupEnvironment", 0);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId BAG_CLSSid_LookupEnvironment = org.eclipse.ocl.pivot.ids.TypeId.BAG.getSpecializedId(cs2as.company.lookup.LookupTables.CLSSid_LookupEnvironment);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull CollectionTypeId ORD_CLSSid_Employee = org.eclipse.ocl.pivot.ids.TypeId.ORDERED_SET.getSpecializedId(cs2as.company.lookup.LookupTables.CLSSid_Employee);
+ public static final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@org.eclipse.jdt.annotation.NonNull PropertyId PROPid_namedElements = cs2as.company.lookup.LookupTables.CLSSid_LookupEnvironment.getPropertyId("namedElements");
+
+ /**
+ * The type parameters for templated types and operations.
+ */
+ public static class TypeParameters {
+ static {
+ Init.initStart();
+ LookupTables.init();
+ }
+ public static final @NonNull ExecutorTypeParameter __LookupEnvironment__addElements_NE = new ExecutorTypeParameter(TypeId.T_1, "NE");
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::TypeParameters and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The type descriptors for each type.
+ */
+ public static class Types {
+ static {
+ Init.initStart();
+ TypeParameters.init();
+ }
+
+ public static final @NonNull EcoreExecutorType _Executor = new EcoreExecutorType(LookupPackage.Literals.EXECUTOR, PACKAGE, 0 | ExecutorType.ABSTRACT);
+ public static final @NonNull EcoreExecutorType _LookupEnvironment = new EcoreExecutorType(LookupPackage.Literals.LOOKUP_ENVIRONMENT, PACKAGE, 0);
+
+ private static final @NonNull EcoreExecutorType @NonNull [] types = {
+ _Executor,
+ _LookupEnvironment
+ };
+
+ /*
+ * Install the type descriptors in the package descriptor.
+ */
+ static {
+ PACKAGE.init(LIBRARY, types);
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::Types and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The fragment descriptors for the local elements of each type and its supertypes.
+ */
+ public static class Fragments {
+ static {
+ Init.initStart();
+ Types.init();
+ }
+
+ private static final @NonNull ExecutorFragment _Executor__Executor = new ExecutorFragment(Types._Executor, LookupTables.Types._Executor);
+ private static final @NonNull ExecutorFragment _Executor__OclAny = new ExecutorFragment(Types._Executor, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _Executor__OclElement = new ExecutorFragment(Types._Executor, OCLstdlibTables.Types._OclElement);
+
+ private static final @NonNull ExecutorFragment _LookupEnvironment__LookupEnvironment = new ExecutorFragment(Types._LookupEnvironment, LookupTables.Types._LookupEnvironment);
+ private static final @NonNull ExecutorFragment _LookupEnvironment__OclAny = new ExecutorFragment(Types._LookupEnvironment, OCLstdlibTables.Types._OclAny);
+ private static final @NonNull ExecutorFragment _LookupEnvironment__OclElement = new ExecutorFragment(Types._LookupEnvironment, OCLstdlibTables.Types._OclElement);
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::Fragments and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The parameter lists shared by operations.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Parameters {
+ static {
+ Init.initStart();
+ Fragments.init();
+ }
+
+ public static final @NonNull ParameterTypes _Collection__LookupEnvironment_addElements_NE__ = TypeUtil.createParameterTypes(new ExecutorSpecializedType("Collection", LookupTables.TypeParameters.__LookupEnvironment__addElements_NE));
+ public static final @NonNull ParameterTypes _Employee = TypeUtil.createParameterTypes(CompanyTables.Types._Employee);
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::Parameters and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The operation descriptors for each operation of each type.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Operations {
+ static {
+ Init.initStart();
+ Parameters.init();
+ }
+
+ public static final @NonNull ExecutorOperation _LookupEnvironment__addElement = new ExecutorOperation("addElement", Parameters._Employee, Types._LookupEnvironment,
+ 0, TemplateParameters.EMPTY_LIST, null);
+ public static final @NonNull ExecutorOperation _LookupEnvironment__addElements = new ExecutorOperation("addElements", Parameters._Collection__LookupEnvironment_addElements_NE__, Types._LookupEnvironment,
+ 1, TypeUtil.createTemplateParameters(TypeParameters.__LookupEnvironment__addElements_NE), null);
+ public static final @NonNull ExecutorOperation _LookupEnvironment__getExecutor = new ExecutorOperation("getExecutor", TypeUtil.EMPTY_PARAMETER_TYPES, Types._LookupEnvironment,
+ 2, TemplateParameters.EMPTY_LIST, null);
+ public static final @NonNull ExecutorOperation _LookupEnvironment__hasFinalResult = new ExecutorOperation("hasFinalResult", TypeUtil.EMPTY_PARAMETER_TYPES, Types._LookupEnvironment,
+ 3, TemplateParameters.EMPTY_LIST, null);
+
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::Operations and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The property descriptors for each property of each type.
+ *
+ * @noextend This class is not intended to be subclassed by clients.
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ * @noreference This class is not intended to be referenced by clients.
+ */
+ public static class Properties {
+ static {
+ Init.initStart();
+ Operations.init();
+ }
+
+
+ public static final @NonNull ExecutorProperty _LookupEnvironment__namedElements = new EcoreExecutorProperty(LookupPackage.Literals.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS, Types._LookupEnvironment, 0);
+ public static final @NonNull ExecutorProperty _LookupEnvironment__parentEnv = new EcoreExecutorProperty(LookupPackage.Literals.LOOKUP_ENVIRONMENT__PARENT_ENV, Types._LookupEnvironment, 1);
+ public static final @NonNull ExecutorProperty _LookupEnvironment__LookupEnvironment__parentEnv = new ExecutorPropertyWithImplementation("LookupEnvironment", Types._LookupEnvironment, 2, new EcoreLibraryOppositeProperty(LookupPackage.Literals.LOOKUP_ENVIRONMENT__PARENT_ENV));
+ static {
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::Properties and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The fragments for all base types in depth order: OclAny first, OclSelf last.
+ */
+ public static class TypeFragments {
+ static {
+ Init.initStart();
+ Properties.init();
+ }
+
+ private static final @NonNull ExecutorFragment @NonNull [] _Executor =
+ {
+ Fragments._Executor__OclAny /* 0 */,
+ Fragments._Executor__OclElement /* 1 */,
+ Fragments._Executor__Executor /* 2 */
+ };
+ private static final int @NonNull [] __Executor = { 1,1,1 };
+
+ private static final @NonNull ExecutorFragment @NonNull [] _LookupEnvironment =
+ {
+ Fragments._LookupEnvironment__OclAny /* 0 */,
+ Fragments._LookupEnvironment__OclElement /* 1 */,
+ Fragments._LookupEnvironment__LookupEnvironment /* 2 */
+ };
+ private static final int @NonNull [] __LookupEnvironment = { 1,1,1 };
+
+ /**
+ * Install the fragment descriptors in the class descriptors.
+ */
+ static {
+ Types._Executor.initFragments(_Executor, __Executor);
+ Types._LookupEnvironment.initFragments(_LookupEnvironment, __LookupEnvironment);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::TypeFragments and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of local operations or local operation overrides for each fragment of each type.
+ */
+ public static class FragmentOperations {
+ static {
+ Init.initStart();
+ TypeFragments.init();
+ }
+
+ private static final @NonNull ExecutorOperation @NonNull [] _Executor__Executor = {};
+ private static final @NonNull ExecutorOperation @NonNull [] _Executor__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _Executor__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+
+ private static final @NonNull ExecutorOperation @NonNull [] _LookupEnvironment__LookupEnvironment = {
+ LookupTables.Operations._LookupEnvironment__addElement /* addElement(Employee[?]) */,
+ LookupTables.Operations._LookupEnvironment__addElements /* addElements(NE)(Collection(NE)) */,
+ LookupTables.Operations._LookupEnvironment__getExecutor /* getExecutor() */,
+ LookupTables.Operations._LookupEnvironment__hasFinalResult /* hasFinalResult() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _LookupEnvironment__OclAny = {
+ OCLstdlibTables.Operations._OclAny___lt__gt_ /* _'<>'(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny___eq_ /* _'='(OclSelf[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclAsSet /* oclAsSet() */,
+ OCLstdlibTables.Operations._OclAny__oclAsType /* oclAsType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInState /* oclIsInState(OclState[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsInvalid /* oclIsInvalid() */,
+ OCLstdlibTables.Operations._OclAny__oclIsKindOf /* oclIsKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsNew /* oclIsNew() */,
+ OCLstdlibTables.Operations._OclAny__oclIsTypeOf /* oclIsTypeOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclIsUndefined /* oclIsUndefined() */,
+ OCLstdlibTables.Operations._OclAny__0_oclLog /* oclLog() */,
+ OCLstdlibTables.Operations._OclAny__1_oclLog /* oclLog(String[?]) */,
+ OCLstdlibTables.Operations._OclAny__oclType /* oclType() */,
+ OCLstdlibTables.Operations._OclAny__oclTypes /* oclTypes() */,
+ OCLstdlibTables.Operations._OclAny__toString /* toString() */
+ };
+ private static final @NonNull ExecutorOperation @NonNull [] _LookupEnvironment__OclElement = {
+ OCLstdlibTables.Operations._OclElement__allInstances /* allInstances() */,
+ OCLstdlibTables.Operations._OclElement__oclAsModelType /* oclAsModelType(TT)(TT[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclContainer /* oclContainer() */,
+ OCLstdlibTables.Operations._OclElement__oclContents /* oclContents() */,
+ OCLstdlibTables.Operations._OclElement__oclIsModelKindOf /* oclIsModelKindOf(OclType[?]) */,
+ OCLstdlibTables.Operations._OclElement__oclModelType /* oclModelType() */,
+ OCLstdlibTables.Operations._OclElement__oclModelTypes /* oclModelTypes() */
+ };
+
+ /*
+ * Install the operation descriptors in the fragment descriptors.
+ */
+ static {
+ Fragments._Executor__Executor.initOperations(_Executor__Executor);
+ Fragments._Executor__OclAny.initOperations(_Executor__OclAny);
+ Fragments._Executor__OclElement.initOperations(_Executor__OclElement);
+
+ Fragments._LookupEnvironment__LookupEnvironment.initOperations(_LookupEnvironment__LookupEnvironment);
+ Fragments._LookupEnvironment__OclAny.initOperations(_LookupEnvironment__OclAny);
+ Fragments._LookupEnvironment__OclElement.initOperations(_LookupEnvironment__OclElement);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::FragmentOperations and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of local properties for the local fragment of each type.
+ */
+ public static class FragmentProperties {
+ static {
+ Init.initStart();
+ FragmentOperations.init();
+ }
+
+ private static final @NonNull ExecutorProperty @NonNull [] _Executor = {};
+
+ private static final @NonNull ExecutorProperty @NonNull [] _LookupEnvironment = {
+ LookupTables.Properties._LookupEnvironment__namedElements,
+ LookupTables.Properties._LookupEnvironment__parentEnv
+ };
+
+ /**
+ * Install the property descriptors in the fragment descriptors.
+ */
+ static {
+ Fragments._Executor__Executor.initProperties(_Executor);
+ Fragments._LookupEnvironment__LookupEnvironment.initProperties(_LookupEnvironment);
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::FragmentProperties and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The lists of enumeration literals for each enumeration.
+ */
+ public static class EnumerationLiterals {
+ static {
+ Init.initStart();
+ FragmentProperties.init();
+ }
+
+ /**
+ * Install the enumeration literals in the enumerations.
+ */
+ static {
+
+ Init.initEnd();
+ }
+
+ /**
+ * Force initialization of the fields of LookupTables::EnumerationLiterals and all preceding sub-packages.
+ */
+ public static void init() {}
+ }
+
+ /**
+ * The multiple packages above avoid problems with the Java 65536 byte limit but introduce a difficulty in ensuring that
+ * static construction occurs in the disciplined order of the packages when construction may start in any of the packages.
+ * The problem is resolved by ensuring that the static construction of each package first initializes its immediate predecessor.
+ * On completion of predecessor initialization, the residual packages are initialized by starting an initialization in the last package.
+ * This class maintains a count so that the various predecessors can distinguish whether they are the starting point and so
+ * ensure that residual construction occurs just once after all predecessors.
+ */
+ private static class Init {
+ /**
+ * Counter of nested static constructions. On return to zero residual construction starts. -ve once residual construction started.
+ */
+ private static int initCount = 0;
+
+ /**
+ * Invoked at the start of a static construction to defer residual cobstruction until primary constructions complete.
+ */
+ private static void initStart() {
+ if (initCount >= 0) {
+ initCount++;
+ }
+ }
+
+ /**
+ * Invoked at the end of a static construction to activate residual cobstruction once primary constructions complete.
+ */
+ private static void initEnd() {
+ if (initCount > 0) {
+ if (--initCount == 0) {
+ initCount = -1;
+ EnumerationLiterals.init();
+ }
+ }
+ }
+ }
+
+ static {
+ Init.initEnd();
+ }
+
+ /*
+ * Force initialization of outer fields. Inner fields are lazily initialized.
+ */
+ public static void init() {}
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupEnvironmentImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupEnvironmentImpl.java
new file mode 100644
index 0000000..ce89288
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupEnvironmentImpl.java
@@ -0,0 +1,311 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup.impl;
+
+import cs2as.company.Employee;
+
+import cs2as.company.lookup.LookupEnvironment;
+import cs2as.company.lookup.LookupPackage;
+import cs2as.company.lookup.LookupTables;
+
+import java.lang.reflect.InvocationTargetException;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+import org.eclipse.ocl.pivot.evaluation.Executor;
+
+import org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal;
+
+import org.eclipse.ocl.pivot.library.collection.CollectionIncludingAllOperation;
+import org.eclipse.ocl.pivot.library.collection.CollectionIncludingOperation;
+
+import org.eclipse.ocl.pivot.values.OrderedSetValue;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Environment</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link cs2as.company.lookup.impl.LookupEnvironmentImpl#getNamedElements <em>Named Elements</em>}</li>
+ * <li>{@link cs2as.company.lookup.impl.LookupEnvironmentImpl#getParentEnv <em>Parent Env</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class LookupEnvironmentImpl extends MinimalEObjectImpl.Container implements LookupEnvironment {
+ /**
+ * The cached value of the '{@link #getNamedElements() <em>Named Elements</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNamedElements()
+ * @generated
+ * @ordered
+ */
+ protected EList<Employee> namedElements;
+
+ /**
+ * The cached value of the '{@link #getParentEnv() <em>Parent Env</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParentEnv()
+ * @generated
+ * @ordered
+ */
+ protected LookupEnvironment parentEnv;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LookupEnvironmentImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return LookupPackage.Literals.LOOKUP_ENVIRONMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Employee> getNamedElements() {
+ if (namedElements == null) {
+ namedElements = new EObjectResolvingEList<Employee>(Employee.class, this, LookupPackage.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS);
+ }
+ return namedElements;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupEnvironment getParentEnv() {
+ if (parentEnv != null && parentEnv.eIsProxy()) {
+ InternalEObject oldParentEnv = (InternalEObject)parentEnv;
+ parentEnv = (LookupEnvironment)eResolveProxy(oldParentEnv);
+ if (parentEnv != oldParentEnv) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV, oldParentEnv, parentEnv));
+ }
+ }
+ return parentEnv;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupEnvironment basicGetParentEnv() {
+ return parentEnv;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentEnv(LookupEnvironment newParentEnv) {
+ LookupEnvironment oldParentEnv = parentEnv;
+ parentEnv = newParentEnv;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV, oldParentEnv, parentEnv));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public <NE extends Employee> LookupEnvironment addElements(final Collection<NE> elements) {
+ /**
+ * LookupEnvironment{namedElements = namedElements->includingAll(elements)}
+ */
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.evaluation.@NonNull Executor executor = PivotUtilInternal.getExecutor(this);
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@NonNull IdResolver idResolver = executor.getIdResolver();
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.@NonNull Property CTORid_namedElements = idResolver.getProperty(LookupTables.PROPid_namedElements);
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.@NonNull Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(LookupTables.CLSSid_LookupEnvironment, null);
+ final /*@Thrown*/ cs2as.company.lookup.@NonNull LookupEnvironment symbol_0 = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@NonNull List<Employee> namedElements = this.getNamedElements();
+ final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(LookupTables.ORD_CLSSid_Employee, namedElements);
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.values.@NonNull CollectionValue BOXED_elements = idResolver.createCollectionOfAll(LookupTables.COL_TMPLid_, elements);
+ final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull CollectionValue includingAll = CollectionIncludingAllOperation.INSTANCE.evaluate(BOXED_namedElements, BOXED_elements);
+ final List<? extends Object> UNBOXED_includingAll = includingAll.asEcoreObjects(idResolver, Object.class);
+ assert UNBOXED_includingAll != null;
+ CTORid_namedElements.initValue(symbol_0, UNBOXED_includingAll);
+ return symbol_0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupEnvironment addElement(final Employee element) {
+ /**
+ * LookupEnvironment{namedElements = namedElements->including(element)}
+ */
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.evaluation.@NonNull Executor executor = PivotUtilInternal.getExecutor(this);
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.ids.@NonNull IdResolver idResolver = executor.getIdResolver();
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.@NonNull Property CTORid_namedElements = idResolver.getProperty(LookupTables.PROPid_namedElements);
+ final /*@NonInvalid*/ org.eclipse.ocl.pivot.@NonNull Class TYP_lookup_c_c_LookupEnvironment_0 = idResolver.getClass(LookupTables.CLSSid_LookupEnvironment, null);
+ final /*@Thrown*/ cs2as.company.lookup.@NonNull LookupEnvironment symbol_0 = (LookupEnvironment)TYP_lookup_c_c_LookupEnvironment_0.createInstance();
+ @SuppressWarnings("null")
+ final /*@Thrown*/ java.util.@NonNull List<Employee> namedElements = this.getNamedElements();
+ final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue BOXED_namedElements = idResolver.createOrderedSetOfAll(LookupTables.ORD_CLSSid_Employee, namedElements);
+ final /*@Thrown*/ org.eclipse.ocl.pivot.values.@NonNull OrderedSetValue including = (OrderedSetValue)CollectionIncludingOperation.INSTANCE.evaluate(BOXED_namedElements, element);
+ final List<Employee> UNBOXED_including = including.asEcoreObjects(idResolver, cs2as.company.Employee.class);
+ assert UNBOXED_including != null;
+ CTORid_namedElements.initValue(symbol_0, UNBOXED_including);
+ return symbol_0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean hasFinalResult() {
+ throw new UnsupportedOperationException("Enviroment::hasFinalResult() has been created for CG purposes. Don't call this method");
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Executor getExecutor() {
+ throw new UnsupportedOperationException("Enviroment::getEvaluator() has been created for CG purposes. Don't call this method");
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case LookupPackage.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS:
+ return getNamedElements();
+ case LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV:
+ if (resolve) return getParentEnv();
+ return basicGetParentEnv();
+ }
+ 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 LookupPackage.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS:
+ getNamedElements().clear();
+ getNamedElements().addAll((Collection<? extends Employee>)newValue);
+ return;
+ case LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV:
+ setParentEnv((LookupEnvironment)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case LookupPackage.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS:
+ getNamedElements().clear();
+ return;
+ case LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV:
+ setParentEnv((LookupEnvironment)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case LookupPackage.LOOKUP_ENVIRONMENT__NAMED_ELEMENTS:
+ return namedElements != null && !namedElements.isEmpty();
+ case LookupPackage.LOOKUP_ENVIRONMENT__PARENT_ENV:
+ return parentEnv != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ @SuppressWarnings({"rawtypes", "unchecked" })
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case LookupPackage.LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION:
+ return addElements((Collection)arguments.get(0));
+ case LookupPackage.LOOKUP_ENVIRONMENT___ADD_ELEMENT__EMPLOYEE:
+ return addElement((Employee)arguments.get(0));
+ case LookupPackage.LOOKUP_ENVIRONMENT___HAS_FINAL_RESULT:
+ return hasFinalResult();
+ case LookupPackage.LOOKUP_ENVIRONMENT___GET_EXECUTOR:
+ return getExecutor();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+
+} //LookupEnvironmentImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupFactoryImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupFactoryImpl.java
new file mode 100644
index 0000000..8cf8ee6
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupFactoryImpl.java
@@ -0,0 +1,103 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup.impl;
+
+import cs2as.company.lookup.*;
+
+import org.eclipse.emf.ecore.EClass;
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LookupFactoryImpl extends EFactoryImpl implements LookupFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static LookupFactory init() {
+ try {
+ LookupFactory theLookupFactory = (LookupFactory)EPackage.Registry.INSTANCE.getEFactory(LookupPackage.eNS_URI);
+ if (theLookupFactory != null) {
+ return theLookupFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new LookupFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case LookupPackage.LOOKUP_ENVIRONMENT: return createLookupEnvironment();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupEnvironment createLookupEnvironment() {
+ LookupEnvironmentImpl lookupEnvironment = new LookupEnvironmentImpl();
+ return lookupEnvironment;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupPackage getLookupPackage() {
+ return (LookupPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static LookupPackage getPackage() {
+ return LookupPackage.eINSTANCE;
+ }
+
+} //LookupFactoryImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupPackageImpl.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupPackageImpl.java
new file mode 100644
index 0000000..852b1f7
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/impl/LookupPackageImpl.java
@@ -0,0 +1,309 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup.impl;
+
+import cs2as.company.CompanyPackage;
+
+import cs2as.company.lookup.LookupEnvironment;
+import cs2as.company.lookup.LookupFactory;
+import cs2as.company.lookup.LookupPackage;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EGenericType;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.ETypeParameter;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.ocl.pivot.evaluation.Executor;
+
+import org.eclipse.ocl.pivot.oclstdlib.OCLstdlibPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class LookupPackageImpl extends EPackageImpl implements LookupPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass lookupEnvironmentEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass executorEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see cs2as.company.lookup.LookupPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private LookupPackageImpl() {
+ super(eNS_URI, LookupFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link LookupPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static LookupPackage init() {
+ if (isInited) return (LookupPackage)EPackage.Registry.INSTANCE.getEPackage(LookupPackage.eNS_URI);
+
+ // Obtain or create and register package
+ Object ePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ LookupPackageImpl theLookupPackage = (LookupPackageImpl)(ePackage instanceof LookupPackageImpl ? ePackage : new LookupPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ CompanyPackage.eINSTANCE.eClass();
+ OCLstdlibPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theLookupPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theLookupPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theLookupPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(LookupPackage.eNS_URI, theLookupPackage);
+ return theLookupPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLookupEnvironment() {
+ return lookupEnvironmentEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLookupEnvironment_NamedElements() {
+ return (EReference)lookupEnvironmentEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLookupEnvironment_ParentEnv() {
+ return (EReference)lookupEnvironmentEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getLookupEnvironment__AddElements__Collection() {
+ return lookupEnvironmentEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getLookupEnvironment__AddElement__Employee() {
+ return lookupEnvironmentEClass.getEOperations().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getLookupEnvironment__HasFinalResult() {
+ return lookupEnvironmentEClass.getEOperations().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getLookupEnvironment__GetExecutor() {
+ return lookupEnvironmentEClass.getEOperations().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExecutor() {
+ return executorEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupFactory getLookupFactory() {
+ return (LookupFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ lookupEnvironmentEClass = createEClass(LOOKUP_ENVIRONMENT);
+ createEReference(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT__NAMED_ELEMENTS);
+ createEReference(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT__PARENT_ENV);
+ createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___ADD_ELEMENTS__COLLECTION);
+ createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___ADD_ELEMENT__EMPLOYEE);
+ createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___HAS_FINAL_RESULT);
+ createEOperation(lookupEnvironmentEClass, LOOKUP_ENVIRONMENT___GET_EXECUTOR);
+
+ executorEClass = createEClass(EXECUTOR);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ CompanyPackage theCompanyPackage = (CompanyPackage)EPackage.Registry.INSTANCE.getEPackage(CompanyPackage.eNS_URI);
+ OCLstdlibPackage theOCLstdlibPackage = (OCLstdlibPackage)EPackage.Registry.INSTANCE.getEPackage(OCLstdlibPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(lookupEnvironmentEClass, LookupEnvironment.class, "LookupEnvironment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getLookupEnvironment_NamedElements(), theCompanyPackage.getEmployee(), null, "namedElements", null, 0, -1, LookupEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLookupEnvironment_ParentEnv(), this.getLookupEnvironment(), null, "parentEnv", null, 0, 1, LookupEnvironment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = initEOperation(getLookupEnvironment__AddElements__Collection(), this.getLookupEnvironment(), "addElements", 1, 1, IS_UNIQUE, IS_ORDERED);
+ ETypeParameter t1 = addETypeParameter(op, "NE");
+ EGenericType g1 = createEGenericType(theCompanyPackage.getEmployee());
+ t1.getEBounds().add(g1);
+ g1 = createEGenericType(theOCLstdlibPackage.getCollection());
+ EGenericType g2 = createEGenericType(t1);
+ g1.getETypeArguments().add(g2);
+ addEParameter(op, g1, "elements", 1, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = initEOperation(getLookupEnvironment__AddElement__Employee(), this.getLookupEnvironment(), "addElement", 1, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theCompanyPackage.getEmployee(), "element", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEOperation(getLookupEnvironment__HasFinalResult(), ecorePackage.getEBoolean(), "hasFinalResult", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEOperation(getLookupEnvironment__GetExecutor(), this.getExecutor(), "getExecutor", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(executorEClass, Executor.class, "Executor", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createEcoreAnnotations() {
+ String source = "http://www.eclipse.org/emf/2002/Ecore";
+ addAnnotation
+ (this,
+ source,
+ new String[] {
+ });
+ }
+
+} //LookupPackageImpl
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupAdapterFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupAdapterFactory.java
new file mode 100644
index 0000000..d90b0b2
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupAdapterFactory.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup.util;
+
+import cs2as.company.lookup.*;
+
+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.eclipse.jdt.annotation.Nullable;
+
+import org.eclipse.ocl.pivot.evaluation.Executor;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.LookupPackage
+ * @generated
+ */
+public class LookupAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static LookupPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = LookupPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LookupSwitch<@Nullable Adapter> modelSwitch =
+ new LookupSwitch<@Nullable Adapter>() {
+ @Override
+ public Adapter caseLookupEnvironment(LookupEnvironment object) {
+ return createLookupEnvironmentAdapter();
+ }
+ @Override
+ public Adapter caseExecutor(Executor object) {
+ return createExecutorAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.company.lookup.LookupEnvironment <em>Environment</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 cs2as.company.lookup.LookupEnvironment
+ * @generated
+ */
+ public Adapter createLookupEnvironmentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.ocl.pivot.evaluation.Executor <em>Executor</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.eclipse.ocl.pivot.evaluation.Executor
+ * @generated
+ */
+ public Adapter createExecutorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //LookupAdapterFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupSwitch.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupSwitch.java
new file mode 100644
index 0000000..112bb26
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/lookup/util/LookupSwitch.java
@@ -0,0 +1,143 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.lookup.util;
+
+import cs2as.company.lookup.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+import org.eclipse.ocl.pivot.evaluation.Executor;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.lookup.LookupPackage
+ * @generated
+ */
+public class LookupSwitch<@Nullable T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static LookupPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LookupSwitch() {
+ if (modelPackage == null) {
+ modelPackage = LookupPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case LookupPackage.LOOKUP_ENVIRONMENT: {
+ LookupEnvironment lookupEnvironment = (LookupEnvironment)theEObject;
+ T result = caseLookupEnvironment(lookupEnvironment);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case LookupPackage.EXECUTOR: {
+ Executor executor = (Executor)theEObject;
+ T result = caseExecutor(executor);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Environment</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>Environment</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseLookupEnvironment(LookupEnvironment object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Executor</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>Executor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExecutor(Executor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //LookupSwitch
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractDelegatingVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractDelegatingVisitor.java
new file mode 100644
index 0000000..2f8cfb5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractDelegatingVisitor.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * An AbstractDelegatingVisitor delegates all visits.
+ */
+public abstract class AbstractDelegatingVisitor<R, C, @NonNull D extends Visitor<R>>
+ extends AbstractVisitor<R, C>
+ implements Visitor<R>
+{
+ protected final @NonNull D delegate;
+
+ protected AbstractDelegatingVisitor(@NonNull D delegate, C context) {
+ super(context);
+ // assert delegate != null : "cannot decorate a null visitor"; //$NON-NLS-1$
+ this.delegate = delegate;
+ // delegate.setUndecoratedVisitor(this);
+ }
+
+ /**
+ * Delegates to my decorated visitor.
+ */
+ // public @NonNull DecorableVisitor<R> createNestedVisitor() {
+ // return delegate.createNestedVisitor();
+ // }
+
+ /**
+ * Obtains the visitor that I decorate.
+ *
+ * @return my decorated visitor
+ */
+ protected final @NonNull D getDelegate() {
+ return delegate;
+ }
+
+ @Override
+ public R visiting(cs2as.company.util.@NonNull Visitable visitable) {
+ return delegate.visiting(visitable);
+ }
+
+ @Override
+ public R visitCompany(cs2as.company.@NonNull Company object) {
+ return delegate.visitCompany(object);
+ }
+
+ @Override
+ public R visitDepartment(cs2as.company.@NonNull Department object) {
+ return delegate.visitDepartment(object);
+ }
+
+ @Override
+ public R visitEmployee(cs2as.company.@NonNull Employee object) {
+ return delegate.visitEmployee(object);
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractExtendingVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractExtendingVisitor.java
new file mode 100644
index 0000000..a9d07c7
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractExtendingVisitor.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * An AbstractExtendingVisitor provides a default implementation for each
+ * visitXxx method that delegates to the visitYyy method of the first
+ * super class, (or transitively its first super class' first super class
+ * until a non-interface super-class is found). In the absence of any
+ * suitable first super class, the method delegates to visiting().
+ */
+public abstract class AbstractExtendingVisitor<R, C>
+ extends AbstractVisitor<R, C>
+ implements Visitor<R>
+{
+ /**
+ * Initializes me with an initial value for my result.
+ *
+ * @param context my initial result value
+ */
+ protected AbstractExtendingVisitor(C context) {
+ super(context);
+ }
+
+ @Override
+ public R visitCompany(cs2as.company.@NonNull Company object) {
+ return visiting(object);
+ }
+
+ @Override
+ public R visitDepartment(cs2as.company.@NonNull Department object) {
+ return visiting(object);
+ }
+
+ @Override
+ public R visitEmployee(cs2as.company.@NonNull Employee object) {
+ return visiting(object);
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractMergedVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractMergedVisitor.java
new file mode 100644
index 0000000..3cc2870
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractMergedVisitor.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+
+/**
+ * An AbstractMergedVisitor merges all visits direct to visiting().
+ * This can be used by a decorating visitor to execute shared code before redispatching to a decorated visitor.
+ */
+public abstract class AbstractMergedVisitor<R, C>
+ extends AbstractVisitor<R, C>
+ implements Visitor<R>
+{
+ protected AbstractMergedVisitor(C context) {
+ super(context);
+ }
+
+ @Override
+ public R visitCompany(cs2as.company.@NonNull Company object) {
+ return visiting(object);
+ }
+
+ @Override
+ public R visitDepartment(cs2as.company.@NonNull Department object) {
+ return visiting(object);
+ }
+
+ @Override
+ public R visitEmployee(cs2as.company.@NonNull Employee object) {
+ return visiting(object);
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractNullVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractNullVisitor.java
new file mode 100644
index 0000000..32cf639
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractNullVisitor.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * An AbstractNullVisitor provides a default implementation for each
+ * visitXxx method that returns null.
+ *
+ * @deprecated Explicit 'Null' functionality is obsolete with Java 8 @Nullable annotations.
+ */
+ @Deprecated
+public abstract class AbstractNullVisitor<@Nullable R, C>
+ extends AbstractVisitor<R, C>
+{
+ /**
+ * Initializes me with an initial value for my result.
+ *
+ * @param context my initial result value
+ */
+ protected AbstractNullVisitor(C context) {
+ super(context);
+ }
+
+ @Override
+ public R visitCompany(cs2as.company.@NonNull Company object) {
+ return null;
+ }
+
+ @Override
+ public R visitDepartment(cs2as.company.@NonNull Department object) {
+ return null;
+ }
+
+ @Override
+ public R visitEmployee(cs2as.company.@NonNull Employee object) {
+ return null;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractVisitor.java
new file mode 100644
index 0000000..3abb267
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractVisitor.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+
+/*
+ * An AbstractVisitor provides a default implementation of the visitor framework
+ * but n implementations of the visitXXX methods..
+ */
+public abstract class AbstractVisitor<R, C>
+ implements Visitor<R>
+{
+ /**
+ * Context for the AST visitation.
+ */
+ protected final C context;
+
+ /**
+ * Initializes me with an initial value for my result.
+ *
+ * @param context my initial result value
+ */
+ protected AbstractVisitor(C context) {
+ this.context = context;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public <A> @Nullable A getAdapter(@NonNull Class<A> adapter) {
+ if (adapter.isAssignableFrom(getClass())) {
+ return (A) this;
+ }
+ else {
+ return null;
+ }
+ }
+
+ /**
+ * A null-safe visitation of the specified visitable.
+ *
+ * @param v a visitable, or <code>null</code>
+ * @return <code>null</code> if the visitable is <code>null</code>;
+ * otherwise, the result of visiting it
+ */
+ public @Nullable R safeVisit(cs2as.company.util.@Nullable Visitable v) {
+ return (v == null) ? null : v.accept(this);
+ }
+
+ /**
+ * Perform a visit to the specified visitable.
+ *
+ * @param v a visitable, or <code>null</code>
+ * @return <code>null</code> if the visitable is <code>null</code>;
+ * otherwise, the result of visiting it
+ */
+ public R visit(cs2as.company.util.@NonNull Visitable v) {
+ return v.accept(this);
+ }
+
+ // public R visiting(cs2as.company.util.@NonNull Visitable visitable) {
+ // return null;
+ // }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractWrappingVisitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractWrappingVisitor.java
new file mode 100644
index 0000000..09860b5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/AbstractWrappingVisitor.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * An AbstractWrappingVisitor delegates all visits wrapping the delegation in a call to a preVisit function and a postVisit function.
+ */
+public abstract class AbstractWrappingVisitor<R, C, @NonNull D extends Visitor<R>, P>
+ extends AbstractVisitor<R, C>
+ implements Visitor<R>
+{
+ protected final @NonNull D delegate;
+
+ protected AbstractWrappingVisitor(@NonNull D delegate, C context) {
+ super(context);
+ this.delegate = delegate;
+ // delegate.setUndecoratedVisitor(this);
+ }
+
+ /**
+ * Intercept an exception thrown by the delegated visit to perform some post-functionality that may use the visitable object,
+ * the result of preVisit and the thrown exception to determine the overall wrapped result.
+ *
+ * @return a rethrown RuntimeException or a RuntimeException-wrapped non-RuntimeException.
+ */
+ protected R badVisit(cs2as.company.util.@NonNull Visitable visitable, @Nullable P prologue, @NonNull Throwable e) throws RuntimeException {
+ if (e instanceof Exception) {
+ throw (RuntimeException)e;
+ }
+ else {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Obtains the visitor that I wrap.
+ *
+ * @return my wrapped visitor
+ */
+ protected @NonNull D getDelegate() {
+ return delegate;
+ }
+
+ /**
+ * Intercept the result of the delegated visit to perform some post-functionality that may use the visitable object,
+ * the result of preVisit and the result of the delegated visit to determine the overall wrapped result.
+ *
+ * @return the epilogue result, which defaults to the delegated result.
+ */
+ protected R postVisit(cs2as.company.util.@NonNull Visitable visitable, @Nullable P prologue, R result) {
+ return result;
+ }
+
+ /**
+ * Compute and return some value before performing the delegated visit.
+ *
+ * @return the prologue result, which defauilts to null.
+ */
+ protected @Nullable P preVisit(cs2as.company.util.@NonNull Visitable visitable) {
+ return null;
+ }
+
+ @Override
+ public R visiting(cs2as.company.util.@NonNull Visitable visitable) {
+ throw new UnsupportedOperationException(); // Cannot happen since all methods delegate.
+ }
+
+ @Override
+ public R visitCompany(cs2as.company.@NonNull Company object) {
+ @Nullable P prologue = preVisit(object);
+ try {
+ R result = delegate.visitCompany(object);
+ return postVisit(object, prologue, result);
+ }
+ catch (Throwable e) {
+ return badVisit(object, prologue, e);
+ }
+ }
+
+ @Override
+ public R visitDepartment(cs2as.company.@NonNull Department object) {
+ @Nullable P prologue = preVisit(object);
+ try {
+ R result = delegate.visitDepartment(object);
+ return postVisit(object, prologue, result);
+ }
+ catch (Throwable e) {
+ return badVisit(object, prologue, e);
+ }
+ }
+
+ @Override
+ public R visitEmployee(cs2as.company.@NonNull Employee object) {
+ @Nullable P prologue = preVisit(object);
+ try {
+ R result = delegate.visitEmployee(object);
+ return postVisit(object, prologue, result);
+ }
+ catch (Throwable e) {
+ return badVisit(object, prologue, e);
+ }
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanyAdapterFactory.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanyAdapterFactory.java
new file mode 100644
index 0000000..8bd840f
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanyAdapterFactory.java
@@ -0,0 +1,184 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.util;
+
+import cs2as.company.*;
+
+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.eclipse.jdt.annotation.Nullable;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.CompanyPackage
+ * @generated
+ */
+public class CompanyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CompanyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompanyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = CompanyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CompanySwitch<@Nullable Adapter> modelSwitch =
+ new CompanySwitch<@Nullable Adapter>() {
+ @Override
+ public Adapter caseCompany(Company object) {
+ return createCompanyAdapter();
+ }
+ @Override
+ public Adapter caseDepartment(Department object) {
+ return createDepartmentAdapter();
+ }
+ @Override
+ public Adapter caseEmployee(Employee object) {
+ return createEmployeeAdapter();
+ }
+ @Override
+ public Adapter caseVisitable(Visitable object) {
+ return createVisitableAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.company.Company <em>Company</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 cs2as.company.Company
+ * @generated
+ */
+ public Adapter createCompanyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.company.Department <em>Department</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 cs2as.company.Department
+ * @generated
+ */
+ public Adapter createDepartmentAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.company.Employee <em>Employee</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 cs2as.company.Employee
+ * @generated
+ */
+ public Adapter createEmployeeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link cs2as.company.util.Visitable <em>Visitable</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 cs2as.company.util.Visitable
+ * @generated
+ */
+ public Adapter createVisitableAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //CompanyAdapterFactory
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanySwitch.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanySwitch.java
new file mode 100644
index 0000000..a6ac263
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/CompanySwitch.java
@@ -0,0 +1,186 @@
+/**
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ */
+package cs2as.company.util;
+
+import cs2as.company.*;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see cs2as.company.CompanyPackage
+ * @generated
+ */
+public class CompanySwitch<@Nullable T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static CompanyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CompanySwitch() {
+ if (modelPackage == null) {
+ modelPackage = CompanyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case CompanyPackage.COMPANY: {
+ Company company = (Company)theEObject;
+ T result = caseCompany(company);
+ if (result == null) result = caseVisitable(company);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompanyPackage.DEPARTMENT: {
+ Department department = (Department)theEObject;
+ T result = caseDepartment(department);
+ if (result == null) result = caseVisitable(department);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompanyPackage.EMPLOYEE: {
+ Employee employee = (Employee)theEObject;
+ T result = caseEmployee(employee);
+ if (result == null) result = caseVisitable(employee);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case CompanyPackage.VISITABLE: {
+ Visitable visitable = (Visitable)theEObject;
+ T result = caseVisitable(visitable);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Company</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>Company</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCompany(Company object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Department</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>Department</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDepartment(Department object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Employee</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>Employee</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmployee(Employee object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Visitable</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>Visitable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseVisitable(Visitable object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //CompanySwitch
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitable.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitable.java
new file mode 100644
index 0000000..b9c9838
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitable.java
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.jdt.annotation.NonNull;
+
+public interface Visitable
+{
+ /**
+ * Returns the result of accepting a visit from a visitor.
+ * Implementations typically invoke a derived-class-specific
+ * variant of visitXXX() to facilitate derived-class-specific
+ * processing or just visit() when no such method is available.
+ * <p>
+ * Implementations of visit() may use the EcoreSwitch to perform
+ * derived-class-specific processing.
+ * <p>
+ * Derived implementations of accept() may use getAdapter() to obtain
+ * richer visitor interfaces.
+ * @param <R>
+ * @param visitor
+ * @return the result of the visit.
+ */
+ <R> R accept(cs2as.company.util.@NonNull Visitor<R> visitor);
+
+ EClass eClass();
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitor.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitor.java
new file mode 100644
index 0000000..15f9ff1
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/emf-gen/cs2as/company/util/Visitor.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Willink Transformations, Univesity of York 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:
+ * Adolfo Sanchez-Barbudo Herrera - initial API and implementation
+ *
+ * This code is auto-generated
+ * from: org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Company.genmodel
+ *
+ * Only the copyright statement is editable.
+ *******************************************************************************/
+package cs2as.company.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+
+/**
+ * @noimplement This interface is not intended to be implemented by clients.
+ */
+public interface Visitor<R>
+{
+ /**
+ * Returns an object which is an instance of the given class
+ * associated with this object. Returns <code>null</code> if
+ * no such object can be found.
+ *
+ * @param adapter the adapter class to look up
+ * @return an object of the given class,
+ * or <code>null</code> if this object does not
+ * have an adapter for the given class
+ */
+ @Nullable <A> A getAdapter(@NonNull Class<A> adapter);
+
+ /**
+ * Return the result of visiting a visitable for which no more specific pivot type method
+ * is available.
+ */
+ R visiting(cs2as.company.util.@NonNull Visitable visitable);
+
+ R visitCompany(cs2as.company.@NonNull Company object);
+ R visitDepartment(cs2as.company.@NonNull Department object);
+ R visitEmployee(cs2as.company.@NonNull Employee object);
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/.gitignore b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/.gitignore
new file mode 100644
index 0000000..53261f8
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/.gitignore
@@ -0,0 +1 @@
+/Companies.xtextbin
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/AbstractCompaniesRuntimeModule.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/AbstractCompaniesRuntimeModule.java
new file mode 100644
index 0000000..f453a46
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/AbstractCompaniesRuntimeModule.java
@@ -0,0 +1,194 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies;
+
+import com.google.inject.Binder;
+import com.google.inject.Provider;
+import com.google.inject.name.Names;
+import java.util.Properties;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.generator.CompaniesGenerator;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.CompaniesAntlrTokenFileProvider;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.CompaniesParser;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal.InternalCompaniesLexer;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.scoping.CompaniesScopeProvider;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.serializer.CompaniesSemanticSequencer;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.serializer.CompaniesSyntacticSequencer;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.validation.CompaniesValidator;
+import org.eclipse.xtext.Constants;
+import org.eclipse.xtext.IGrammarAccess;
+import org.eclipse.xtext.generator.IGenerator2;
+import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider;
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+import org.eclipse.xtext.parser.IParser;
+import org.eclipse.xtext.parser.ITokenToStringConverter;
+import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
+import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
+import org.eclipse.xtext.parser.antlr.Lexer;
+import org.eclipse.xtext.parser.antlr.LexerBindings;
+import org.eclipse.xtext.parser.antlr.LexerProvider;
+import org.eclipse.xtext.resource.IContainer;
+import org.eclipse.xtext.resource.IResourceDescriptions;
+import org.eclipse.xtext.resource.containers.IAllContainersState;
+import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider;
+import org.eclipse.xtext.resource.containers.StateBasedContainerManager;
+import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
+import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
+import org.eclipse.xtext.scoping.IGlobalScopeProvider;
+import org.eclipse.xtext.scoping.IScopeProvider;
+import org.eclipse.xtext.scoping.IgnoreCaseLinking;
+import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
+import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider;
+import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider;
+import org.eclipse.xtext.serializer.ISerializer;
+import org.eclipse.xtext.serializer.impl.Serializer;
+import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer;
+import org.eclipse.xtext.service.DefaultRuntimeModule;
+import org.eclipse.xtext.service.SingletonBinding;
+
+/**
+ * Manual modifications go to {@link CompaniesRuntimeModule}.
+ */
+@SuppressWarnings("all")
+public abstract class AbstractCompaniesRuntimeModule extends DefaultRuntimeModule {
+
+ protected Properties properties = null;
+
+ @Override
+ public void configure(Binder binder) {
+ properties = tryBindProperties(binder, "org/eclipse/qvtd/cs2as/compiler/tests/models/companies/Companies.properties");
+ super.configure(binder);
+ }
+
+ public void configureLanguageName(Binder binder) {
+ binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies");
+ }
+
+ public void configureFileExtensions(Binder binder) {
+ if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
+ binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("101");
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
+ public ClassLoader bindClassLoaderToInstance() {
+ return getClass().getClassLoader();
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
+ public Class<? extends IGrammarAccess> bindIGrammarAccess() {
+ return CompaniesGrammarAccess.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
+ public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
+ return CompaniesSemanticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
+ public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
+ return CompaniesSyntacticSequencer.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
+ public Class<? extends ISerializer> bindISerializer() {
+ return Serializer.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Class<? extends IParser> bindIParser() {
+ return CompaniesParser.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() {
+ return AntlrTokenToStringConverter.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
+ return CompaniesAntlrTokenFileProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Class<? extends Lexer> bindLexer() {
+ return InternalCompaniesLexer.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
+ return AntlrTokenDefProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public Provider<InternalCompaniesLexer> provideInternalCompaniesLexer() {
+ return LexerProvider.create(InternalCompaniesLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
+ public void configureRuntimeLexer(Binder binder) {
+ binder.bind(Lexer.class)
+ .annotatedWith(Names.named(LexerBindings.RUNTIME))
+ .to(InternalCompaniesLexer.class);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
+ @SingletonBinding(eager=true)
+ public Class<? extends CompaniesValidator> bindCompaniesValidator() {
+ return CompaniesValidator.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
+ public Class<? extends IScopeProvider> bindIScopeProvider() {
+ return CompaniesScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
+ public void configureIScopeProviderDelegate(Binder binder) {
+ binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
+ public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
+ return DefaultGlobalScopeProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
+ public void configureIgnoreCaseLinking(Binder binder) {
+ binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
+ public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
+ return DefaultDeclarativeQualifiedNameProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
+ public Class<? extends IContainer.Manager> bindIContainer$Manager() {
+ return StateBasedContainerManager.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
+ public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
+ return ResourceSetBasedAllContainersStateProvider.class;
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
+ public void configureIResourceDescriptions(Binder binder) {
+ binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
+ public void configureIResourceDescriptionsPersisted(Binder binder) {
+ binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
+ }
+
+ // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
+ public Class<? extends IGenerator2> bindIGenerator2() {
+ return CompaniesGenerator.class;
+ }
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetupGenerated.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetupGenerated.java
new file mode 100644
index 0000000..4188f35
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetupGenerated.java
@@ -0,0 +1,52 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+import org.eclipse.xtext.ISetup;
+import org.eclipse.xtext.XtextPackage;
+import org.eclipse.xtext.resource.IResourceFactory;
+import org.eclipse.xtext.resource.IResourceServiceProvider;
+import org.eclipse.xtext.resource.impl.BinaryGrammarResourceFactoryImpl;
+
+@SuppressWarnings("all")
+public class CompaniesStandaloneSetupGenerated implements ISetup {
+
+ @Override
+ public Injector createInjectorAndDoEMFRegistration() {
+ // register default ePackages
+ if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("ecore"))
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
+ "ecore", new EcoreResourceFactoryImpl());
+ if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xmi"))
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
+ "xmi", new XMIResourceFactoryImpl());
+ if (!Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().containsKey("xtextbin"))
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
+ "xtextbin", new BinaryGrammarResourceFactoryImpl());
+ if (!EPackage.Registry.INSTANCE.containsKey(XtextPackage.eNS_URI))
+ EPackage.Registry.INSTANCE.put(XtextPackage.eNS_URI, XtextPackage.eINSTANCE);
+
+ Injector injector = createInjector();
+ register(injector);
+ return injector;
+ }
+
+ public Injector createInjector() {
+ return Guice.createInjector(new CompaniesRuntimeModule());
+ }
+
+ public void register(Injector injector) {
+ IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
+ IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
+
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("101", resourceFactory);
+ IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("101", serviceProvider);
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesAntlrTokenFileProvider.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesAntlrTokenFileProvider.java
new file mode 100644
index 0000000..301e915
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesAntlrTokenFileProvider.java
@@ -0,0 +1,16 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr;
+
+import java.io.InputStream;
+import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
+
+public class CompaniesAntlrTokenFileProvider implements IAntlrTokenFileProvider {
+
+ @Override
+ public InputStream getAntlrTokenFile() {
+ ClassLoader classLoader = getClass().getClassLoader();
+ return classLoader.getResourceAsStream("org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.tokens");
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesParser.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesParser.java
new file mode 100644
index 0000000..57e8929
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/CompaniesParser.java
@@ -0,0 +1,40 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr;
+
+import com.google.inject.Inject;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal.InternalCompaniesParser;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+
+public class CompaniesParser extends AbstractAntlrParser {
+
+ @Inject
+ private CompaniesGrammarAccess grammarAccess;
+
+ @Override
+ protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
+ tokenStream.setInitialHiddenTokens("RULE_WS");
+ }
+
+
+ @Override
+ protected InternalCompaniesParser createParser(XtextTokenStream stream) {
+ return new InternalCompaniesParser(stream, getGrammarAccess());
+ }
+
+ @Override
+ protected String getDefaultRuleName() {
+ return "company";
+ }
+
+ public CompaniesGrammarAccess getGrammarAccess() {
+ return this.grammarAccess;
+ }
+
+ public void setGrammarAccess(CompaniesGrammarAccess grammarAccess) {
+ this.grammarAccess = grammarAccess;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.g b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.g
new file mode 100644
index 0000000..e995985
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.g
@@ -0,0 +1,447 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+grammar InternalCompanies;
+
+options {
+ superClass=AbstractInternalAntlrParser;
+}
+
+@lexer::header {
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+}
+
+@parser::header {
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+
+}
+
+@parser::members {
+
+ private CompaniesGrammarAccess grammarAccess;
+
+ public InternalCompaniesParser(TokenStream input, CompaniesGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "company";
+ }
+
+ @Override
+ protected CompaniesGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+}
+
+@rulecatch {
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+}
+
+// Entry rule entryRulecompany
+entryRulecompany returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getCompanyRule()); }
+ iv_rulecompany=rulecompany
+ { $current=$iv_rulecompany.current; }
+ EOF;
+
+// Rule company
+rulecompany returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='company'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getCompanyAccess().getCompanyKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getCompanyAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getCompanyRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ }
+ )
+ )
+ otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getCompanyAccess().getLeftCurlyBracketKeyword_2());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getCompanyAccess().getDeparmentDepartmentParserRuleCall_3_0());
+ }
+ lv_deparment_3_0=ruledepartment
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getCompanyRule());
+ }
+ add(
+ $current,
+ "deparment",
+ lv_deparment_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )*
+ otherlv_4='}'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getCompanyAccess().getRightCurlyBracketKeyword_4());
+ }
+ )
+;
+
+// Entry rule entryRuledepartment
+entryRuledepartment returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getDepartmentRule()); }
+ iv_ruledepartment=ruledepartment
+ { $current=$iv_ruledepartment.current; }
+ EOF;
+
+// Rule department
+ruledepartment returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='department'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDepartmentAccess().getDepartmentKeyword_0());
+ }
+ (
+ (
+ lv_name_1_0=RULE_STRING
+ {
+ newLeafNode(lv_name_1_0, grammarAccess.getDepartmentAccess().getNameSTRINGTerminalRuleCall_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getDepartmentRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ }
+ )
+ )
+ otherlv_2='{'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getDepartmentAccess().getLeftCurlyBracketKeyword_2());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDepartment_managerDepartment_managerParserRuleCall_3_0());
+ }
+ lv_department_manager_3_0=ruledepartment_manager
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ set(
+ $current,
+ "department_manager",
+ lv_department_manager_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_manager");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDepartment_employeesDepartment_employeesParserRuleCall_4_0());
+ }
+ lv_department_employees_4_0=ruledepartment_employees
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ set(
+ $current,
+ "department_employees",
+ lv_department_employees_4_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_employees");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDeparmentDepartmentParserRuleCall_5_0());
+ }
+ lv_deparment_5_0=ruledepartment
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ add(
+ $current,
+ "deparment",
+ lv_deparment_5_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )*
+ otherlv_6='}'
+ {
+ newLeafNode(otherlv_6, grammarAccess.getDepartmentAccess().getRightCurlyBracketKeyword_6());
+ }
+ )
+;
+
+// Entry rule entryRuledepartment_manager
+entryRuledepartment_manager returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getDepartment_managerRule()); }
+ iv_ruledepartment_manager=ruledepartment_manager
+ { $current=$iv_ruledepartment_manager.current; }
+ EOF;
+
+// Rule department_manager
+ruledepartment_manager returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ otherlv_0='manager'
+ {
+ newLeafNode(otherlv_0, grammarAccess.getDepartment_managerAccess().getManagerKeyword_0());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDepartment_managerAccess().getEmployeeEmployeeParserRuleCall_1_0());
+ }
+ lv_employee_1_0=ruleemployee
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDepartment_managerRule());
+ }
+ set(
+ $current,
+ "employee",
+ lv_employee_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.employee");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )
+ )
+;
+
+// Entry rule entryRuledepartment_employees
+entryRuledepartment_employees returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getDepartment_employeesRule()); }
+ iv_ruledepartment_employees=ruledepartment_employees
+ { $current=$iv_ruledepartment_employees.current; }
+ EOF;
+
+// Rule department_employees
+ruledepartment_employees returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ (
+ {
+ $current = forceCreateModelElement(
+ grammarAccess.getDepartment_employeesAccess().getDepartment_employeesAction_0(),
+ $current);
+ }
+ )
+ (
+ otherlv_1='employee'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getDepartment_employeesAccess().getEmployeeKeyword_1_0());
+ }
+ (
+ (
+ {
+ newCompositeNode(grammarAccess.getDepartment_employeesAccess().getEmployeeEmployeeParserRuleCall_1_1_0());
+ }
+ lv_employee_2_0=ruleemployee
+ {
+ if ($current==null) {
+ $current = createModelElementForParent(grammarAccess.getDepartment_employeesRule());
+ }
+ add(
+ $current,
+ "employee",
+ lv_employee_2_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.employee");
+ afterParserOrEnumRuleCall();
+ }
+ )
+ )
+ )*
+ )
+;
+
+// Entry rule entryRuleemployee
+entryRuleemployee returns [EObject current=null]:
+ { newCompositeNode(grammarAccess.getEmployeeRule()); }
+ iv_ruleemployee=ruleemployee
+ { $current=$iv_ruleemployee.current; }
+ EOF;
+
+// Rule employee
+ruleemployee returns [EObject current=null]
+@init {
+ enterRule();
+}
+@after {
+ leaveRule();
+}:
+ (
+ (
+ (
+ lv_name_0_0=RULE_STRING
+ {
+ newLeafNode(lv_name_0_0, grammarAccess.getEmployeeAccess().getNameSTRINGTerminalRuleCall_0_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "name",
+ lv_name_0_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ }
+ )
+ )
+ otherlv_1='{'
+ {
+ newLeafNode(otherlv_1, grammarAccess.getEmployeeAccess().getLeftCurlyBracketKeyword_1());
+ }
+ otherlv_2='address'
+ {
+ newLeafNode(otherlv_2, grammarAccess.getEmployeeAccess().getAddressKeyword_2());
+ }
+ (
+ (
+ lv_address_3_0=RULE_STRING
+ {
+ newLeafNode(lv_address_3_0, grammarAccess.getEmployeeAccess().getAddressSTRINGTerminalRuleCall_3_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "address",
+ lv_address_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ }
+ )
+ )
+ otherlv_4='salary'
+ {
+ newLeafNode(otherlv_4, grammarAccess.getEmployeeAccess().getSalaryKeyword_4());
+ }
+ (
+ (
+ lv_salary_5_0=RULE_FLOAT
+ {
+ newLeafNode(lv_salary_5_0, grammarAccess.getEmployeeAccess().getSalaryFLOATTerminalRuleCall_5_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "salary",
+ lv_salary_5_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.FLOAT");
+ }
+ )
+ )
+ (
+ otherlv_6='mentor'
+ {
+ newLeafNode(otherlv_6, grammarAccess.getEmployeeAccess().getMentorKeyword_6_0());
+ }
+ (
+ (
+ lv_mentor_7_0=RULE_STRING
+ {
+ newLeafNode(lv_mentor_7_0, grammarAccess.getEmployeeAccess().getMentorSTRINGTerminalRuleCall_6_1_0());
+ }
+ {
+ if ($current==null) {
+ $current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ $current,
+ "mentor",
+ lv_mentor_7_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ }
+ )
+ )
+ )?
+ otherlv_8='}'
+ {
+ newLeafNode(otherlv_8, grammarAccess.getEmployeeAccess().getRightCurlyBracketKeyword_7());
+ }
+ )
+;
+
+RULE_STRING : '"' ~('"')* '"';
+
+RULE_FLOAT : ('0'..'9')+ ('.' ('0'..'9')+)?;
+
+RULE_WS : (' '|'\r'? '\n'|'\t')+;
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.tokens b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.tokens
new file mode 100644
index 0000000..898dce5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompanies.tokens
@@ -0,0 +1,21 @@
+'address'=13
+'company'=7
+'department'=10
+'employee'=12
+'manager'=11
+'mentor'=15
+'salary'=14
+'{'=8
+'}'=9
+RULE_FLOAT=5
+RULE_STRING=4
+RULE_WS=6
+T__10=10
+T__11=11
+T__12=12
+T__13=13
+T__14=14
+T__15=15
+T__7=7
+T__8=8
+T__9=9
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesLexer.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesLexer.java
new file mode 100644
index 0000000..4f5ecbb
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesLexer.java
@@ -0,0 +1,634 @@
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal;
+
+// Hack: Use our own Lexer superclass by means of import.
+// Currently there is no other way to specify the superclass for the lexer.
+import org.eclipse.xtext.parser.antlr.Lexer;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalCompaniesLexer extends Lexer {
+ public static final int T__9=9;
+ public static final int T__8=8;
+ public static final int T__7=7;
+ public static final int RULE_WS=6;
+ public static final int RULE_STRING=4;
+ public static final int T__15=15;
+ public static final int T__11=11;
+ public static final int T__12=12;
+ public static final int RULE_FLOAT=5;
+ public static final int T__13=13;
+ public static final int T__14=14;
+ public static final int EOF=-1;
+ public static final int T__10=10;
+
+ // delegates
+ // delegators
+
+ public InternalCompaniesLexer() {;}
+ public InternalCompaniesLexer(CharStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalCompaniesLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
+
+ }
+ public String getGrammarFileName() { return "InternalCompanies.g"; }
+
+ // $ANTLR start "T__7"
+ public final void mT__7() throws RecognitionException {
+ try {
+ int _type = T__7;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:11:6: ( 'company' )
+ // InternalCompanies.g:11:8: 'company'
+ {
+ match("company");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__7"
+
+ // $ANTLR start "T__8"
+ public final void mT__8() throws RecognitionException {
+ try {
+ int _type = T__8;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:12:6: ( '{' )
+ // InternalCompanies.g:12:8: '{'
+ {
+ match('{');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__8"
+
+ // $ANTLR start "T__9"
+ public final void mT__9() throws RecognitionException {
+ try {
+ int _type = T__9;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:13:6: ( '}' )
+ // InternalCompanies.g:13:8: '}'
+ {
+ match('}');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__9"
+
+ // $ANTLR start "T__10"
+ public final void mT__10() throws RecognitionException {
+ try {
+ int _type = T__10;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:14:7: ( 'department' )
+ // InternalCompanies.g:14:9: 'department'
+ {
+ match("department");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__10"
+
+ // $ANTLR start "T__11"
+ public final void mT__11() throws RecognitionException {
+ try {
+ int _type = T__11;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:15:7: ( 'manager' )
+ // InternalCompanies.g:15:9: 'manager'
+ {
+ match("manager");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__11"
+
+ // $ANTLR start "T__12"
+ public final void mT__12() throws RecognitionException {
+ try {
+ int _type = T__12;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:16:7: ( 'employee' )
+ // InternalCompanies.g:16:9: 'employee'
+ {
+ match("employee");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__12"
+
+ // $ANTLR start "T__13"
+ public final void mT__13() throws RecognitionException {
+ try {
+ int _type = T__13;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:17:7: ( 'address' )
+ // InternalCompanies.g:17:9: 'address'
+ {
+ match("address");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__13"
+
+ // $ANTLR start "T__14"
+ public final void mT__14() throws RecognitionException {
+ try {
+ int _type = T__14;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:18:7: ( 'salary' )
+ // InternalCompanies.g:18:9: 'salary'
+ {
+ match("salary");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__14"
+
+ // $ANTLR start "T__15"
+ public final void mT__15() throws RecognitionException {
+ try {
+ int _type = T__15;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:19:7: ( 'mentor' )
+ // InternalCompanies.g:19:9: 'mentor'
+ {
+ match("mentor");
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "T__15"
+
+ // $ANTLR start "RULE_STRING"
+ public final void mRULE_STRING() throws RecognitionException {
+ try {
+ int _type = RULE_STRING;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:443:13: ( '\"' (~ ( '\"' ) )* '\"' )
+ // InternalCompanies.g:443:15: '\"' (~ ( '\"' ) )* '\"'
+ {
+ match('\"');
+ // InternalCompanies.g:443:19: (~ ( '\"' ) )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( ((LA1_0>='\u0000' && LA1_0<='!')||(LA1_0>='#' && LA1_0<='\uFFFF')) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // InternalCompanies.g:443:19: ~ ( '\"' )
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFF') ) {
+ input.consume();
+
+ }
+ else {
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ match('\"');
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_STRING"
+
+ // $ANTLR start "RULE_FLOAT"
+ public final void mRULE_FLOAT() throws RecognitionException {
+ try {
+ int _type = RULE_FLOAT;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:445:12: ( ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ )? )
+ // InternalCompanies.g:445:14: ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ )?
+ {
+ // InternalCompanies.g:445:14: ( '0' .. '9' )+
+ int cnt2=0;
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( ((LA2_0>='0' && LA2_0<='9')) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // InternalCompanies.g:445:15: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt2 >= 1 ) break loop2;
+ EarlyExitException eee =
+ new EarlyExitException(2, input);
+ throw eee;
+ }
+ cnt2++;
+ } while (true);
+
+ // InternalCompanies.g:445:26: ( '.' ( '0' .. '9' )+ )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0=='.') ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // InternalCompanies.g:445:27: '.' ( '0' .. '9' )+
+ {
+ match('.');
+ // InternalCompanies.g:445:31: ( '0' .. '9' )+
+ int cnt3=0;
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( ((LA3_0>='0' && LA3_0<='9')) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // InternalCompanies.g:445:32: '0' .. '9'
+ {
+ matchRange('0','9');
+
+ }
+ break;
+
+ default :
+ if ( cnt3 >= 1 ) break loop3;
+ EarlyExitException eee =
+ new EarlyExitException(3, input);
+ throw eee;
+ }
+ cnt3++;
+ } while (true);
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_FLOAT"
+
+ // $ANTLR start "RULE_WS"
+ public final void mRULE_WS() throws RecognitionException {
+ try {
+ int _type = RULE_WS;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // InternalCompanies.g:447:9: ( ( ' ' | ( '\\r' )? '\\n' | '\\t' )+ )
+ // InternalCompanies.g:447:11: ( ' ' | ( '\\r' )? '\\n' | '\\t' )+
+ {
+ // InternalCompanies.g:447:11: ( ' ' | ( '\\r' )? '\\n' | '\\t' )+
+ int cnt6=0;
+ loop6:
+ do {
+ int alt6=4;
+ switch ( input.LA(1) ) {
+ case ' ':
+ {
+ alt6=1;
+ }
+ break;
+ case '\n':
+ case '\r':
+ {
+ alt6=2;
+ }
+ break;
+ case '\t':
+ {
+ alt6=3;
+ }
+ break;
+
+ }
+
+ switch (alt6) {
+ case 1 :
+ // InternalCompanies.g:447:12: ' '
+ {
+ match(' ');
+
+ }
+ break;
+ case 2 :
+ // InternalCompanies.g:447:16: ( '\\r' )? '\\n'
+ {
+ // InternalCompanies.g:447:16: ( '\\r' )?
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+
+ if ( (LA5_0=='\r') ) {
+ alt5=1;
+ }
+ switch (alt5) {
+ case 1 :
+ // InternalCompanies.g:447:16: '\\r'
+ {
+ match('\r');
+
+ }
+ break;
+
+ }
+
+ match('\n');
+
+ }
+ break;
+ case 3 :
+ // InternalCompanies.g:447:27: '\\t'
+ {
+ match('\t');
+
+ }
+ break;
+
+ default :
+ if ( cnt6 >= 1 ) break loop6;
+ EarlyExitException eee =
+ new EarlyExitException(6, input);
+ throw eee;
+ }
+ cnt6++;
+ } while (true);
+
+
+ }
+
+ state.type = _type;
+ state.channel = _channel;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end "RULE_WS"
+
+ public void mTokens() throws RecognitionException {
+ // InternalCompanies.g:1:8: ( T__7 | T__8 | T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | RULE_STRING | RULE_FLOAT | RULE_WS )
+ int alt7=12;
+ alt7 = dfa7.predict(input);
+ switch (alt7) {
+ case 1 :
+ // InternalCompanies.g:1:10: T__7
+ {
+ mT__7();
+
+ }
+ break;
+ case 2 :
+ // InternalCompanies.g:1:15: T__8
+ {
+ mT__8();
+
+ }
+ break;
+ case 3 :
+ // InternalCompanies.g:1:20: T__9
+ {
+ mT__9();
+
+ }
+ break;
+ case 4 :
+ // InternalCompanies.g:1:25: T__10
+ {
+ mT__10();
+
+ }
+ break;
+ case 5 :
+ // InternalCompanies.g:1:31: T__11
+ {
+ mT__11();
+
+ }
+ break;
+ case 6 :
+ // InternalCompanies.g:1:37: T__12
+ {
+ mT__12();
+
+ }
+ break;
+ case 7 :
+ // InternalCompanies.g:1:43: T__13
+ {
+ mT__13();
+
+ }
+ break;
+ case 8 :
+ // InternalCompanies.g:1:49: T__14
+ {
+ mT__14();
+
+ }
+ break;
+ case 9 :
+ // InternalCompanies.g:1:55: T__15
+ {
+ mT__15();
+
+ }
+ break;
+ case 10 :
+ // InternalCompanies.g:1:61: RULE_STRING
+ {
+ mRULE_STRING();
+
+ }
+ break;
+ case 11 :
+ // InternalCompanies.g:1:73: RULE_FLOAT
+ {
+ mRULE_FLOAT();
+
+ }
+ break;
+ case 12 :
+ // InternalCompanies.g:1:84: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA7 dfa7 = new DFA7(this);
+ static final String DFA7_eotS =
+ "\16\uffff";
+ static final String DFA7_eofS =
+ "\16\uffff";
+ static final String DFA7_minS =
+ "\1\11\4\uffff\1\141\10\uffff";
+ static final String DFA7_maxS =
+ "\1\175\4\uffff\1\145\10\uffff";
+ static final String DFA7_acceptS =
+ "\1\uffff\1\1\1\2\1\3\1\4\1\uffff\1\6\1\7\1\10\1\12\1\13\1\14\1\5\1\11";
+ static final String DFA7_specialS =
+ "\16\uffff}>";
+ static final String[] DFA7_transitionS = {
+ "\2\13\2\uffff\1\13\22\uffff\1\13\1\uffff\1\11\15\uffff\12\12\47\uffff\1\7\1\uffff\1\1\1\4\1\6\7\uffff\1\5\5\uffff\1\10\7\uffff\1\2\1\uffff\1\3",
+ "",
+ "",
+ "",
+ "",
+ "\1\14\3\uffff\1\15",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ };
+
+ static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS);
+ static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS);
+ static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS);
+ static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS);
+ static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS);
+ static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS);
+ static final short[][] DFA7_transition;
+
+ static {
+ int numStates = DFA7_transitionS.length;
+ DFA7_transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ DFA7_transition[i] = DFA.unpackEncodedString(DFA7_transitionS[i]);
+ }
+ }
+
+ class DFA7 extends DFA {
+
+ public DFA7(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 7;
+ this.eot = DFA7_eot;
+ this.eof = DFA7_eof;
+ this.min = DFA7_min;
+ this.max = DFA7_max;
+ this.accept = DFA7_accept;
+ this.special = DFA7_special;
+ this.transition = DFA7_transition;
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T__7 | T__8 | T__9 | T__10 | T__11 | T__12 | T__13 | T__14 | T__15 | RULE_STRING | RULE_FLOAT | RULE_WS );";
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesParser.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesParser.java
new file mode 100644
index 0000000..8ed2f2b
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/parser/antlr/internal/InternalCompaniesParser.java
@@ -0,0 +1,980 @@
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.parser.antlr.internal;
+
+import org.eclipse.xtext.*;
+import org.eclipse.xtext.parser.*;
+import org.eclipse.xtext.parser.impl.*;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream;
+import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
+import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+@SuppressWarnings("all")
+public class InternalCompaniesParser extends AbstractInternalAntlrParser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_FLOAT", "RULE_WS", "'company'", "'{'", "'}'", "'department'", "'manager'", "'employee'", "'address'", "'salary'", "'mentor'"
+ };
+ public static final int T__9=9;
+ public static final int T__8=8;
+ public static final int T__7=7;
+ public static final int RULE_WS=6;
+ public static final int RULE_STRING=4;
+ public static final int T__15=15;
+ public static final int T__11=11;
+ public static final int T__12=12;
+ public static final int RULE_FLOAT=5;
+ public static final int T__13=13;
+ public static final int T__14=14;
+ public static final int EOF=-1;
+ public static final int T__10=10;
+
+ // delegates
+ // delegators
+
+
+ public InternalCompaniesParser(TokenStream input) {
+ this(input, new RecognizerSharedState());
+ }
+ public InternalCompaniesParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
+
+
+ public String[] getTokenNames() { return InternalCompaniesParser.tokenNames; }
+ public String getGrammarFileName() { return "InternalCompanies.g"; }
+
+
+
+ private CompaniesGrammarAccess grammarAccess;
+
+ public InternalCompaniesParser(TokenStream input, CompaniesGrammarAccess grammarAccess) {
+ this(input);
+ this.grammarAccess = grammarAccess;
+ registerRules(grammarAccess.getGrammar());
+ }
+
+ @Override
+ protected String getFirstRuleName() {
+ return "company";
+ }
+
+ @Override
+ protected CompaniesGrammarAccess getGrammarAccess() {
+ return grammarAccess;
+ }
+
+
+
+
+ // $ANTLR start "entryRulecompany"
+ // InternalCompanies.g:64:1: entryRulecompany returns [EObject current=null] : iv_rulecompany= rulecompany EOF ;
+ public final EObject entryRulecompany() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_rulecompany = null;
+
+
+ try {
+ // InternalCompanies.g:64:48: (iv_rulecompany= rulecompany EOF )
+ // InternalCompanies.g:65:2: iv_rulecompany= rulecompany EOF
+ {
+ newCompositeNode(grammarAccess.getCompanyRule());
+ pushFollow(FOLLOW_1);
+ iv_rulecompany=rulecompany();
+
+ state._fsp--;
+
+ current =iv_rulecompany;
+ match(input,EOF,FOLLOW_2);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRulecompany"
+
+
+ // $ANTLR start "rulecompany"
+ // InternalCompanies.g:71:1: rulecompany returns [EObject current=null] : (otherlv_0= 'company' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_deparment_3_0= ruledepartment ) )* otherlv_4= '}' ) ;
+ public final EObject rulecompany() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ Token otherlv_2=null;
+ Token otherlv_4=null;
+ EObject lv_deparment_3_0 = null;
+
+
+
+ enterRule();
+
+ try {
+ // InternalCompanies.g:77:2: ( (otherlv_0= 'company' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_deparment_3_0= ruledepartment ) )* otherlv_4= '}' ) )
+ // InternalCompanies.g:78:2: (otherlv_0= 'company' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_deparment_3_0= ruledepartment ) )* otherlv_4= '}' )
+ {
+ // InternalCompanies.g:78:2: (otherlv_0= 'company' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_deparment_3_0= ruledepartment ) )* otherlv_4= '}' )
+ // InternalCompanies.g:79:3: otherlv_0= 'company' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_deparment_3_0= ruledepartment ) )* otherlv_4= '}'
+ {
+ otherlv_0=(Token)match(input,7,FOLLOW_3);
+
+ newLeafNode(otherlv_0, grammarAccess.getCompanyAccess().getCompanyKeyword_0());
+
+ // InternalCompanies.g:83:3: ( (lv_name_1_0= RULE_STRING ) )
+ // InternalCompanies.g:84:4: (lv_name_1_0= RULE_STRING )
+ {
+ // InternalCompanies.g:84:4: (lv_name_1_0= RULE_STRING )
+ // InternalCompanies.g:85:5: lv_name_1_0= RULE_STRING
+ {
+ lv_name_1_0=(Token)match(input,RULE_STRING,FOLLOW_4);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getCompanyAccess().getNameSTRINGTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getCompanyRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+
+
+ }
+
+
+ }
+
+ otherlv_2=(Token)match(input,8,FOLLOW_5);
+
+ newLeafNode(otherlv_2, grammarAccess.getCompanyAccess().getLeftCurlyBracketKeyword_2());
+
+ // InternalCompanies.g:105:3: ( (lv_deparment_3_0= ruledepartment ) )*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+
+ if ( (LA1_0==10) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // InternalCompanies.g:106:4: (lv_deparment_3_0= ruledepartment )
+ {
+ // InternalCompanies.g:106:4: (lv_deparment_3_0= ruledepartment )
+ // InternalCompanies.g:107:5: lv_deparment_3_0= ruledepartment
+ {
+
+ newCompositeNode(grammarAccess.getCompanyAccess().getDeparmentDepartmentParserRuleCall_3_0());
+
+ pushFollow(FOLLOW_5);
+ lv_deparment_3_0=ruledepartment();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getCompanyRule());
+ }
+ add(
+ current,
+ "deparment",
+ lv_deparment_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+ otherlv_4=(Token)match(input,9,FOLLOW_2);
+
+ newLeafNode(otherlv_4, grammarAccess.getCompanyAccess().getRightCurlyBracketKeyword_4());
+
+
+ }
+
+
+ }
+
+
+ leaveRule();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "rulecompany"
+
+
+ // $ANTLR start "entryRuledepartment"
+ // InternalCompanies.g:132:1: entryRuledepartment returns [EObject current=null] : iv_ruledepartment= ruledepartment EOF ;
+ public final EObject entryRuledepartment() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruledepartment = null;
+
+
+ try {
+ // InternalCompanies.g:132:51: (iv_ruledepartment= ruledepartment EOF )
+ // InternalCompanies.g:133:2: iv_ruledepartment= ruledepartment EOF
+ {
+ newCompositeNode(grammarAccess.getDepartmentRule());
+ pushFollow(FOLLOW_1);
+ iv_ruledepartment=ruledepartment();
+
+ state._fsp--;
+
+ current =iv_ruledepartment;
+ match(input,EOF,FOLLOW_2);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuledepartment"
+
+
+ // $ANTLR start "ruledepartment"
+ // InternalCompanies.g:139:1: ruledepartment returns [EObject current=null] : (otherlv_0= 'department' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_department_manager_3_0= ruledepartment_manager ) ) ( (lv_department_employees_4_0= ruledepartment_employees ) ) ( (lv_deparment_5_0= ruledepartment ) )* otherlv_6= '}' ) ;
+ public final EObject ruledepartment() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ Token lv_name_1_0=null;
+ Token otherlv_2=null;
+ Token otherlv_6=null;
+ EObject lv_department_manager_3_0 = null;
+
+ EObject lv_department_employees_4_0 = null;
+
+ EObject lv_deparment_5_0 = null;
+
+
+
+ enterRule();
+
+ try {
+ // InternalCompanies.g:145:2: ( (otherlv_0= 'department' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_department_manager_3_0= ruledepartment_manager ) ) ( (lv_department_employees_4_0= ruledepartment_employees ) ) ( (lv_deparment_5_0= ruledepartment ) )* otherlv_6= '}' ) )
+ // InternalCompanies.g:146:2: (otherlv_0= 'department' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_department_manager_3_0= ruledepartment_manager ) ) ( (lv_department_employees_4_0= ruledepartment_employees ) ) ( (lv_deparment_5_0= ruledepartment ) )* otherlv_6= '}' )
+ {
+ // InternalCompanies.g:146:2: (otherlv_0= 'department' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_department_manager_3_0= ruledepartment_manager ) ) ( (lv_department_employees_4_0= ruledepartment_employees ) ) ( (lv_deparment_5_0= ruledepartment ) )* otherlv_6= '}' )
+ // InternalCompanies.g:147:3: otherlv_0= 'department' ( (lv_name_1_0= RULE_STRING ) ) otherlv_2= '{' ( (lv_department_manager_3_0= ruledepartment_manager ) ) ( (lv_department_employees_4_0= ruledepartment_employees ) ) ( (lv_deparment_5_0= ruledepartment ) )* otherlv_6= '}'
+ {
+ otherlv_0=(Token)match(input,10,FOLLOW_3);
+
+ newLeafNode(otherlv_0, grammarAccess.getDepartmentAccess().getDepartmentKeyword_0());
+
+ // InternalCompanies.g:151:3: ( (lv_name_1_0= RULE_STRING ) )
+ // InternalCompanies.g:152:4: (lv_name_1_0= RULE_STRING )
+ {
+ // InternalCompanies.g:152:4: (lv_name_1_0= RULE_STRING )
+ // InternalCompanies.g:153:5: lv_name_1_0= RULE_STRING
+ {
+ lv_name_1_0=(Token)match(input,RULE_STRING,FOLLOW_4);
+
+ newLeafNode(lv_name_1_0, grammarAccess.getDepartmentAccess().getNameSTRINGTerminalRuleCall_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getDepartmentRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+
+
+ }
+
+
+ }
+
+ otherlv_2=(Token)match(input,8,FOLLOW_6);
+
+ newLeafNode(otherlv_2, grammarAccess.getDepartmentAccess().getLeftCurlyBracketKeyword_2());
+
+ // InternalCompanies.g:173:3: ( (lv_department_manager_3_0= ruledepartment_manager ) )
+ // InternalCompanies.g:174:4: (lv_department_manager_3_0= ruledepartment_manager )
+ {
+ // InternalCompanies.g:174:4: (lv_department_manager_3_0= ruledepartment_manager )
+ // InternalCompanies.g:175:5: lv_department_manager_3_0= ruledepartment_manager
+ {
+
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDepartment_managerDepartment_managerParserRuleCall_3_0());
+
+ pushFollow(FOLLOW_7);
+ lv_department_manager_3_0=ruledepartment_manager();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ set(
+ current,
+ "department_manager",
+ lv_department_manager_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_manager");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ // InternalCompanies.g:192:3: ( (lv_department_employees_4_0= ruledepartment_employees ) )
+ // InternalCompanies.g:193:4: (lv_department_employees_4_0= ruledepartment_employees )
+ {
+ // InternalCompanies.g:193:4: (lv_department_employees_4_0= ruledepartment_employees )
+ // InternalCompanies.g:194:5: lv_department_employees_4_0= ruledepartment_employees
+ {
+
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDepartment_employeesDepartment_employeesParserRuleCall_4_0());
+
+ pushFollow(FOLLOW_5);
+ lv_department_employees_4_0=ruledepartment_employees();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ set(
+ current,
+ "department_employees",
+ lv_department_employees_4_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_employees");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+ // InternalCompanies.g:211:3: ( (lv_deparment_5_0= ruledepartment ) )*
+ loop2:
+ do {
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+
+ if ( (LA2_0==10) ) {
+ alt2=1;
+ }
+
+
+ switch (alt2) {
+ case 1 :
+ // InternalCompanies.g:212:4: (lv_deparment_5_0= ruledepartment )
+ {
+ // InternalCompanies.g:212:4: (lv_deparment_5_0= ruledepartment )
+ // InternalCompanies.g:213:5: lv_deparment_5_0= ruledepartment
+ {
+
+ newCompositeNode(grammarAccess.getDepartmentAccess().getDeparmentDepartmentParserRuleCall_5_0());
+
+ pushFollow(FOLLOW_5);
+ lv_deparment_5_0=ruledepartment();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDepartmentRule());
+ }
+ add(
+ current,
+ "deparment",
+ lv_deparment_5_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop2;
+ }
+ } while (true);
+
+ otherlv_6=(Token)match(input,9,FOLLOW_2);
+
+ newLeafNode(otherlv_6, grammarAccess.getDepartmentAccess().getRightCurlyBracketKeyword_6());
+
+
+ }
+
+
+ }
+
+
+ leaveRule();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruledepartment"
+
+
+ // $ANTLR start "entryRuledepartment_manager"
+ // InternalCompanies.g:238:1: entryRuledepartment_manager returns [EObject current=null] : iv_ruledepartment_manager= ruledepartment_manager EOF ;
+ public final EObject entryRuledepartment_manager() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruledepartment_manager = null;
+
+
+ try {
+ // InternalCompanies.g:238:59: (iv_ruledepartment_manager= ruledepartment_manager EOF )
+ // InternalCompanies.g:239:2: iv_ruledepartment_manager= ruledepartment_manager EOF
+ {
+ newCompositeNode(grammarAccess.getDepartment_managerRule());
+ pushFollow(FOLLOW_1);
+ iv_ruledepartment_manager=ruledepartment_manager();
+
+ state._fsp--;
+
+ current =iv_ruledepartment_manager;
+ match(input,EOF,FOLLOW_2);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuledepartment_manager"
+
+
+ // $ANTLR start "ruledepartment_manager"
+ // InternalCompanies.g:245:1: ruledepartment_manager returns [EObject current=null] : (otherlv_0= 'manager' ( (lv_employee_1_0= ruleemployee ) ) ) ;
+ public final EObject ruledepartment_manager() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_0=null;
+ EObject lv_employee_1_0 = null;
+
+
+
+ enterRule();
+
+ try {
+ // InternalCompanies.g:251:2: ( (otherlv_0= 'manager' ( (lv_employee_1_0= ruleemployee ) ) ) )
+ // InternalCompanies.g:252:2: (otherlv_0= 'manager' ( (lv_employee_1_0= ruleemployee ) ) )
+ {
+ // InternalCompanies.g:252:2: (otherlv_0= 'manager' ( (lv_employee_1_0= ruleemployee ) ) )
+ // InternalCompanies.g:253:3: otherlv_0= 'manager' ( (lv_employee_1_0= ruleemployee ) )
+ {
+ otherlv_0=(Token)match(input,11,FOLLOW_3);
+
+ newLeafNode(otherlv_0, grammarAccess.getDepartment_managerAccess().getManagerKeyword_0());
+
+ // InternalCompanies.g:257:3: ( (lv_employee_1_0= ruleemployee ) )
+ // InternalCompanies.g:258:4: (lv_employee_1_0= ruleemployee )
+ {
+ // InternalCompanies.g:258:4: (lv_employee_1_0= ruleemployee )
+ // InternalCompanies.g:259:5: lv_employee_1_0= ruleemployee
+ {
+
+ newCompositeNode(grammarAccess.getDepartment_managerAccess().getEmployeeEmployeeParserRuleCall_1_0());
+
+ pushFollow(FOLLOW_2);
+ lv_employee_1_0=ruleemployee();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDepartment_managerRule());
+ }
+ set(
+ current,
+ "employee",
+ lv_employee_1_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.employee");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ }
+
+
+ leaveRule();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruledepartment_manager"
+
+
+ // $ANTLR start "entryRuledepartment_employees"
+ // InternalCompanies.g:280:1: entryRuledepartment_employees returns [EObject current=null] : iv_ruledepartment_employees= ruledepartment_employees EOF ;
+ public final EObject entryRuledepartment_employees() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruledepartment_employees = null;
+
+
+ try {
+ // InternalCompanies.g:280:61: (iv_ruledepartment_employees= ruledepartment_employees EOF )
+ // InternalCompanies.g:281:2: iv_ruledepartment_employees= ruledepartment_employees EOF
+ {
+ newCompositeNode(grammarAccess.getDepartment_employeesRule());
+ pushFollow(FOLLOW_1);
+ iv_ruledepartment_employees=ruledepartment_employees();
+
+ state._fsp--;
+
+ current =iv_ruledepartment_employees;
+ match(input,EOF,FOLLOW_2);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuledepartment_employees"
+
+
+ // $ANTLR start "ruledepartment_employees"
+ // InternalCompanies.g:287:1: ruledepartment_employees returns [EObject current=null] : ( () (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )* ) ;
+ public final EObject ruledepartment_employees() throws RecognitionException {
+ EObject current = null;
+
+ Token otherlv_1=null;
+ EObject lv_employee_2_0 = null;
+
+
+
+ enterRule();
+
+ try {
+ // InternalCompanies.g:293:2: ( ( () (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )* ) )
+ // InternalCompanies.g:294:2: ( () (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )* )
+ {
+ // InternalCompanies.g:294:2: ( () (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )* )
+ // InternalCompanies.g:295:3: () (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )*
+ {
+ // InternalCompanies.g:295:3: ()
+ // InternalCompanies.g:296:4:
+ {
+
+ current = forceCreateModelElement(
+ grammarAccess.getDepartment_employeesAccess().getDepartment_employeesAction_0(),
+ current);
+
+
+ }
+
+ // InternalCompanies.g:302:3: (otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) ) )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+
+ if ( (LA3_0==12) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // InternalCompanies.g:303:4: otherlv_1= 'employee' ( (lv_employee_2_0= ruleemployee ) )
+ {
+ otherlv_1=(Token)match(input,12,FOLLOW_3);
+
+ newLeafNode(otherlv_1, grammarAccess.getDepartment_employeesAccess().getEmployeeKeyword_1_0());
+
+ // InternalCompanies.g:307:4: ( (lv_employee_2_0= ruleemployee ) )
+ // InternalCompanies.g:308:5: (lv_employee_2_0= ruleemployee )
+ {
+ // InternalCompanies.g:308:5: (lv_employee_2_0= ruleemployee )
+ // InternalCompanies.g:309:6: lv_employee_2_0= ruleemployee
+ {
+
+ newCompositeNode(grammarAccess.getDepartment_employeesAccess().getEmployeeEmployeeParserRuleCall_1_1_0());
+
+ pushFollow(FOLLOW_8);
+ lv_employee_2_0=ruleemployee();
+
+ state._fsp--;
+
+
+ if (current==null) {
+ current = createModelElementForParent(grammarAccess.getDepartment_employeesRule());
+ }
+ add(
+ current,
+ "employee",
+ lv_employee_2_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.employee");
+ afterParserOrEnumRuleCall();
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+
+ }
+
+
+ }
+
+
+ leaveRule();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruledepartment_employees"
+
+
+ // $ANTLR start "entryRuleemployee"
+ // InternalCompanies.g:331:1: entryRuleemployee returns [EObject current=null] : iv_ruleemployee= ruleemployee EOF ;
+ public final EObject entryRuleemployee() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleemployee = null;
+
+
+ try {
+ // InternalCompanies.g:331:49: (iv_ruleemployee= ruleemployee EOF )
+ // InternalCompanies.g:332:2: iv_ruleemployee= ruleemployee EOF
+ {
+ newCompositeNode(grammarAccess.getEmployeeRule());
+ pushFollow(FOLLOW_1);
+ iv_ruleemployee=ruleemployee();
+
+ state._fsp--;
+
+ current =iv_ruleemployee;
+ match(input,EOF,FOLLOW_2);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "entryRuleemployee"
+
+
+ // $ANTLR start "ruleemployee"
+ // InternalCompanies.g:338:1: ruleemployee returns [EObject current=null] : ( ( (lv_name_0_0= RULE_STRING ) ) otherlv_1= '{' otherlv_2= 'address' ( (lv_address_3_0= RULE_STRING ) ) otherlv_4= 'salary' ( (lv_salary_5_0= RULE_FLOAT ) ) (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )? otherlv_8= '}' ) ;
+ public final EObject ruleemployee() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name_0_0=null;
+ Token otherlv_1=null;
+ Token otherlv_2=null;
+ Token lv_address_3_0=null;
+ Token otherlv_4=null;
+ Token lv_salary_5_0=null;
+ Token otherlv_6=null;
+ Token lv_mentor_7_0=null;
+ Token otherlv_8=null;
+
+
+ enterRule();
+
+ try {
+ // InternalCompanies.g:344:2: ( ( ( (lv_name_0_0= RULE_STRING ) ) otherlv_1= '{' otherlv_2= 'address' ( (lv_address_3_0= RULE_STRING ) ) otherlv_4= 'salary' ( (lv_salary_5_0= RULE_FLOAT ) ) (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )? otherlv_8= '}' ) )
+ // InternalCompanies.g:345:2: ( ( (lv_name_0_0= RULE_STRING ) ) otherlv_1= '{' otherlv_2= 'address' ( (lv_address_3_0= RULE_STRING ) ) otherlv_4= 'salary' ( (lv_salary_5_0= RULE_FLOAT ) ) (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )? otherlv_8= '}' )
+ {
+ // InternalCompanies.g:345:2: ( ( (lv_name_0_0= RULE_STRING ) ) otherlv_1= '{' otherlv_2= 'address' ( (lv_address_3_0= RULE_STRING ) ) otherlv_4= 'salary' ( (lv_salary_5_0= RULE_FLOAT ) ) (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )? otherlv_8= '}' )
+ // InternalCompanies.g:346:3: ( (lv_name_0_0= RULE_STRING ) ) otherlv_1= '{' otherlv_2= 'address' ( (lv_address_3_0= RULE_STRING ) ) otherlv_4= 'salary' ( (lv_salary_5_0= RULE_FLOAT ) ) (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )? otherlv_8= '}'
+ {
+ // InternalCompanies.g:346:3: ( (lv_name_0_0= RULE_STRING ) )
+ // InternalCompanies.g:347:4: (lv_name_0_0= RULE_STRING )
+ {
+ // InternalCompanies.g:347:4: (lv_name_0_0= RULE_STRING )
+ // InternalCompanies.g:348:5: lv_name_0_0= RULE_STRING
+ {
+ lv_name_0_0=(Token)match(input,RULE_STRING,FOLLOW_4);
+
+ newLeafNode(lv_name_0_0, grammarAccess.getEmployeeAccess().getNameSTRINGTerminalRuleCall_0_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ current,
+ "name",
+ lv_name_0_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+
+
+ }
+
+
+ }
+
+ otherlv_1=(Token)match(input,8,FOLLOW_9);
+
+ newLeafNode(otherlv_1, grammarAccess.getEmployeeAccess().getLeftCurlyBracketKeyword_1());
+
+ otherlv_2=(Token)match(input,13,FOLLOW_3);
+
+ newLeafNode(otherlv_2, grammarAccess.getEmployeeAccess().getAddressKeyword_2());
+
+ // InternalCompanies.g:372:3: ( (lv_address_3_0= RULE_STRING ) )
+ // InternalCompanies.g:373:4: (lv_address_3_0= RULE_STRING )
+ {
+ // InternalCompanies.g:373:4: (lv_address_3_0= RULE_STRING )
+ // InternalCompanies.g:374:5: lv_address_3_0= RULE_STRING
+ {
+ lv_address_3_0=(Token)match(input,RULE_STRING,FOLLOW_10);
+
+ newLeafNode(lv_address_3_0, grammarAccess.getEmployeeAccess().getAddressSTRINGTerminalRuleCall_3_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ current,
+ "address",
+ lv_address_3_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+
+
+ }
+
+
+ }
+
+ otherlv_4=(Token)match(input,14,FOLLOW_11);
+
+ newLeafNode(otherlv_4, grammarAccess.getEmployeeAccess().getSalaryKeyword_4());
+
+ // InternalCompanies.g:394:3: ( (lv_salary_5_0= RULE_FLOAT ) )
+ // InternalCompanies.g:395:4: (lv_salary_5_0= RULE_FLOAT )
+ {
+ // InternalCompanies.g:395:4: (lv_salary_5_0= RULE_FLOAT )
+ // InternalCompanies.g:396:5: lv_salary_5_0= RULE_FLOAT
+ {
+ lv_salary_5_0=(Token)match(input,RULE_FLOAT,FOLLOW_12);
+
+ newLeafNode(lv_salary_5_0, grammarAccess.getEmployeeAccess().getSalaryFLOATTerminalRuleCall_5_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ current,
+ "salary",
+ lv_salary_5_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.FLOAT");
+
+
+ }
+
+
+ }
+
+ // InternalCompanies.g:412:3: (otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) ) )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+
+ if ( (LA4_0==15) ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // InternalCompanies.g:413:4: otherlv_6= 'mentor' ( (lv_mentor_7_0= RULE_STRING ) )
+ {
+ otherlv_6=(Token)match(input,15,FOLLOW_3);
+
+ newLeafNode(otherlv_6, grammarAccess.getEmployeeAccess().getMentorKeyword_6_0());
+
+ // InternalCompanies.g:417:4: ( (lv_mentor_7_0= RULE_STRING ) )
+ // InternalCompanies.g:418:5: (lv_mentor_7_0= RULE_STRING )
+ {
+ // InternalCompanies.g:418:5: (lv_mentor_7_0= RULE_STRING )
+ // InternalCompanies.g:419:6: lv_mentor_7_0= RULE_STRING
+ {
+ lv_mentor_7_0=(Token)match(input,RULE_STRING,FOLLOW_13);
+
+ newLeafNode(lv_mentor_7_0, grammarAccess.getEmployeeAccess().getMentorSTRINGTerminalRuleCall_6_1_0());
+
+
+ if (current==null) {
+ current = createModelElement(grammarAccess.getEmployeeRule());
+ }
+ setWithLastConsumed(
+ current,
+ "mentor",
+ lv_mentor_7_0,
+ "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ }
+
+ otherlv_8=(Token)match(input,9,FOLLOW_2);
+
+ newLeafNode(otherlv_8, grammarAccess.getEmployeeAccess().getRightCurlyBracketKeyword_7());
+
+
+ }
+
+
+ }
+
+
+ leaveRule();
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end "ruleemployee"
+
+ // Delegated rules
+
+
+
+
+ public static final BitSet FOLLOW_1 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_2 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000000600L});
+ public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000001600L});
+ public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000001002L});
+ public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000002000L});
+ public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_12 = new BitSet(new long[]{0x0000000000008200L});
+ public static final BitSet FOLLOW_13 = new BitSet(new long[]{0x0000000000000200L});
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/AbstractCompaniesScopeProvider.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/AbstractCompaniesScopeProvider.java
new file mode 100644
index 0000000..ab1cb81
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/AbstractCompaniesScopeProvider.java
@@ -0,0 +1,9 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.scoping;
+
+import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider;
+
+public abstract class AbstractCompaniesScopeProvider extends DelegatingScopeProvider {
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSemanticSequencer.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSemanticSequencer.java
new file mode 100644
index 0000000..56184a5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSemanticSequencer.java
@@ -0,0 +1,125 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.serializer;
+
+import com.google.inject.Inject;
+import cs2as.companies.CompaniesPackage;
+import cs2as.companies.company;
+import cs2as.companies.department;
+import cs2as.companies.department_employees;
+import cs2as.companies.department_manager;
+import cs2as.companies.employee;
+import java.util.Set;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+import org.eclipse.xtext.Action;
+import org.eclipse.xtext.Parameter;
+import org.eclipse.xtext.ParserRule;
+import org.eclipse.xtext.serializer.ISerializationContext;
+import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
+import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
+import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
+
+@SuppressWarnings("all")
+public class CompaniesSemanticSequencer extends AbstractDelegatingSemanticSequencer {
+
+ @Inject
+ private CompaniesGrammarAccess grammarAccess;
+
+ @Override
+ public void sequence(ISerializationContext context, EObject semanticObject) {
+ EPackage epackage = semanticObject.eClass().getEPackage();
+ ParserRule rule = context.getParserRule();
+ Action action = context.getAssignedAction();
+ Set<Parameter> parameters = context.getEnabledBooleanParameters();
+ if (epackage == CompaniesPackage.eINSTANCE)
+ switch (semanticObject.eClass().getClassifierID()) {
+ case CompaniesPackage.COMPANY:
+ sequence_company(context, (company) semanticObject);
+ return;
+ case CompaniesPackage.DEPARTMENT:
+ sequence_department(context, (department) semanticObject);
+ return;
+ case CompaniesPackage.DEPARTMENT_EMPLOYEES:
+ sequence_department_employees(context, (department_employees) semanticObject);
+ return;
+ case CompaniesPackage.DEPARTMENT_MANAGER:
+ sequence_department_manager(context, (department_manager) semanticObject);
+ return;
+ case CompaniesPackage.EMPLOYEE:
+ sequence_employee(context, (employee) semanticObject);
+ return;
+ }
+ if (errorAcceptor != null)
+ errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
+ }
+
+ /**
+ * Contexts:
+ * company returns company
+ *
+ * Constraint:
+ * (name=STRING deparment+=department*)
+ */
+ protected void sequence_company(ISerializationContext context, company semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Contexts:
+ * department returns department
+ *
+ * Constraint:
+ * (name=STRING department_manager=department_manager department_employees=department_employees deparment+=department*)
+ */
+ protected void sequence_department(ISerializationContext context, department semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Contexts:
+ * department_employees returns department_employees
+ *
+ * Constraint:
+ * employee+=employee*
+ */
+ protected void sequence_department_employees(ISerializationContext context, department_employees semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+ /**
+ * Contexts:
+ * department_manager returns department_manager
+ *
+ * Constraint:
+ * employee=employee
+ */
+ protected void sequence_department_manager(ISerializationContext context, department_manager semanticObject) {
+ if (errorAcceptor != null) {
+ if (transientValues.isValueTransient(semanticObject, CompaniesPackage.Literals.DEPARTMENT_MANAGER__EMPLOYEE) == ValueTransient.YES)
+ errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, CompaniesPackage.Literals.DEPARTMENT_MANAGER__EMPLOYEE));
+ }
+ SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
+ feeder.accept(grammarAccess.getDepartment_managerAccess().getEmployeeEmployeeParserRuleCall_1_0(), semanticObject.getEmployee());
+ feeder.finish();
+ }
+
+
+ /**
+ * Contexts:
+ * employee returns employee
+ *
+ * Constraint:
+ * (name=STRING address=STRING salary=FLOAT mentor=STRING?)
+ */
+ protected void sequence_employee(ISerializationContext context, employee semanticObject) {
+ genericSequencer.createSequence(context, semanticObject);
+ }
+
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSyntacticSequencer.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSyntacticSequencer.java
new file mode 100644
index 0000000..ea4a4bd
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/serializer/CompaniesSyntacticSequencer.java
@@ -0,0 +1,43 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.serializer;
+
+import com.google.inject.Inject;
+import java.util.List;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services.CompaniesGrammarAccess;
+import org.eclipse.xtext.IGrammarAccess;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.nodemodel.INode;
+import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
+import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
+import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
+
+@SuppressWarnings("all")
+public class CompaniesSyntacticSequencer extends AbstractSyntacticSequencer {
+
+ protected CompaniesGrammarAccess grammarAccess;
+
+ @Inject
+ protected void init(IGrammarAccess access) {
+ grammarAccess = (CompaniesGrammarAccess) access;
+ }
+
+ @Override
+ protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
+ return "";
+ }
+
+
+ @Override
+ protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
+ if (transition.getAmbiguousSyntaxes().isEmpty()) return;
+ List<INode> transitionNodes = collectNodes(fromNode, toNode);
+ for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
+ List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
+ acceptNodes(getLastNavigableState(), syntaxNodes);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/services/CompaniesGrammarAccess.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/services/CompaniesGrammarAccess.java
new file mode 100644
index 0000000..b1d67cf
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/services/CompaniesGrammarAccess.java
@@ -0,0 +1,370 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.services;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import java.util.List;
+import org.eclipse.xtext.Action;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Grammar;
+import org.eclipse.xtext.GrammarUtil;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.ParserRule;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.TerminalRule;
+import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
+import org.eclipse.xtext.service.GrammarProvider;
+
+@Singleton
+public class CompaniesGrammarAccess extends AbstractGrammarElementFinder {
+
+ public class CompanyElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.company");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cCompanyKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameSTRINGTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cDeparmentAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cDeparmentDepartmentParserRuleCall_3_0 = (RuleCall)cDeparmentAssignment_3.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_4 = (Keyword)cGroup.eContents().get(4);
+
+ //company companies::company:
+ // 'company' name=STRING '{' deparment+=department* '}'
+ @Override public ParserRule getRule() { return rule; }
+
+ //'company' name=STRING '{' deparment+=department* '}'
+ public Group getGroup() { return cGroup; }
+
+ //'company'
+ public Keyword getCompanyKeyword_0() { return cCompanyKeyword_0; }
+
+ //name=STRING
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //STRING
+ public RuleCall getNameSTRINGTerminalRuleCall_1_0() { return cNameSTRINGTerminalRuleCall_1_0; }
+
+ //'{'
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //deparment+=department*
+ public Assignment getDeparmentAssignment_3() { return cDeparmentAssignment_3; }
+
+ //department
+ public RuleCall getDeparmentDepartmentParserRuleCall_3_0() { return cDeparmentDepartmentParserRuleCall_3_0; }
+
+ //'}'
+ public Keyword getRightCurlyBracketKeyword_4() { return cRightCurlyBracketKeyword_4; }
+ }
+ public class DepartmentElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cDepartmentKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cNameSTRINGTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cDepartment_managerAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cDepartment_managerDepartment_managerParserRuleCall_3_0 = (RuleCall)cDepartment_managerAssignment_3.eContents().get(0);
+ private final Assignment cDepartment_employeesAssignment_4 = (Assignment)cGroup.eContents().get(4);
+ private final RuleCall cDepartment_employeesDepartment_employeesParserRuleCall_4_0 = (RuleCall)cDepartment_employeesAssignment_4.eContents().get(0);
+ private final Assignment cDeparmentAssignment_5 = (Assignment)cGroup.eContents().get(5);
+ private final RuleCall cDeparmentDepartmentParserRuleCall_5_0 = (RuleCall)cDeparmentAssignment_5.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
+
+ //department companies::department:
+ // 'department' name=STRING '{'
+ // department_manager=department_manager
+ // department_employees=department_employees
+ // deparment+=department*
+ // '}'
+ @Override public ParserRule getRule() { return rule; }
+
+ //'department' name=STRING '{' department_manager=department_manager department_employees=department_employees
+ //deparment+=department* '}'
+ public Group getGroup() { return cGroup; }
+
+ //'department'
+ public Keyword getDepartmentKeyword_0() { return cDepartmentKeyword_0; }
+
+ //name=STRING
+ public Assignment getNameAssignment_1() { return cNameAssignment_1; }
+
+ //STRING
+ public RuleCall getNameSTRINGTerminalRuleCall_1_0() { return cNameSTRINGTerminalRuleCall_1_0; }
+
+ //'{'
+ public Keyword getLeftCurlyBracketKeyword_2() { return cLeftCurlyBracketKeyword_2; }
+
+ //department_manager=department_manager
+ public Assignment getDepartment_managerAssignment_3() { return cDepartment_managerAssignment_3; }
+
+ //department_manager
+ public RuleCall getDepartment_managerDepartment_managerParserRuleCall_3_0() { return cDepartment_managerDepartment_managerParserRuleCall_3_0; }
+
+ //department_employees=department_employees
+ public Assignment getDepartment_employeesAssignment_4() { return cDepartment_employeesAssignment_4; }
+
+ //department_employees
+ public RuleCall getDepartment_employeesDepartment_employeesParserRuleCall_4_0() { return cDepartment_employeesDepartment_employeesParserRuleCall_4_0; }
+
+ //deparment+=department*
+ public Assignment getDeparmentAssignment_5() { return cDeparmentAssignment_5; }
+
+ //department
+ public RuleCall getDeparmentDepartmentParserRuleCall_5_0() { return cDeparmentDepartmentParserRuleCall_5_0; }
+
+ //'}'
+ public Keyword getRightCurlyBracketKeyword_6() { return cRightCurlyBracketKeyword_6; }
+ }
+ public class Department_managerElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_manager");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Keyword cManagerKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Assignment cEmployeeAssignment_1 = (Assignment)cGroup.eContents().get(1);
+ private final RuleCall cEmployeeEmployeeParserRuleCall_1_0 = (RuleCall)cEmployeeAssignment_1.eContents().get(0);
+
+ //department_manager companies::department_manager:
+ // 'manager' employee=employee
+ @Override public ParserRule getRule() { return rule; }
+
+ //'manager' employee=employee
+ public Group getGroup() { return cGroup; }
+
+ //'manager'
+ public Keyword getManagerKeyword_0() { return cManagerKeyword_0; }
+
+ //employee=employee
+ public Assignment getEmployeeAssignment_1() { return cEmployeeAssignment_1; }
+
+ //employee
+ public RuleCall getEmployeeEmployeeParserRuleCall_1_0() { return cEmployeeEmployeeParserRuleCall_1_0; }
+ }
+ public class Department_employeesElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.department_employees");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Action cDepartment_employeesAction_0 = (Action)cGroup.eContents().get(0);
+ private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
+ private final Keyword cEmployeeKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
+ private final Assignment cEmployeeAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
+ private final RuleCall cEmployeeEmployeeParserRuleCall_1_1_0 = (RuleCall)cEmployeeAssignment_1_1.eContents().get(0);
+
+ //department_employees companies::department_employees:
+ // {companies::department_employees} ('employee' employee+=employee)*
+ @Override public ParserRule getRule() { return rule; }
+
+ //{companies::department_employees} ('employee' employee+=employee)*
+ public Group getGroup() { return cGroup; }
+
+ //{companies::department_employees}
+ public Action getDepartment_employeesAction_0() { return cDepartment_employeesAction_0; }
+
+ //('employee' employee+=employee)*
+ public Group getGroup_1() { return cGroup_1; }
+
+ //'employee'
+ public Keyword getEmployeeKeyword_1_0() { return cEmployeeKeyword_1_0; }
+
+ //employee+=employee
+ public Assignment getEmployeeAssignment_1_1() { return cEmployeeAssignment_1_1; }
+
+ //employee
+ public RuleCall getEmployeeEmployeeParserRuleCall_1_1_0() { return cEmployeeEmployeeParserRuleCall_1_1_0; }
+ }
+ public class EmployeeElements extends AbstractParserRuleElementFinder {
+ private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.employee");
+ private final Group cGroup = (Group)rule.eContents().get(1);
+ private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
+ private final RuleCall cNameSTRINGTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0);
+ private final Keyword cLeftCurlyBracketKeyword_1 = (Keyword)cGroup.eContents().get(1);
+ private final Keyword cAddressKeyword_2 = (Keyword)cGroup.eContents().get(2);
+ private final Assignment cAddressAssignment_3 = (Assignment)cGroup.eContents().get(3);
+ private final RuleCall cAddressSTRINGTerminalRuleCall_3_0 = (RuleCall)cAddressAssignment_3.eContents().get(0);
+ private final Keyword cSalaryKeyword_4 = (Keyword)cGroup.eContents().get(4);
+ private final Assignment cSalaryAssignment_5 = (Assignment)cGroup.eContents().get(5);
+ private final RuleCall cSalaryFLOATTerminalRuleCall_5_0 = (RuleCall)cSalaryAssignment_5.eContents().get(0);
+ private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
+ private final Keyword cMentorKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
+ private final Assignment cMentorAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1);
+ private final RuleCall cMentorSTRINGTerminalRuleCall_6_1_0 = (RuleCall)cMentorAssignment_6_1.eContents().get(0);
+ private final Keyword cRightCurlyBracketKeyword_7 = (Keyword)cGroup.eContents().get(7);
+
+ //employee companies::employee:
+ // name=STRING '{'
+ // 'address' address=STRING
+ // 'salary' salary=FLOAT ('mentor' mentor=STRING)?
+ // '}'
+ @Override public ParserRule getRule() { return rule; }
+
+ //name=STRING '{' 'address' address=STRING 'salary' salary=FLOAT ('mentor' mentor=STRING)? '}'
+ public Group getGroup() { return cGroup; }
+
+ //name=STRING
+ public Assignment getNameAssignment_0() { return cNameAssignment_0; }
+
+ //STRING
+ public RuleCall getNameSTRINGTerminalRuleCall_0_0() { return cNameSTRINGTerminalRuleCall_0_0; }
+
+ //'{'
+ public Keyword getLeftCurlyBracketKeyword_1() { return cLeftCurlyBracketKeyword_1; }
+
+ //'address'
+ public Keyword getAddressKeyword_2() { return cAddressKeyword_2; }
+
+ //address=STRING
+ public Assignment getAddressAssignment_3() { return cAddressAssignment_3; }
+
+ //STRING
+ public RuleCall getAddressSTRINGTerminalRuleCall_3_0() { return cAddressSTRINGTerminalRuleCall_3_0; }
+
+ //'salary'
+ public Keyword getSalaryKeyword_4() { return cSalaryKeyword_4; }
+
+ //salary=FLOAT
+ public Assignment getSalaryAssignment_5() { return cSalaryAssignment_5; }
+
+ //FLOAT
+ public RuleCall getSalaryFLOATTerminalRuleCall_5_0() { return cSalaryFLOATTerminalRuleCall_5_0; }
+
+ //('mentor' mentor=STRING)?
+ public Group getGroup_6() { return cGroup_6; }
+
+ //'mentor'
+ public Keyword getMentorKeyword_6_0() { return cMentorKeyword_6_0; }
+
+ //mentor=STRING
+ public Assignment getMentorAssignment_6_1() { return cMentorAssignment_6_1; }
+
+ //STRING
+ public RuleCall getMentorSTRINGTerminalRuleCall_6_1_0() { return cMentorSTRINGTerminalRuleCall_6_1_0; }
+
+ //'}'
+ public Keyword getRightCurlyBracketKeyword_7() { return cRightCurlyBracketKeyword_7; }
+ }
+
+
+ private final CompanyElements pCompany;
+ private final DepartmentElements pDepartment;
+ private final Department_managerElements pDepartment_manager;
+ private final Department_employeesElements pDepartment_employees;
+ private final EmployeeElements pEmployee;
+ private final TerminalRule tSTRING;
+ private final TerminalRule tFLOAT;
+ private final TerminalRule tWS;
+
+ private final Grammar grammar;
+
+ @Inject
+ public CompaniesGrammarAccess(GrammarProvider grammarProvider) {
+ this.grammar = internalFindGrammar(grammarProvider);
+ this.pCompany = new CompanyElements();
+ this.pDepartment = new DepartmentElements();
+ this.pDepartment_manager = new Department_managerElements();
+ this.pDepartment_employees = new Department_employeesElements();
+ this.pEmployee = new EmployeeElements();
+ this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.STRING");
+ this.tFLOAT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.FLOAT");
+ this.tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies.WS");
+ }
+
+ protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
+ Grammar grammar = grammarProvider.getGrammar(this);
+ while (grammar != null) {
+ if ("org.eclipse.qvtd.cs2as.compiler.tests.models.companies.Companies".equals(grammar.getName())) {
+ return grammar;
+ }
+ List<Grammar> grammars = grammar.getUsedGrammars();
+ if (!grammars.isEmpty()) {
+ grammar = grammars.iterator().next();
+ } else {
+ return null;
+ }
+ }
+ return grammar;
+ }
+
+ @Override
+ public Grammar getGrammar() {
+ return grammar;
+ }
+
+
+
+ //company companies::company:
+ // 'company' name=STRING '{' deparment+=department* '}'
+ public CompanyElements getCompanyAccess() {
+ return pCompany;
+ }
+
+ public ParserRule getCompanyRule() {
+ return getCompanyAccess().getRule();
+ }
+
+ //department companies::department:
+ // 'department' name=STRING '{'
+ // department_manager=department_manager
+ // department_employees=department_employees
+ // deparment+=department*
+ // '}'
+ public DepartmentElements getDepartmentAccess() {
+ return pDepartment;
+ }
+
+ public ParserRule getDepartmentRule() {
+ return getDepartmentAccess().getRule();
+ }
+
+ //department_manager companies::department_manager:
+ // 'manager' employee=employee
+ public Department_managerElements getDepartment_managerAccess() {
+ return pDepartment_manager;
+ }
+
+ public ParserRule getDepartment_managerRule() {
+ return getDepartment_managerAccess().getRule();
+ }
+
+ //department_employees companies::department_employees:
+ // {companies::department_employees} ('employee' employee+=employee)*
+ public Department_employeesElements getDepartment_employeesAccess() {
+ return pDepartment_employees;
+ }
+
+ public ParserRule getDepartment_employeesRule() {
+ return getDepartment_employeesAccess().getRule();
+ }
+
+ //employee companies::employee:
+ // name=STRING '{'
+ // 'address' address=STRING
+ // 'salary' salary=FLOAT ('mentor' mentor=STRING)?
+ // '}'
+ public EmployeeElements getEmployeeAccess() {
+ return pEmployee;
+ }
+
+ public ParserRule getEmployeeRule() {
+ return getEmployeeAccess().getRule();
+ }
+
+ //terminal STRING:
+ // '"' !'"'* '"';
+ public TerminalRule getSTRINGRule() {
+ return tSTRING;
+ }
+
+ //terminal FLOAT returns ecore::EDouble:
+ // '0'..'9'+ ('.' '0'..'9'+)?;
+ public TerminalRule getFLOATRule() {
+ return tFLOAT;
+ }
+
+ //terminal WS:
+ // ' ' | '\r'? '\n' | '\t'+;
+ public TerminalRule getWSRule() {
+ return tWS;
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/AbstractCompaniesValidator.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/AbstractCompaniesValidator.java
new file mode 100644
index 0000000..0f59fa5
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src-gen/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/AbstractCompaniesValidator.java
@@ -0,0 +1,20 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.validation;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
+
+public abstract class AbstractCompaniesValidator extends AbstractDeclarativeValidator {
+
+ @Override
+ protected List<EPackage> getEPackages() {
+ List<EPackage> result = new ArrayList<EPackage>();
+ result.add(EPackage.Registry.INSTANCE.getEPackage("http://cs2as/tests/companies/CS/1.0"));
+ return result;
+ }
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesRuntimeModule.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesRuntimeModule.java
new file mode 100644
index 0000000..d3814ee
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesRuntimeModule.java
@@ -0,0 +1,11 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies;
+
+
+/**
+ * Use this class to register components to be used at runtime / without the Equinox extension registry.
+ */
+public class CompaniesRuntimeModule extends AbstractCompaniesRuntimeModule {
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetup.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetup.java
new file mode 100644
index 0000000..21fa9fd
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/CompaniesStandaloneSetup.java
@@ -0,0 +1,15 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies;
+
+
+/**
+ * Initialization support for running Xtext languages without Equinox extension registry.
+ */
+public class CompaniesStandaloneSetup extends CompaniesStandaloneSetupGenerated {
+
+ public static void doSetup() {
+ new CompaniesStandaloneSetup().createInjectorAndDoEMFRegistration();
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/generator/CompaniesGenerator.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/generator/CompaniesGenerator.java
new file mode 100644
index 0000000..4f83ac3
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/generator/CompaniesGenerator.java
@@ -0,0 +1,30 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.generator;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.xtext.generator.AbstractGenerator;
+import org.eclipse.xtext.generator.IFileSystemAccess2;
+import org.eclipse.xtext.generator.IGeneratorContext;
+
+/**
+ * Generates code from your model files on save.
+ *
+ * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation
+ */
+public class CompaniesGenerator extends AbstractGenerator {
+
+ @Override
+ public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) {
+// Iterator<Greeting> filtered = Iterators.filter(resource.getAllContents(), Greeting.class);
+// Iterator<String> names = Iterators.transform(filtered, new Function<Greeting, String>() {
+//
+// @Override
+// public String apply(Greeting greeting) {
+// return greeting.getName();
+// }
+// });
+// fsa.generateFile("greetings.txt", "People to greet: " + IteratorExtensions.join(names, ", "));
+ }
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/CompaniesScopeProvider.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/CompaniesScopeProvider.java
new file mode 100644
index 0000000..095c287
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/scoping/CompaniesScopeProvider.java
@@ -0,0 +1,15 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.scoping;
+
+
+/**
+ * This class contains custom scoping description.
+ *
+ * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping
+ * on how and when to use it.
+ */
+public class CompaniesScopeProvider extends AbstractCompaniesScopeProvider {
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/CompaniesValidator.java b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/CompaniesValidator.java
new file mode 100644
index 0000000..1e537b1
--- /dev/null
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/src/org/eclipse/qvtd/cs2as/compiler/tests/models/companies/validation/CompaniesValidator.java
@@ -0,0 +1,25 @@
+/*
+ * generated by Xtext 2.10.0
+ */
+package org.eclipse.qvtd.cs2as.compiler.tests.models.companies.validation;
+
+
+/**
+ * This class contains custom validation rules.
+ *
+ * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
+ */
+public class CompaniesValidator extends AbstractCompaniesValidator {
+
+// public static final INVALID_NAME = 'invalidName'
+//
+// @Check
+// public void checkGreetingStartsWithCapital(Greeting greeting) {
+// if (!Character.isUpperCase(greeting.getName().charAt(0))) {
+// warning("Name should start with a capital",
+// CompaniesPackage.Literals.GREETING__NAME,
+// INVALID_NAME);
+// }
+// }
+
+}
diff --git a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/.gitignore b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/.gitignore
index 94c13ab..e917c2b 100644
--- a/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/.gitignore
+++ b/tests/org.eclipse.qvtd.cs2as.compiler.tests/tests-gen/cg/.gitignore
@@ -9,3 +9,4 @@
/_Source2TargetDerived_qvtp_qvtias/
/_KiamaRewrite_qvtp_qvtcas/
/_classescs2as_qvtp_qvtcas/
+/_companies_qvtp_qvtcas/