Merge remote-tracking branch 'origin/master' into hhoyos/executors
diff --git a/.gitignore b/.gitignore
index b0bd381..823d799 100644
--- a/.gitignore
+++ b/.gitignore
@@ -90,3 +90,7 @@
# Backup files from Emacs
*~
+
+# IDE Stuff
+*.idea
+*.iml
diff --git a/plugins/org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf/EmfModel.java b/plugins/org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf/EmfModel.java
index e1a8ef2..bff5eac 100644
--- a/plugins/org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf/EmfModel.java
+++ b/plugins/org.eclipse.epsilon.emc.emf/src/org/eclipse/epsilon/emc/emf/EmfModel.java
@@ -27,9 +27,13 @@
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceImpl;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
import org.eclipse.epsilon.common.util.CollectionUtil;
import org.eclipse.epsilon.common.util.StringProperties;
import org.eclipse.epsilon.eol.compile.m3.Metamodel;
@@ -124,6 +128,13 @@
protected static Map<String, Long> fileBasedMetamodelTimestamps = new HashMap<>();
+ /**
+ * Share an XML parser pool between models
+ * @since 1.6
+ */
+ private static XMLParserPool parserPool = new XMLParserPoolImpl();
+
+
@Override
public Collection<String> getPropertiesOf(String type) throws EolModelElementTypeNotFoundException {
Collection<EStructuralFeature> features = featuresForType(type);
@@ -368,6 +379,7 @@
determinePackagesFrom(resourceSet);
// Note that AbstractEmfModel#getPackageRegistry() is not usable yet, as modelImpl is not set
+ // Note that if the modelImpl is not set AbstractEmfModel#getPackageRegistry() will return the EPackage.Registry
for (EPackage ep : packages) {
String nsUri = ep.getNsURI();
if (nsUri == null || nsUri.trim().length() == 0) {
@@ -379,8 +391,15 @@
Resource model = resourceSet.createResource(modelUri);
if (this.readOnLoad) {
+ // @since 1.6
+ Map<Object, Object> emfLoadOptions = new HashMap<>();
+ emfLoadOptions.put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
+ emfLoadOptions.put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ if (model instanceof ResourceImpl) {
+ ((ResourceImpl) model).setIntrinsicIDToEObjectMap(new HashMap<>());
+ }
try {
- model.load(null);
+ model.load(emfLoadOptions);
if (expand) {
EcoreUtil.resolveAll(model);
}
@@ -677,9 +696,8 @@
public boolean store() {
if (modelImpl == null) return false;
try {
- Map<String, Boolean> options = null;
+ Map<String, Boolean> options = new HashMap<>();
if (!metamodelFileUris.isEmpty()) {
- options = new HashMap<>();
options.put(XMLResource.OPTION_SCHEMA_LOCATION, true);
}
modelImpl.save(options);
diff --git a/plugins/org.eclipse.epsilon.executors.emf/.classpath b/plugins/org.eclipse.epsilon.executors.emf/.classpath
new file mode 100644
index 0000000..6a5eab8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.executors.emf/.project b/plugins/org.eclipse.epsilon.executors.emf/.project
new file mode 100644
index 0000000..c195823
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.executors.emf</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b8947ec
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.epsilon.executors.emf/EPL-2.0.html b/plugins/org.eclipse.epsilon.executors.emf/EPL-2.0.html
new file mode 100644
index 0000000..f5d138c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/EPL-2.0.html
@@ -0,0 +1,307 @@
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors.emf/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.executors.emf/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..95174d2
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/META-INF/MANIFEST.MF
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Emf
+Bundle-SymbolicName: org.eclipse.epsilon.executors.emf
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Automatic-Module-Name: org.eclipse.epsilon.executors
+Require-Bundle: org.eclipse.epsilon.eol.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.executors;bundle-version="1.0.0",
+ org.eclipse.epsilon.emc.emf;bundle-version="1.6.0",
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore.xmi
+Export-Package: org.eclipse.epsilon.executors.model,
+ org.eclipse.epsilon.executors.model.util
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.epsilon.executors.emf/build.properties b/plugins/org.eclipse.epsilon.executors.emf/build.properties
new file mode 100644
index 0000000..a505bb8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/build.properties
@@ -0,0 +1,3 @@
+source.. = src
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/AbstractEmfModelBuilder.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/AbstractEmfModelBuilder.java
new file mode 100644
index 0000000..b702141
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/AbstractEmfModelBuilder.java
@@ -0,0 +1,33 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.epsilon.emc.emf.EmfModel;
+import org.eclipse.epsilon.executors.model.CachedModelBuilder;
+import org.eclipse.epsilon.executors.model.ICachedModelBuilder;
+
+/**
+ * Base class for EMF model builder. By default EMF models are expanded.
+ * @param <T> The type of model builder
+ * @param <M> The type of model being built
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public abstract class AbstractEmfModelBuilder<M extends EmfModel, T extends AbstractEmfModelBuilder<M, T>>
+ extends CachedModelBuilder<M, T> implements ICachedModelBuilder<M, T> {
+
+ protected boolean expand = true;
+
+ public T withExpand(boolean expand) {
+ this.expand = expand;
+ return self();
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/EmfModelBuilder.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/EmfModelBuilder.java
new file mode 100644
index 0000000..ef19107
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/EmfModelBuilder.java
@@ -0,0 +1,117 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.epsilon.emc.emf.EmfModel;
+
+/**
+ * Implementaiton of the Emf Model Builder. By default metamodels are reused (@see {@link #reuseMetamodels}).
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public class EmfModelBuilder extends AbstractEmfModelBuilder<EmfModel, EmfModelBuilder>
+ implements IEmfModelBuilder<EmfModel, EmfModelBuilder> {
+
+ protected List<String> meteamodelUris;
+ protected List<String> fileBasedMetamodelUris;
+ protected boolean reuseMetamodels = true;
+
+ public EmfModelBuilder() {
+ meteamodelUris = new ArrayList<>();
+ fileBasedMetamodelUris = new ArrayList<>();
+ }
+
+ @Override
+ public String getName() {
+ return "Emf";
+ }
+
+ @Override
+ public EmfModelBuilder self() {
+ return this;
+ }
+
+ @Override
+ public EmfModelBuilder withName(String name) {
+ this.name = name;
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder withModelPath(Path modelpath) {
+ this.modelUri = modelpath.toString();
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder reuseUnmodifiedFileBasedMetamodels(boolean reuse) {
+ this.reuseMetamodels = reuse;
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder withMetamodelUri(String metamodelUri) {
+ this.meteamodelUris.add(metamodelUri);
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder withMetamodelUris(String... metamodelUris) {
+ this.meteamodelUris.addAll(Arrays.asList(metamodelUris));
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder withMetamodelPath(Path metamodelFile) {
+ this.fileBasedMetamodelUris.add(metamodelFile.toString());
+ return self();
+ }
+
+ @Override
+ public EmfModelBuilder withMetamodelPaths(Path... metamodelFiles) {
+ Arrays.stream(metamodelFiles).map(Path::toString).forEach(fileBasedMetamodelUris::add);
+ return self();
+ }
+
+ // Add validation
+ @Override
+ public EmfModel build() {
+ // Xcore needs to be setup for standalone
+ // Epsilon EMF needs to play nicer for this to work.
+// new org.eclipse.emf.mwe.utils.StandaloneSetup().setPlatformUri("../");
+// Injector injector = new XcoreStandaloneSetup().createInjectorAndDoEMFRegistration();
+// XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
+// resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
+// //load genmodel from class org.eclipse.emf.ecore
+// URL ecoreGenmodelResource = getClass().getResource("Ecore.genmodel");
+// URI uri = URI.createFileURI(ecoreGenmodelResource.getPath());
+// GenModel genmodel = (GenModel)resourceSet.getResource(uri, true).getContents().get(0);
+// EPackage.Registry.INSTANCE.put("platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel", genmodel);
+
+ EmfModel model = new EmfModel();
+ model.setName(name);
+ model.setReadOnLoad(this.readOnLoad);
+ model.setStoredOnDisposal(this.storeOnDisposal);
+ model.setCachingEnabled(this.useCache);
+ model.setExpand(this.expand);
+ model.setModelFile(this.modelUri);
+ model.setMetamodelUris(this.meteamodelUris);
+ model.setMetamodelFiles(this.fileBasedMetamodelUris);
+ model.setReuseUnmodifiedFileBasedMetamodels(this.reuseMetamodels);
+ return model;
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IEmfModelBuilder.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IEmfModelBuilder.java
new file mode 100644
index 0000000..c16a8e2
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IEmfModelBuilder.java
@@ -0,0 +1,69 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.epsilon.emc.emf.EmfModel;
+import org.eclipse.epsilon.executors.model.ICachedModelBuilder;
+
+import java.nio.file.Path;
+
+/**
+ * A ModelBuilder for EMF Models
+ * @param <T> The type of model builder
+ * @param <M> The type of model being built
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public interface IEmfModelBuilder<M extends EmfModel, T extends IEmfModelBuilder<M, T>> extends ICachedModelBuilder<M, T> {
+
+ /**
+ * Resolve proxies when loading the EMF model
+ * @param expand Set to True to resolve proxies
+ * @return the builder
+ */
+ T withExpand(boolean expand);
+
+ /**
+ * If set to <code>true</code> (the default), the model tries to reuse previously registered
+ * file-based EPackages that have not been modified since the last time they were registered.
+ * @param reuse Set to true to enable metamodel reuse
+ * @return the builder
+ */
+ T reuseUnmodifiedFileBasedMetamodels(boolean reuse);
+
+ /**
+ * Use the given metamodel URI
+ * @param metamodelUri the EMF URI to the metamodel
+ * @return the builder
+ */
+ T withMetamodelUri(String metamodelUri);
+
+ /**
+ * Use the given metamodel URIs
+ * @param metamodelUris the EMF URIs to the metamodels
+ * @return the builder
+ */
+ T withMetamodelUris(String... metamodelUris);
+
+ /**
+ * Use the given metamodel Path (file based)
+ * @param metamodelFile the Path of the metamodel file
+ * @return the builder
+ */
+ T withMetamodelPath(Path metamodelFile);
+
+ /**
+ * USe the given metamodel Paths (file based)
+ * @param metamodelFiles the Paths of the metamodel files
+ * @return the builder
+ */
+ T withMetamodelPaths(Path... metamodelFiles);
+}
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IInMemoryEmfModelBuilder.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IInMemoryEmfModelBuilder.java
new file mode 100644
index 0000000..32af510
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/IInMemoryEmfModelBuilder.java
@@ -0,0 +1,62 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.epsilon.emc.emf.EmfModel;
+
+// TODO: Auto-generated Javadoc
+/**
+ * A ModelBuilder for EMF Models.
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ * @param <T> The type of model builder
+ * @param <M> The type of model being built
+ */
+public interface IInMemoryEmfModelBuilder<M extends EmfModel, T extends IInMemoryEmfModelBuilder<M, T>>
+ extends ICachedModelBuilder<M, T> {
+
+ /**
+ * Use the given resource with the model
+ *
+ * @param resource the resource
+ * @return the t
+ */
+ T withResource(Resource resource);
+
+ /**
+ * Register the provided EPackages in the model's registry
+ *
+ * @param ePackages the e packages
+ * @return the t
+ */
+ T withEPackages(EPackage... ePackages);
+
+ /**
+ * Use the provided NS URIs from the global registry in the model's registry. If both NS URIs
+ * and EPackages are provided, the EPackages list will be preferred.
+ *
+ * @param nsUris the NS URIs
+ * @return the t
+ */
+ T withNsUris(String... nsUris);
+
+ /**
+ * Add a notification adapter to all objects in the model so that they get moved when their
+ * containment changes. Default true.
+ *
+ * @param enabled the enabled
+ * @return the t
+ */
+ T withContainerListenerEnabled(boolean enabled);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/InMemoryEmfModelBuilder.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/InMemoryEmfModelBuilder.java
new file mode 100644
index 0000000..9738886
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/InMemoryEmfModelBuilder.java
@@ -0,0 +1,80 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.epsilon.emc.emf.InMemoryEmfModel;
+
+public class InMemoryEmfModelBuilder extends AbstractEmfModelBuilder<InMemoryEmfModel, InMemoryEmfModelBuilder>
+ implements IInMemoryEmfModelBuilder<InMemoryEmfModel, InMemoryEmfModelBuilder> {
+
+ protected Resource resource;
+ protected List<EPackage> ePackages;
+ protected List<String> nsUris;
+ protected boolean containerListener = true;
+
+
+
+ public InMemoryEmfModelBuilder() {
+ ePackages = new ArrayList<>();
+ nsUris = new ArrayList<>();
+ }
+
+ @Override
+ public InMemoryEmfModelBuilder self() {
+ return this;
+ }
+
+ @Override
+ public InMemoryEmfModel build() throws Exception {
+ if ((!ePackages.isEmpty()) && (!nsUris.isEmpty())) {
+ System.out.println("Both EPackages and nsURIs were providede, only EPackages will be used.");
+ }
+ if (name == null) {
+ name = "Model";
+ }
+ if (!ePackages.isEmpty()) {
+ return new InMemoryEmfModel(name, resource, ePackages.toArray(new EPackage[0]));
+ }
+ else {
+ return new InMemoryEmfModel(name, resource, nsUris.toArray(new String[0]));
+ }
+ }
+
+ @Override
+ public InMemoryEmfModelBuilder withResource(Resource resource) {
+ this.resource = resource;
+ return this;
+ }
+
+ @Override
+ public InMemoryEmfModelBuilder withEPackages(EPackage... ePackages) {
+ this.ePackages.addAll(Arrays.asList(ePackages));
+ return this;
+ }
+
+ @Override
+ public InMemoryEmfModelBuilder withNsUris(String... nsUris) {
+ this.nsUris.addAll(Arrays.asList(nsUris));
+ return this;
+ }
+
+ @Override
+ public InMemoryEmfModelBuilder withContainerListenerEnabled(boolean enabled) {
+ this.containerListener = enabled;
+ return this;
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/util/EmfModelUtil.java b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/util/EmfModelUtil.java
new file mode 100644
index 0000000..6c266f4
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.emf/src/org/eclipse/epsilon/executors/model/util/EmfModelUtil.java
@@ -0,0 +1,287 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.PathMatcher;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.Resource.Factory;
+import org.eclipse.emf.ecore.resource.Resource.Factory.Registry;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMLParserPool;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
+
+
+/**
+ * Set of utility methods for working with EMF models.
+ * @author Horacio Hoyos Rodriguez
+ *
+ */
+public class EmfModelUtil {
+
+ private static XMLParserPool parserPool = new XMLParserPoolImpl();
+
+ private static Map<Object, Object> emfLoadOptions;
+ static {
+ HashMap<Object, Object> aMap = new HashMap<>();
+ aMap.put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
+ aMap.put(XMLResource.OPTION_USE_PARSER_POOL, parserPool);
+ emfLoadOptions = Collections.unmodifiableMap(aMap);
+ }
+
+ /**
+ * Register the XMI resource factory locally into a specific ResourceSet. The ResourceSet
+ * should be created via <code>ResourceSet rs = new ResourceSetImpl();</code>
+ *
+ * @param rs the rs
+ */
+ public static void registerXMIFactoryLocally(ResourceSet rs) {
+ registerResourceFactoryLocally("xmi", new XMIResourceFactoryImpl(), rs);
+ }
+
+ /**
+ * Register the XMI resource factory globally.
+ */
+ public static void registerXMIFactoryGlobally() {
+ registerResourceFactoryGlobally("xmi", new XMIResourceFactoryImpl());
+ }
+
+ /**
+ * Register the Ecore resource factory locally into a specific ResourceSet. The ResourceSet
+ * should be created via <code>ResourceSet rs = new ResourceSetImpl();</code>
+ *
+ * @param rs the rs
+ */
+ public static void registerEcoreFactoryLocally(ResourceSet rs) {
+ registerResourceFactoryLocally("ecore", new EcoreResourceFactoryImpl(), rs);
+ }
+
+ /**
+ * Register the Ecore resource factory globally.
+ */
+ public static void registerEcoreFactoryGlobally() {
+ registerResourceFactoryGlobally("ecore", new EcoreResourceFactoryImpl());
+ }
+
+ /**
+ * Register the ".model" extension as XMI resources locally into a specific ResourceSet. The
+ * ResourceSet should be created via <code>ResourceSet rs = new ResourceSetImpl();</code>
+ *
+ * @param rs the rs
+ */
+ public static void registerModelExtensionLocally(ResourceSet rs) {
+ registerResourceFactoryLocally("model", new XMIResourceFactoryImpl(), rs);
+ }
+
+ /**
+ * Register the ".model" extension as XMI resources globally
+ */
+ public static void registerModelExtensionGlobally() {
+ registerResourceFactoryGlobally("model", new XMIResourceFactoryImpl());
+ }
+
+ /**
+ * Register a Factory for a specific extension locally.
+ *
+ * @param extension the file extension
+ * @param factory the factory to handle files with the given extension
+ * @param rs the resource set where the factory is registered
+ */
+ public static void registerResourceFactoryLocally(String extension, Factory factory, ResourceSet rs) {
+ rs.getResourceFactoryRegistry().getExtensionToFactoryMap().put(extension, factory);
+ }
+
+ /**
+ * Register a Factory for a specific extension blobally.
+ *
+ * @param extension the file extension
+ * @param factory the factory to handle files with the given extension
+ */
+ public static void registerResourceFactoryGlobally(String extension, Factory factory) {
+ Registry registry = Resource.Factory.Registry.INSTANCE;
+ registry.getExtensionToFactoryMap().put(extension, factory);
+ }
+
+ /** The matcher. */
+ public static PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:*.ecore");
+
+
+ /**
+ * Register all the packages found in the given Ecore metamodel locally.
+ *
+ * @param location the metamodel location, must be a valid file system path
+ * @param rs the Resource Set
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelLocally(Path location, ResourceSet rs) throws IOException {
+ registerEcoreMetamodelLocally(location, rs, emfLoadOptions);
+ }
+
+ /**
+ * Register all the packages found in the given Ecore metamodel locally.
+ *
+ * @param location the metamodel location, must be a valid file system path
+ * @param rs the Resource Set
+ * @param options the options
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelLocally(
+ Path location,
+ ResourceSet rs,
+ Map<?,?> options) throws IOException {
+ if (!matcher.matches(location)) {
+ System.out.println("Attempting to load a metamodel without an *.ecore name, make sure the appropiate facotry has been registered.");
+ }
+ if (location.toString().contains("!")) {
+ throw new IllegalStateException("The provided path is jar resource, you need to copy the"
+ + " contents to a file or use the InputStream alternative method.");
+ }
+ Resource r = rs.createResource(URI.createFileURI(location.toString()));
+ r.load(options);
+ for (EObject eo : r.getContents()) {
+ if (eo instanceof EPackage) {
+ registerEPackage((EPackage) eo, rs.getPackageRegistry());
+ }
+ }
+ }
+
+ /**
+ * Register all the packages found in the given Ecore metamodel locally.
+ *
+ * @param location the metamodel location, must be a valid file system path
+ * @param rs the Resource Set
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelGlobally(Path location) throws IOException {
+ registerEcoreMetamodelGlobally(location, emfLoadOptions);
+ }
+
+ /**
+ * Register all the packages found in the given Ecore metamodel globally
+ *
+ * @param location the metamodel location, must be a valid file system path
+ * @param rs the Resource Set
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelGlobally(Path location, Map<?,?> options) throws IOException {
+ if (!matcher.matches(location)) {
+ System.out.println("Attempting to load a metamodel without an *.ecore name, make sure the appropiate facotry has been registered.");
+ }
+ if (location.toString().contains("!")) {
+ throw new IllegalStateException("The provided path is jar resource, you need to copy the"
+ + " contents to a file or use the InputStream alternative method.");
+ }
+ ResourceSet rs = new ResourceSetImpl();
+ Resource r = rs.createResource(URI.createFileURI(location.toString()));
+ r.load(options);
+ org.eclipse.emf.ecore.EPackage.Registry registry = EPackage.Registry.INSTANCE;
+ for (EObject eo : r.getContents()) {
+ if (eo instanceof EPackage) {
+ registerEPackage((EPackage) eo, registry);
+ }
+ }
+ }
+
+
+ /**
+ * Register all the packages found in the given Ecore metamodel locally. The metamodel is read
+ * from an input stream. This method is useful when loading metamodel from Class resources.
+ *
+ * @param name the name of the metamodel
+ * @param stream the input stream from with the metamodel can be loaded
+ * @param rs the Resource Set
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelLocally(
+ String name,
+ InputStream stream,
+ ResourceSet rs) throws IOException {
+ registerEcoreMetamodelLocally(name, stream, rs, emfLoadOptions);
+ }
+
+ /**
+ * Register all the packages found in the given Ecore metamodel locally. The metamodel is read
+ * from an input stream. This method is useful when loading metamodel from Class resources.
+ *
+ * @param name the name of the metamodel
+ * @param stream the input stream from with the metamodel can be loaded
+ * @param rs the Resource Set
+ * @param options the options
+ * @throws IOException Signals that an I/O exception has occurred.
+ */
+ public static void registerEcoreMetamodelLocally(
+ String name,
+ final InputStream stream,
+ final ResourceSet rs,
+ final Map<?,?> options) throws IOException {
+ boolean append = false;
+ try {
+ String ext = name.substring(name.lastIndexOf("."));
+ if (ext.equals(".ecore")) {
+ append = true;
+ }
+ }
+ catch (IndexOutOfBoundsException ex) {
+ append = true;
+ }
+ if (append) {
+ name = name + ".ecore";
+ }
+ Resource r = rs.createResource(URI.createFileURI(name));
+ r.load(options);
+ for (EObject eo : r.getContents()) {
+ if (eo instanceof EPackage) {
+ registerEPackage((EPackage) eo, rs.getPackageRegistry());
+ }
+ }
+ }
+
+
+ /**
+ * Register the EPackage and its nested packages in the given EPackage.Registry
+ * @param ep The EPackage
+ * @param registry The Registry
+ */
+ public static void registerEPackage(EPackage ep, org.eclipse.emf.ecore.EPackage.Registry registry) {
+ registry.put(ep.getNsURI(), ep);
+ for (EPackage nep : ep.getESubpackages()) {
+ registerEPackage(nep, registry);
+ }
+ }
+
+
+ /**
+ * Register the EPackage and its nested packages in the given EPackage.Registry
+ * @param ep The EPackage
+ * @param registry The Registry
+ */
+ public static void registerEPackageGlobally(EPackage ep) {
+ org.eclipse.emf.ecore.EPackage.Registry.INSTANCE.put(ep.getNsURI(), ep);
+ for (EPackage nep : ep.getESubpackages()) {
+ registerEPackageGlobally(nep);
+ }
+ }
+
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/.classpath b/plugins/org.eclipse.epsilon.executors.simulink/.classpath
new file mode 100644
index 0000000..6a5eab8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/.project b/plugins/org.eclipse.epsilon.executors.simulink/.project
new file mode 100644
index 0000000..9963f32
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.executors.simulink</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b8947ec
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.m2e.core.prefs b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/EPL-2.0.html b/plugins/org.eclipse.epsilon.executors.simulink/EPL-2.0.html
new file mode 100644
index 0000000..f5d138c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/EPL-2.0.html
@@ -0,0 +1,307 @@
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.executors.simulink/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..5eec937
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Simulink
+Bundle-SymbolicName: org.eclipse.epsilon.executors.simulink
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Automatic-Module-Name: org.eclipse.epsilon.executors
+Export-Package: org.eclipse.epsilon.engine.standalone.simulink
+Require-Bundle: org.eclipse.epsilon.eol.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.executors;bundle-version="1.0.0",
+ org.eclipse.epsilon.emc.simulink;bundle-version="1.6.0"
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/build.properties b/plugins/org.eclipse.epsilon.executors.simulink/build.properties
new file mode 100644
index 0000000..a505bb8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/build.properties
@@ -0,0 +1,3 @@
+source.. = src
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/ISimulinkModelBuilder.java b/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/ISimulinkModelBuilder.java
new file mode 100644
index 0000000..31a93ba
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/ISimulinkModelBuilder.java
@@ -0,0 +1,27 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.engine.standalone.simulink;
+
+import java.io.File;
+
+import org.eclipse.epsilon.emc.simulink.model.SimulinkModel;
+import org.eclipse.epsilon.executors.model.ICachedModelBuilder;
+
+public interface ISimulinkModelBuilder<T extends ISimulinkModelBuilder<T>> extends ICachedModelBuilder<SimulinkModel, T> {
+
+ T engineJarPath(String engineJarPath);
+
+ T showMatlabEditor(boolean hiddenEditor);
+
+ T file(File file);
+
+ T libraryPath(String libraryPath);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/SimulinkModelBuilder.java b/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/SimulinkModelBuilder.java
new file mode 100644
index 0000000..69f28da
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.simulink/src/org/eclipse/epsilon/engine/standalone/simulink/SimulinkModelBuilder.java
@@ -0,0 +1,72 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.engine.standalone.simulink;
+
+import java.io.File;
+
+import org.eclipse.epsilon.emc.simulink.model.SimulinkModel;
+import org.eclipse.epsilon.executors.model.CachedModelBuilder;
+
+
+public class SimulinkModelBuilder extends CachedModelBuilder<SimulinkModel, SimulinkModelBuilder>
+ implements ISimulinkModelBuilder<SimulinkModelBuilder> {
+
+ private String engineJarPath;
+ private String libraryPath;
+ private File file;
+ private boolean showEditor = true;
+
+ public SimulinkModelBuilder() {}
+
+ @Override
+ public SimulinkModelBuilder engineJarPath(String engineJarPath) {
+ this.engineJarPath = engineJarPath;
+ return self();
+ }
+
+ @Override
+ public SimulinkModelBuilder showMatlabEditor(boolean hiddenEditor) {
+ this.showEditor = hiddenEditor;
+ return self();
+ }
+
+ @Override
+ public SimulinkModelBuilder libraryPath(String libraryPath) {
+ this.libraryPath = libraryPath;
+ return self();
+ }
+
+ @Override
+ public SimulinkModelBuilder file(File file) {
+ this.file = file;
+ return self();
+ }
+
+ @Override
+ public SimulinkModel build() throws Exception {
+ SimulinkModel model = new SimulinkModel();
+ model.setName(name);
+ model.setReadOnLoad(this.readOnLoad);
+ model.setStoredOnDisposal(this.storeOnDisposal);
+ model.setCachingEnabled(this.useCache);
+ model.setEngineJarPath(this.engineJarPath);
+ model.setLibraryPath(this.libraryPath);
+ model.setShowInMatlabEditor(this.showEditor);
+ model.setFile(this.file);
+ return model;
+ }
+
+ @Override
+ public SimulinkModelBuilder self() {
+ return this;
+ }
+
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.classpath b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.classpath
new file mode 100644
index 0000000..6a5eab8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.project b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.project
new file mode 100644
index 0000000..1365f6f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.executors.spreadsheets.excel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b8947ec
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.m2e.core.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/EPL-2.0.html b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/EPL-2.0.html
new file mode 100644
index 0000000..f5d138c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/EPL-2.0.html
@@ -0,0 +1,307 @@
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f3bc80f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Excel
+Bundle-SymbolicName: org.eclipse.epsilon.executors.spreadsheets.excel
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Automatic-Module-Name: org.eclipse.epsilon.executors
+Export-Package: org.eclipse.epsilon.executors.spreadsheets.excel
+Require-Bundle: org.apache.poi_3.10.1;bundle-version="3.10.1",
+ org.eclipse.epsilon.eol.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.emc.spreadsheets;bundle-version="1.6.0",
+ org.eclipse.epsilon.emc.spreadsheets.excel;bundle-version="1.6.0",
+ org.eclipse.epsilon.executors;bundle-version="1.0.0",
+ org.eclipse.epsilon.executors.spreadsheets
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/build.properties b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/build.properties
new file mode 100644
index 0000000..a505bb8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/build.properties
@@ -0,0 +1,3 @@
+source.. = src
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/ExcelModelBuilder.java b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/ExcelModelBuilder.java
new file mode 100644
index 0000000..da88f27
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/ExcelModelBuilder.java
@@ -0,0 +1,83 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.spreadsheets.excel;
+
+import java.io.File;
+
+import org.apache.poi.ss.usermodel.Workbook;
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetReference;
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet;
+import org.eclipse.epsilon.emc.spreadsheets.excel.ExcelModel;
+import org.eclipse.epsilon.executors.spreadsheets.SpreadsheetModelBuilder;
+
+
+public class ExcelModelBuilder extends SpreadsheetModelBuilder<ExcelModel, ExcelModelBuilder>
+ implements IExcelModelBuilder<ExcelModelBuilder> {
+
+ protected Workbook workbook;
+ private File spreadsheetFile;
+ private File configurationFile;
+ private String password;
+
+ public ExcelModelBuilder() {
+ super();
+ }
+
+ @Override
+ public ExcelModel build() throws Exception {
+ ExcelModel model = new ExcelModel();
+ // From Model
+ model.setName(this.name);
+ model.setReadOnLoad(this.readOnLoad);
+ model.setStoredOnDisposal(this.storeOnDisposal);
+ // From Spreadsheet Model
+ for (SpreadsheetReference reference : this.references) {
+ model.addReference(reference);
+ }
+ for (SpreadsheetWorksheet worksheet : this.worksheets) {
+ model.addWorksheet(worksheet);
+ }
+ // From Excel Spreadsheet Model
+ model.setConfigurationFile(this.configurationFile.getAbsolutePath());
+ model.setPassword(this.password);
+ model.setSpreadsheetFile(this.spreadsheetFile.getAbsolutePath());
+
+ return model;
+ }
+
+ @Override
+ public ExcelModelBuilder setWorkbook(Workbook workbook) {
+ this.workbook = workbook;
+ return self();
+ }
+
+ @Override
+ public ExcelModelBuilder setSpreadsheetFile(File spreadsheetFile) {
+ this.spreadsheetFile = spreadsheetFile;
+ return self();
+ }
+
+ @Override
+ public ExcelModelBuilder setConfgurationFile(File configurationFile) {
+ this.configurationFile = configurationFile;
+ return self();
+ }
+
+ @Override
+ public ExcelModelBuilder setPassword(String password) {
+ this.password = password;
+ return self();
+ }
+
+ @Override
+ public ExcelModelBuilder self() {
+ return this;
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/IExcelModelBuilder.java b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/IExcelModelBuilder.java
new file mode 100644
index 0000000..d71323a
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets.excel/src/org/eclipse/epsilon/executors/spreadsheets/excel/IExcelModelBuilder.java
@@ -0,0 +1,28 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.spreadsheets.excel;
+
+import java.io.File;
+
+import org.apache.poi.ss.usermodel.Workbook;
+import org.eclipse.epsilon.emc.spreadsheets.excel.ExcelModel;
+import org.eclipse.epsilon.executors.spreadsheets.ISpreadsheetModelBuilder;
+
+public interface IExcelModelBuilder<T extends IExcelModelBuilder<T>> extends ISpreadsheetModelBuilder<ExcelModel, T> {
+
+ T setWorkbook(Workbook workbook);
+
+ T setSpreadsheetFile(File spreadsheetFile);
+
+ T setConfgurationFile(File configurationFile);
+
+ T setPassword(String password);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/.classpath b/plugins/org.eclipse.epsilon.executors.spreadsheets/.classpath
new file mode 100644
index 0000000..6a5eab8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/.project b/plugins/org.eclipse.epsilon.executors.spreadsheets/.project
new file mode 100644
index 0000000..07fda35
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.executors.spreadsheets</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b8947ec
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.m2e.core.prefs b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/EPL-2.0.html b/plugins/org.eclipse.epsilon.executors.spreadsheets/EPL-2.0.html
new file mode 100644
index 0000000..f5d138c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/EPL-2.0.html
@@ -0,0 +1,307 @@
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.executors.spreadsheets/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..0edc554
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/META-INF/MANIFEST.MF
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Spreadsheets
+Bundle-SymbolicName: org.eclipse.epsilon.executors.spreadsheets
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Automatic-Module-Name: org.eclipse.epsilon.executors
+Export-Package: org.eclipse.epsilon.executors.spreadsheets
+Require-Bundle: org.eclipse.epsilon.emc.spreadsheets;bundle-version="1.6.0",
+ org.eclipse.epsilon.eol.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.executors;bundle-version="1.0.0"
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/build.properties b/plugins/org.eclipse.epsilon.executors.spreadsheets/build.properties
new file mode 100644
index 0000000..a505bb8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/build.properties
@@ -0,0 +1,3 @@
+source.. = src
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/ISpreadsheetModelBuilder.java b/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/ISpreadsheetModelBuilder.java
new file mode 100644
index 0000000..f789dae
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/ISpreadsheetModelBuilder.java
@@ -0,0 +1,24 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.spreadsheets;
+
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetReference;
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet;
+import org.eclipse.epsilon.eol.models.IModel;
+import org.eclipse.epsilon.executors.model.IModelBuilder;
+
+public interface ISpreadsheetModelBuilder<M extends IModel, T extends ISpreadsheetModelBuilder<M, T>>
+ extends IModelBuilder<M, T> {
+
+ T addWorksheet(final SpreadsheetWorksheet worksheet);
+
+ T addReference(final SpreadsheetReference reference);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/SpreadsheetModelBuilder.java b/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/SpreadsheetModelBuilder.java
new file mode 100644
index 0000000..949a02a
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors.spreadsheets/src/org/eclipse/epsilon/executors/spreadsheets/SpreadsheetModelBuilder.java
@@ -0,0 +1,37 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.spreadsheets;
+
+import java.util.List;
+
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetModel;
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetReference;
+import org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet;
+import org.eclipse.epsilon.executors.model.ModelBuilder;
+
+public abstract class SpreadsheetModelBuilder<M extends SpreadsheetModel, T extends SpreadsheetModelBuilder<M, T>>
+ extends ModelBuilder<M, T> implements ISpreadsheetModelBuilder<M, T> {
+
+ protected List<SpreadsheetWorksheet> worksheets;
+ protected List<SpreadsheetReference> references;
+
+ @Override
+ public T addWorksheet(SpreadsheetWorksheet worksheet) {
+ this.worksheets.add(worksheet);
+ return self();
+ }
+
+ @Override
+ public T addReference(SpreadsheetReference reference) {
+ this.references.add(reference);
+ return self();
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/.classpath b/plugins/org.eclipse.epsilon.executors/.classpath
new file mode 100644
index 0000000..6a5eab8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.executors/.project b/plugins/org.eclipse.epsilon.executors/.project
new file mode 100644
index 0000000..272d59e
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.executors</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..b8947ec
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.m2e.core.prefs b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/plugins/org.eclipse.epsilon.executors/EPL-2.0.html b/plugins/org.eclipse.epsilon.executors/EPL-2.0.html
new file mode 100644
index 0000000..f5d138c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/EPL-2.0.html
@@ -0,0 +1,307 @@
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <title>Eclipse Public License - Version 2.0</title>
+ <style type="text/css">
+ body {
+ margin: 1.5em 3em;
+ }
+ h1{
+ font-size:1.5em;
+ }
+ h2{
+ font-size:1em;
+ margin-bottom:0.5em;
+ margin-top:1em;
+ }
+ p {
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+ }
+ ul, ol{
+ list-style-type:none;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>Eclipse Public License - v 2.0</h1>
+ <p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+ </p>
+ <h2 id="definitions">1. DEFINITIONS</h2>
+ <p>“Contribution” means:</p>
+ <ul>
+ <li>a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+ </li>
+ <li>
+ b) in the case of each subsequent Contributor:
+ <ul>
+ <li>i) changes to the Program, and</li>
+ <li>ii) additions to the Program;</li>
+ </ul>
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ “originates” from a Contributor if it was added to the Program by such
+ Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+ </li>
+ </ul>
+ <p>“Contributor” means any person or entity that Distributes the Program.</p>
+ <p>“Licensed Patents” mean patent claims licensable by a Contributor which
+ are necessarily infringed by the use or sale of its Contribution alone
+ or when combined with the Program.
+ </p>
+ <p>“Program” means the Contributions Distributed in accordance with this
+ Agreement.
+ </p>
+ <p>“Recipient” means anyone who receives the Program under this Agreement
+ or any Secondary License (as applicable), including Contributors.
+ </p>
+ <p>“Derivative Works” shall mean any work, whether in Source Code or other
+ form, that is based on (or derived from) the Program and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship.
+ </p>
+ <p>“Modified Works” shall mean any work in Source Code or other form that
+ results from an addition to, deletion from, or modification of the
+ contents of the Program, including, for purposes of clarity any new file
+ in Source Code form that contains any contents of the Program. Modified
+ Works shall not include works that contain only declarations, interfaces,
+ types, classes, structures, or files of the Program solely in each case
+ in order to link to, bind by name, or subclass the Program or Modified
+ Works thereof.
+ </p>
+ <p>“Distribute” means the acts of a) distributing or b) making available
+ in any manner that enables the transfer of a copy.
+ </p>
+ <p>“Source Code” means the form of a Program preferred for making
+ modifications, including but not limited to software source code,
+ documentation source, and configuration files.
+ </p>
+ <p>“Secondary License” means either the GNU General Public License,
+ Version 2.0, or any later versions of that license, including any
+ exceptions or additional permissions as identified by the initial
+ Contributor.
+ </p>
+ <h2 id="grant-of-rights">2. GRANT OF RIGHTS</h2>
+ <ul>
+ <li>a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+ </li>
+ <li>b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if,
+ at the time the Contribution is added by the Contributor, such
+ addition of the Contribution causes such combination to be covered
+ by the Licensed Patents. The patent license shall not apply to any
+ other combinations which include the Contribution. No hardware per
+ se is licensed hereunder.
+ </li>
+ <li>c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the rights
+ and licenses granted hereunder, each Recipient hereby assumes sole
+ responsibility to secure any other intellectual property rights needed,
+ if any. For example, if a third party patent license is required to
+ allow Recipient to Distribute the Program, it is Recipient's
+ responsibility to acquire that license before distributing the Program.
+ </li>
+ <li>d) Each Contributor represents that to its knowledge it has sufficient
+ copyright rights in its Contribution, if any, to grant the copyright
+ license set forth in this Agreement.
+ </li>
+ <li>e) Notwithstanding the terms of any Secondary License, no Contributor
+ makes additional grants to any Recipient (other than those set forth
+ in this Agreement) as a result of such Recipient's receipt of the
+ Program under the terms of a Secondary License (if permitted under
+ the terms of Section 3).
+ </li>
+ </ul>
+ <h2 id="requirements">3. REQUIREMENTS</h2>
+ <p>3.1 If a Contributor Distributes the Program in any form, then:</p>
+ <ul>
+ <li>a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+ </li>
+ <li>
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ <ul>
+ <li>i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including warranties
+ or conditions of title and non-infringement, and implied warranties
+ or conditions of merchantability and fitness for a particular purpose;
+ </li>
+ <li>ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special, incidental
+ and consequential damages, such as lost profits;
+ </li>
+ <li>iii) does not attempt to limit or alter the recipients' rights in the
+ Source Code under section 3.2; and
+ </li>
+ <li>iv) requires any subsequent distribution of the Program by any party
+ to be under a license that satisfies the requirements of this section 3.
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>3.2 When the Program is Distributed as Source Code:</p>
+ <ul>
+ <li>a) it must be made available under this Agreement, or if the Program (i)
+ is combined with other material in a separate file or files made available
+ under a Secondary License, and (ii) the initial Contributor attached to
+ the Source Code the notice described in Exhibit A of this Agreement,
+ then the Program may be made available under the terms of such
+ Secondary Licenses, and
+ </li>
+ <li>b) a copy of this Agreement must be included with each copy of the Program.</li>
+ </ul>
+ <p>3.3 Contributors may not remove or alter any copyright, patent, trademark,
+ attribution notices, disclaimers of warranty, or limitations of liability
+ (‘notices’) contained within the Program from any copy of the Program which
+ they Distribute, provided that Contributors may add their own appropriate
+ notices.
+ </p>
+ <h2 id="commercial-distribution">4. COMMERCIAL DISTRIBUTION</h2>
+ <p>Commercial distributors of software may accept certain responsibilities
+ with respect to end users, business partners and the like. While this
+ license is intended to facilitate the commercial use of the Program, the
+ Contributor who includes the Program in a commercial product offering should
+ do so in a manner which does not create potential liability for other
+ Contributors. Therefore, if a Contributor includes the Program in a
+ commercial product offering, such Contributor (“Commercial Contributor”)
+ hereby agrees to defend and indemnify every other Contributor
+ (“Indemnified Contributor”) against any losses, damages and costs
+ (collectively “Losses”) arising from claims, lawsuits and other legal actions
+ brought by a third party against the Indemnified Contributor to the extent
+ caused by the acts or omissions of such Commercial Contributor in connection
+ with its distribution of the Program in a commercial product offering.
+ The obligations in this section do not apply to any claims or Losses relating
+ to any actual or alleged intellectual property infringement. In order to
+ qualify, an Indemnified Contributor must: a) promptly notify the
+ Commercial Contributor in writing of such claim, and b) allow the Commercial
+ Contributor to control, and cooperate with the Commercial Contributor in,
+ the defense and any related settlement negotiations. The Indemnified
+ Contributor may participate in any such claim at its own expense.
+ </p>
+ <p>For example, a Contributor might include the Program
+ in a commercial product offering, Product X. That Contributor is then a
+ Commercial Contributor. If that Commercial Contributor then makes performance
+ claims, or offers warranties related to Product X, those performance claims
+ and warranties are such Commercial Contributor's responsibility alone.
+ Under this section, the Commercial Contributor would have to defend claims
+ against the other Contributors related to those performance claims and
+ warranties, and if a court requires any other Contributor to pay any damages
+ as a result, the Commercial Contributor must pay those damages.
+ </p>
+ <h2 id="warranty">5. NO WARRANTY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT
+ WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+ WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+ MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
+ solely responsible for determining the appropriateness of using and
+ distributing the Program and assumes all risks associated with its
+ exercise of rights under this Agreement, including but not limited to the
+ risks and costs of program errors, compliance with applicable laws, damage
+ to or loss of data, programs or equipment, and unavailability or
+ interruption of operations.
+ </p>
+ <h2 id="disclaimer">6. DISCLAIMER OF LIABILITY</h2>
+ <p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED
+ BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY
+ LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS),
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+ GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ </p>
+ <h2 id="general">7. GENERAL</h2>
+ <p>If any provision of this Agreement is invalid or unenforceable under
+ applicable law, it shall not affect the validity or enforceability of the
+ remainder of the terms of this Agreement, and without further action by the
+ parties hereto, such provision shall be reformed to the minimum extent
+ necessary to make such provision valid and enforceable.
+ </p>
+ <p>If Recipient institutes patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Program itself
+ (excluding combinations of the Program with other software or hardware)
+ infringes such Recipient's patent(s), then such Recipient's rights granted
+ under Section 2(b) shall terminate as of the date such litigation is filed.
+ </p>
+ <p>All Recipient's rights under this Agreement shall terminate if it fails to
+ comply with any of the material terms or conditions of this Agreement and
+ does not cure such failure in a reasonable period of time after becoming
+ aware of such noncompliance. If all Recipient's rights under this Agreement
+ terminate, Recipient agrees to cease use and distribution of the Program
+ as soon as reasonably practicable. However, Recipient's obligations under
+ this Agreement and any licenses granted by Recipient relating to the
+ Program shall continue and survive.
+ </p>
+ <p>Everyone is permitted to copy and distribute copies of this Agreement,
+ but in order to avoid inconsistency the Agreement is copyrighted and may
+ only be modified in the following manner. The Agreement Steward reserves
+ the right to publish new versions (including revisions) of this Agreement
+ from time to time. No one other than the Agreement Steward has the right
+ to modify this Agreement. The Eclipse Foundation is the initial Agreement
+ Steward. The Eclipse Foundation may assign the responsibility to serve as
+ the Agreement Steward to a suitable separate entity. Each new version of
+ the Agreement will be given a distinguishing version number. The Program
+ (including Contributions) may always be Distributed subject to the version
+ of the Agreement under which it was received. In addition, after a new
+ version of the Agreement is published, Contributor may elect to Distribute
+ the Program (including its Contributions) under the new version.
+ </p>
+ <p>Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+ receives no rights or licenses to the intellectual property of any
+ Contributor under this Agreement, whether expressly, by implication,
+ estoppel or otherwise. All rights in the Program not expressly granted
+ under this Agreement are reserved. Nothing in this Agreement is intended
+ to be enforceable by any entity that is not a Contributor or Recipient.
+ No third-party beneficiary rights are created under this Agreement.
+ </p>
+ <h2 id="exhibit-a">Exhibit A – Form of Secondary Licenses Notice</h2>
+ <p>“This Source Code may also be made available under the following
+ Secondary Licenses when the conditions for such availability set forth
+ in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
+ version(s), and exceptions or additional permissions here}.”
+ </p>
+ <blockquote>
+ <p>Simply including a copy of this Agreement, including this Exhibit A
+ is not sufficient to license the Source Code under Secondary Licenses.
+ </p>
+ <p>If it is not possible or desirable to put the notice in a particular file,
+ then You may include the notice in a location (such as a LICENSE file in a
+ relevant directory) where a recipient would be likely to look for
+ such a notice.
+ </p>
+ <p>You may add additional accurate notices of copyright ownership.</p>
+ </blockquote>
+ </body>
+</html>
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.executors/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c5f3dcf
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/META-INF/MANIFEST.MF
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Executors
+Bundle-SymbolicName: org.eclipse.epsilon.executors
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Automatic-Module-Name: org.eclipse.epsilon.executors
+Export-Package: org.eclipse.epsilon.executors,
+ org.eclipse.epsilon.executors.ecl,
+ org.eclipse.epsilon.executors.egl,
+ org.eclipse.epsilon.executors.eol,
+ org.eclipse.epsilon.executors.etl,
+ org.eclipse.epsilon.executors.evl,
+ org.eclipse.epsilon.executors.model,
+ org.eclipse.epsilon.executors.util
+Require-Bundle: org.slf4j.api;bundle-version="1.7.2",
+ org.eclipse.epsilon.common;bundle-version="1.6.0",
+ org.eclipse.epsilon.eol.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.egl.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.etl.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.evl.engine;bundle-version="1.6.0",
+ org.eclipse.epsilon.ecl.engine
diff --git a/plugins/org.eclipse.epsilon.executors/build.properties b/plugins/org.eclipse.epsilon.executors/build.properties
new file mode 100644
index 0000000..a505bb8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/build.properties
@@ -0,0 +1,3 @@
+source.. = src
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/AbstractLanguageExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/AbstractLanguageExecutor.java
new file mode 100644
index 0000000..7f2a4e4
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/AbstractLanguageExecutor.java
@@ -0,0 +1,505 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors;
+
+import static org.eclipse.epsilon.common.util.OperatingSystem.getJavaVersion;
+import static org.eclipse.epsilon.common.util.OperatingSystem.getOsNameAndVersion;
+import static org.eclipse.epsilon.common.util.profiling.BenchmarkUtils.getCpuName;
+import static org.eclipse.epsilon.common.util.profiling.BenchmarkUtils.getNumberOfHardwareThreads;
+import static org.eclipse.epsilon.common.util.profiling.BenchmarkUtils.getTime;
+
+import java.nio.file.Path;
+import java.time.Duration;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Optional;
+import java.util.Set;
+
+import org.eclipse.epsilon.common.parse.problem.ParseProblem;
+import org.eclipse.epsilon.eol.IEolModule;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.eol.models.IModel;
+import org.eclipse.epsilon.eol.types.IToolNativeTypeDelegate;
+import org.eclipse.epsilon.erl.IErlModule;
+import org.eclipse.epsilon.erl.dom.NamedRule;
+import org.eclipse.epsilon.erl.execute.RuleProfiler;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A base class to provide generic executor API for all engines.
+ *
+ * @author Horacio Hoyos Rodriguez
+ *
+ */
+public abstract class AbstractLanguageExecutor implements IEpsilonLanguageExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(AbstractLanguageExecutor.class);
+
+ /**
+ * The Epsilon Module that implements the specific language engine.
+ */
+ protected final IEolModule module;
+
+ /**
+ * The Script to be executed. Alternatively a block of code can be provided, see {@link #code}
+ */
+ protected Path script;
+
+ /**
+ * The Code to be executed. Alternatively a script file can be provided, see {@link #script}.
+ */
+ protected String code;
+
+ /**
+ * The runtime parameters.
+ */
+ protected Map<String, Object> parameters = new HashMap<>(4);
+
+ /**
+ * The Models used during execution.
+ */
+ protected Set<IModel> models = new HashSet<>(4);
+
+ /**
+ * The Result of the execution. Not all models provide a result.
+ */
+ protected Object result;
+
+ /**
+ * The Native Type delegates used during execution.
+ */
+ protected Set<IToolNativeTypeDelegate> nativeDelegates = new HashSet<>(8);
+
+ /**
+ * The Dispose Models flag indicates if models will be disposed after execution.
+ */
+ protected boolean disposeModels = true;
+
+ /**
+ * The Profile Execution flag indicates if the execution should be measured.
+ */
+ protected boolean profileExecution = false;
+
+
+ protected ExecutionInfo executionInfo;
+
+ /**
+ * Instantiates a new Abstract executor engine.
+ *
+ * @param module the module
+ */
+ protected AbstractLanguageExecutor(final IEolModule module) {
+ this.module = module;
+ }
+
+ @Override
+ public ExecutionInfo getExecutionInfo() {
+ return executionInfo;
+ }
+
+ @Override
+ public IEolModule getModule() {
+ return module;
+ }
+
+ @Override
+ public String getName() {
+ return module.getClass().getSimpleName();
+ }
+
+ @Override
+ public String getCode() {
+ return code;
+ }
+
+ @Override
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ @Override
+ public Path getScript() {
+ return script;
+ }
+
+ @Override
+ public void setScript(Path script) {
+ this.script = script;
+ }
+
+ @Override
+ public Set<IModel> getModels() {
+ return Collections.unmodifiableSet(models);
+ }
+
+ @Override
+ public boolean addModel(IModel model) {
+ return models.add(model);
+ }
+
+ @Override
+ public boolean addModels(Collection<IModel> models) {
+ return this.models.addAll(models);
+ }
+
+ @Override
+ public boolean removeModel(IModel model) {
+ return models.remove(model);
+ }
+
+ @Override
+ public boolean removeModels(Collection<IModel> models) {
+ return this.models.removeAll(models);
+ }
+
+ @Override
+ public Object getResult() {
+ return result;
+ }
+
+ /**
+ * A class that keeps track of the execution durations of the different stages of execution, and
+ * about the execution of the scripts and its rules (if rule based langauge).
+ * @author Horacio Hoyos Rodriguez
+ *
+ */
+ public static class ExecutionInfo {
+ private static String logMessagesSeparator = "-----------------------------------------------------";
+ private final String osNameAndVersion;
+ private final String javaVersion;
+ private final String cpuName;
+ private final int logicalProcessors;
+ private final String date;
+ private Long startNanos;
+ /**
+ * The measured execution information.
+ */
+ protected Map<String, Duration> profiledStages = new HashMap<>();
+ protected Map<String, Duration> profiledRules = new HashMap<>();
+ protected Map<String, Long> started = new HashMap<>();
+ private Duration duration;
+
+ ExecutionInfo() {
+ osNameAndVersion = getOsNameAndVersion();
+ javaVersion = getJavaVersion();
+ cpuName = getCpuName();
+ logicalProcessors = getNumberOfHardwareThreads();
+ date = getTime();
+ }
+
+ void logStart() {
+ startNanos = System.nanoTime();
+ logger.info(buildLines(
+ osNameAndVersion,
+ javaVersion,
+ cpuName,
+ "Logical processors: " + logicalProcessors,
+ "Starting execution at " + date,
+ logMessagesSeparator
+ ));
+ }
+
+ void logEnd() throws EpsilonExecutorException {
+ long endTimeNanos = System.nanoTime();
+ this.duration = Duration.ofNanos(endTimeNanos-startNanos);
+ logger.info(buildLines("",
+ "Profiled processes:",
+ profiledStages.entrySet().stream().map(e -> String.format("%s:%s", e.getKey(), e.getValue())),
+ "Finished execution at " + getTime(),
+ logMessagesSeparator
+ ));
+ logger.info(buildLines("",
+ "Profiled rules:",
+ profiledRules.entrySet().stream().map(e -> String.format("%s:%s", e.getKey(), e.getValue())),
+ logMessagesSeparator
+ ));
+
+ }
+
+ String buildLines(Object... lines) {
+ StringBuilder linesAsStr = new StringBuilder();
+ String nL = System.lineSeparator();
+ for (Object line : lines) {
+ linesAsStr.append(line).append(nL);
+ }
+ return linesAsStr.toString();
+ }
+
+ void startStage(String name) {
+ started.put(name, System.nanoTime());
+ }
+
+ void endStage(String name) {
+ long endTimeNanos = System.nanoTime();
+ Long startTime = started.getOrDefault(name, endTimeNanos);
+ profiledStages.put(name, Duration.ofNanos(endTimeNanos-startTime));
+ }
+
+ void endModule(IEolModule module) {
+ if (module instanceof IErlModule) {
+ RuleProfiler ruleProfiler = ((IErlModule)module).getContext().getExecutorFactory().getRuleProfiler();
+ // Fixme Duplicate names?
+ for (Entry<NamedRule, Duration> entry : ruleProfiler.getExecutionTimes().entrySet()) {
+ Duration oldValue = profiledRules.put(entry.getKey().getName(), entry.getValue());
+ if (oldValue != null) {
+ System.err.println("Value for rule " + entry.getKey().getName() + " was replaced.");
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the duration of the "prepareExecution" stage. A negative value indicates that the
+ * stage was not signalled as finished.
+ * @return
+ */
+ public Optional<Duration> getPrepareExecutionDuration() {
+ return Optional.ofNullable(profiledStages.get("prepareExecution"));
+ }
+
+ /**
+ * Return the duration of the "preProcess" stage. A negative value indicates that the
+ * stage was not signalled as finished.
+ * @return
+ */
+ public Optional<Duration> getPreProcessDuration() {
+ return Optional.ofNullable(profiledStages.get("preProcess"));
+ }
+
+ /**
+ * Return the duration of the "postProcess" stage. A negative value indicates that the
+ * stage was not signalled as finished.
+ * @return
+ */
+ public Optional<Duration> getPostProcessDuration() {
+ return Optional.ofNullable(profiledStages.get("postProcess"));
+ }
+
+ /**
+ * Return the duration of the Epsilon module execution. A negative value indicates that the
+ * stage was not signalled as finished.
+ * @return
+ */
+ public Optional<Duration> getScrpitExecutionDuration() {
+ return Optional.ofNullable(profiledStages.get("execute"));
+ }
+
+ public Optional<Duration> getTotalDuration() {
+ return Optional.ofNullable(this.duration);
+ }
+
+ public Optional<Duration> getRuleDuration(String name) {
+ return Optional.ofNullable(profiledRules.get(name));
+ }
+
+ public Iterator<Entry<String, Duration>> getRulesDurations() {
+ return profiledRules.entrySet().iterator();
+ }
+
+
+ }
+
+ protected void preProfile() {
+ executionInfo = new ExecutionInfo();
+ executionInfo.logStart();
+ }
+
+ protected void prepareExecution() throws EpsilonExecutorException {
+ if (profileExecution) {
+ executionInfo.startStage("prepareExecution");
+ }
+ try {
+ if (getScript() != null) {
+ module.parse(getScript().toFile());
+ }
+ else if (getCode() != null) {
+ module.parse(getCode());
+ }
+ else {
+ throw new EpsilonExecutorException("No script or code to execute");
+ }
+ }
+ catch (Exception e) {
+ logger.error("Failed to parse script: {}", getScript(), e);
+ throw new EpsilonExecutorException("Failed to parse script or code", e);
+ }
+
+ if (!module.getParseProblems().isEmpty()) {
+ logger.error("Parse errors occurred");
+ System.err.println("Parse errors occurred...");
+ for (ParseProblem problem : module.getParseProblems()) {
+ System.err.println(problem);
+ }
+ throw new EpsilonExecutorException("Parse errors occurred.");
+ }
+
+ logger.info("Adding models to context.");
+ for (IModel model : getModels()) {
+ module.getContext().getModelRepository().addModel(model);
+ }
+ logger.info("Adding parameters to context.");
+ module.getContext().getFrameStack().put(parameters, true);
+
+ logger.info("Adding Native Type Delegates");
+ module.getContext().getNativeTypeDelegates().addAll(nativeDelegates);
+ if (profileExecution) {
+ executionInfo.endStage("prepareExecution");
+ }
+ }
+
+ @Override
+ public final void run() throws RuntimeException {
+ IEpsilonLanguageExecutor.super.run();
+ }
+
+ @Override
+ public final void execute() throws EpsilonExecutorException {
+ logger.info("Executing engine.");
+ if (profileExecution) {
+ preProfile();
+ }
+ prepareExecution();
+
+ logger.info("Pre-process execution");
+ if (profileExecution) {
+ executionInfo.startStage("preProcess");
+ }
+ preProcess();
+ if (profileExecution) {
+ executionInfo.endStage("preProcess");
+ }
+ try {
+ if (profileExecution) {
+ executionInfo.startStage("execute");
+ }
+ result = executeInternal();
+ }
+ catch (EolRuntimeException e) {
+ String msg = "Error executing the script";
+ logger.error(msg, e);
+ throw new EpsilonExecutorException(msg, e);
+ }
+ finally {
+ if (profileExecution) {
+ executionInfo.endStage("execute");
+ }
+ }
+ logger.info("Post-process execution.");
+ if (profileExecution) {
+ executionInfo.startStage("postProcess");
+ }
+ postProcess();
+ if (profileExecution) {
+ executionInfo.endStage("postProcess");
+ }
+
+ if (profileExecution) {
+ executionInfo.endModule(module);
+ executionInfo.logEnd();
+ }
+ }
+
+ /**
+ * Execute the module.
+ *
+ * @return the object
+ * @throws EolRuntimeException the eol runtime exception
+ */
+ abstract protected Object executeInternal() throws EolRuntimeException;
+
+
+ @Override
+ public void dispose() {
+ if (disposeModels) {
+ logger.info("Disposing models");
+ module.getContext().getModelRepository().dispose();
+ }
+ else {
+ logger.info("Removing models from context models");
+ module.getContext().getModelRepository().getModels().clear();
+ }
+ models.clear();
+ parameters.clear();
+ logger.info("Dispose context");
+ module.getContext().dispose();
+ }
+
+ @Override
+ public Map<String, ?> getParameters() {
+ return Collections.unmodifiableMap(parameters);
+ }
+
+ @Override
+ public void addParameters(Map<String, Object> parameters) {
+ this.parameters.putAll(parameters);
+ }
+
+ @Override
+ public boolean addParameter(String name, Object value) {
+ return parameters.put(name, value) != null;
+ }
+
+ @Override
+ public boolean removeParameter(String name) {
+ return parameters.remove(name) != null;
+ }
+
+ @Override
+ public Set<IToolNativeTypeDelegate> getNativeDelegates() {
+ return Collections.unmodifiableSet(nativeDelegates);
+ }
+
+ @Override
+ public boolean addNativeDelegates(Collection<IToolNativeTypeDelegate> delegates) {
+ return this.nativeDelegates.addAll(delegates);
+ }
+
+ @Override
+ public boolean addNativeDelegate(IToolNativeTypeDelegate delegate) {
+ return nativeDelegates.add(delegate);
+
+ }
+
+ @Override
+ public boolean removeNativeDelegates(Collection<IToolNativeTypeDelegate> delegates) {
+ return this.nativeDelegates.removeAll(delegates);
+ }
+
+ @Override
+ public boolean removeNativeDelegate(IToolNativeTypeDelegate delegate) {
+ return nativeDelegates.remove(delegate);
+ }
+
+ @Override
+ public boolean isDisposeModels() {
+ return disposeModels;
+ }
+
+ @Override
+ public void setDisposeModels(boolean disposeModels) {
+ this.disposeModels = disposeModels;
+ }
+
+ @Override
+ public boolean isProfilingEnabled() {
+ return profileExecution;
+ }
+
+ @Override
+ public void setProfilingEnabled(boolean profileExecution) {
+ this.profileExecution = profileExecution;
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonEngineExecutorFactory.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonEngineExecutorFactory.java
new file mode 100644
index 0000000..d211d43
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonEngineExecutorFactory.java
@@ -0,0 +1,48 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors;
+
+import org.eclipse.epsilon.executors.ecl.EclExecutor;
+import org.eclipse.epsilon.executors.egl.EglExecutor;
+import org.eclipse.epsilon.executors.egl.EgxExecutor;
+import org.eclipse.epsilon.executors.eol.EolExecutor;
+import org.eclipse.epsilon.executors.etl.EtlExecutor;
+import org.eclipse.epsilon.executors.evl.EvlExecutor;
+
+
+/**
+ * A factory for the different executors.
+ *
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EpsilonEngineExecutorFactory {
+
+ @SuppressWarnings("unchecked")
+ public <E extends IEpsilonLanguageExecutor> E getExecutor(String engineName) {
+
+ switch (engineName.substring(0, 3).toUpperCase()) {
+ case "ECL":
+ return (E) new EclExecutor();
+ case "EGL":
+ return (E) new EglExecutor();
+ case "EGX":
+ return (E) new EgxExecutor();
+ case "EOL":
+ return (E) new EolExecutor();
+ case "ETL":
+ return (E) new EtlExecutor();
+ case "EVL":
+ return (E) new EvlExecutor();
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonExecutorException.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonExecutorException.java
new file mode 100644
index 0000000..b168fc1
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/EpsilonExecutorException.java
@@ -0,0 +1,62 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors;
+
+/**
+ * A base exception to wrap different exceptions that can be
+ * thrown during execution of an executor
+ *
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EpsilonExecutorException extends Exception {
+
+ private static final long serialVersionUID = -7589325573726453221L;
+
+
+ /**
+ * Instantiates a new epsilon executor exception.
+ */
+ public EpsilonExecutorException() {
+ super();
+ }
+
+
+ /**
+ * Instantiates a new epsilon executor exception.
+ *
+ * @param message the message
+ * @param cause the cause
+ */
+ public EpsilonExecutorException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+
+ /**
+ * Instantiates a new epsilon executor exception.
+ *
+ * @param message the message
+ */
+ public EpsilonExecutorException(String message) {
+ super(message);
+ }
+
+
+ /**
+ * Instantiates a new epsilon executor exception.
+ *
+ * @param cause the cause
+ */
+ public EpsilonExecutorException(Throwable cause) {
+ super(cause);
+ }
+
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/IEpsilonLanguageExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/IEpsilonLanguageExecutor.java
new file mode 100644
index 0000000..7a99d28
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/IEpsilonLanguageExecutor.java
@@ -0,0 +1,305 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors;
+
+import org.eclipse.epsilon.common.util.profiling.ProfileDiagnostic;
+import org.eclipse.epsilon.eol.IEolModule;
+import org.eclipse.epsilon.eol.models.IModel;
+import org.eclipse.epsilon.eol.types.IToolNativeTypeDelegate;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor.ExecutionInfo;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * The IEpsilonLanguageExecutor defines a common executor API that the different Epsilon languages
+ * can use to facilitate running Epsilon script in standalone applications.
+ * The API allows adding the source script/code, models used for execution, and any parameters and
+ * native delegates that should be accessible during execution.
+ * <p>
+ * The API provides 4 phases to the execution of an Epsilon Module: preProcess, execute,
+ * postProcess, and dispose.
+ * The 4 phases should provide enough flexibility for specific executors to correctly prepare
+ * execution, execute, do any post execution processing and finally dispose the executor.
+ *
+ * @author Horacio Hoyos Rodriguez
+ *
+ */
+public interface IEpsilonLanguageExecutor extends Runnable {
+
+ /**
+ * Get the Dispose Models Flag
+ * @return the value of the Dispose Models Flag
+ */
+ boolean isDisposeModels();
+
+ /**
+ * Set the value of the Dispose Models Flag
+ * @param disposeModels
+ */
+ void setDisposeModels(boolean disposeModels);
+
+ /**
+ * Whether profiling of execution times is enabled.
+ * @return The value of the flag.
+ */
+ boolean isProfilingEnabled();
+
+ /**
+ * Enables or disables profiling of execution times based on the flag.
+ * @param profileExecution The value of the flag.
+ */
+ void setProfilingEnabled(boolean profileExecution);
+
+ /**
+ * Get the ExecutionInfo for the current module.
+ * @return
+ */
+ ExecutionInfo getExecutionInfo();
+
+ /**
+ * The module used by the executor
+ * @return
+ */
+ IEolModule getModule();
+
+ /**
+ * Get a human readable name of the executor
+ * @return The name of the executor
+ */
+ String getName();
+
+ /**
+ * Get the code being executed.
+ * @return
+ */
+ String getCode();
+
+ /**
+ * Provive the code to execute as a string
+ * @param code A String containing the code to execute
+ */
+ void setCode(String code);
+
+ /**
+ * Assign script to execute.
+ *
+ * @param script the path to the script
+ */
+ void setScript(Path script);
+
+ default void setScript(String scriptPath) {
+ setScript(Paths.get(scriptPath));
+ }
+
+ /**
+ * Get the script assigned to the executor
+ * @return
+ */
+ Path getScript();
+
+ /**
+ * Returns an unmodifiable view of the models used by the executor.
+ *
+ * @return a view of the list of models
+ */
+ Set<IModel> getModels();
+
+ /**
+ * Add a model to the executor. Models added to the executor should already
+ * be loaded (@link IModel.load())
+ *
+ * @param model the model.
+ * @return <code>true</code> if the model could be added.
+ */
+ boolean addModel(IModel model);
+
+ default boolean addModels(IModel... models) {
+ boolean result = models != null;
+ if (result) for (IModel model : models) {
+ result &= addModel(model);
+ }
+ return result;
+ }
+
+ /**
+ * Adds all of the models in the specified collection to this executor. Models
+ * added to the executor should already be loaded (@link IModel.load())
+ *
+ * @param models the models to add.
+ * @return
+ * @throws EpsilonExecutorException
+ */
+ default boolean addModels(Collection<IModel> models) {
+ boolean result = models != null;
+ if (result) for (IModel model : models) {
+ result &= addModel(model);
+ }
+ return result;
+ }
+
+ /**
+ * Remove a model from the executor.
+ *
+ * @param model
+ * @return
+ */
+ boolean removeModel(IModel model);
+
+ default boolean removeModels(IModel... models) {
+ boolean result = models != null;
+ if (result) for (IModel model : models) {
+ result &= removeModel(model);
+ }
+ return result;
+ }
+
+ /**
+ * Removes from this executor all of its models that are contained in the specified
+ * collection.
+ * @param models
+ * @return
+ */
+ default boolean removeModels(Collection<IModel> models) {
+ boolean result = models != null;
+ if (result) for (IModel model : models) {
+ result &= removeModel(model);
+ }
+ return result;
+ }
+
+ /**
+ * Get the result of the execution
+ * @return
+ */
+ Object getResult();
+
+ /**
+ * This method will be invoked before execution of the script
+ */
+ default void preProcess() {
+
+ }
+
+ /**
+ * This method will be invoked after execution of the script
+ */
+ default void postProcess() {
+
+ }
+
+ /**
+ * Execute the provided script, against the list of models using the executor's module.
+ * @throws EpsilonExecutorException
+ */
+ void execute() throws EpsilonExecutorException;
+
+ /**
+ * Same as {@link #execute()} without checked exception.
+ * @throws RuntimeException A wrapped {@linkplain EpsilonExecutorException}
+ */
+ @Override
+ default void run() throws RuntimeException {
+ try {
+ execute();
+ }
+ catch (EpsilonExecutorException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+
+ /**
+ * Disposes the executor. Implementing classes should perform any clean actions.
+ * This method should be invoked after execute.
+ * It is not invoked automatically because in some cases the user may need
+ * to access execution information that is still in the executor's context.
+ * The disposeModels flag determines if the models used by the module are also
+ * disposed (default true).
+ */
+ void dispose();
+
+ /**
+ * Returns an unmodifiable view of the parameters used by the executor
+ * @return the parameters
+ */
+ Map<String, ?> getParameters();
+
+ /**
+ * Add a parameter to the executor. Parameters are used to provide additional
+ * information to the execution. In an Eclipse launch configuration these are
+ * defined in the parameters tab.
+ *
+ * The {@link org.eclipse.epsilon.executors.util.ParameterUtil} provides
+ * an API to facilitate creation of parameters.
+ * @param name the parameter name
+ * @param value the parameter value
+ */
+ boolean addParameter(String name, Object value);
+
+ /**
+ * Add a collection of parameters to the executor.
+ * @param parameters the parameters
+ * @see #addParameter(String, Object)
+ */
+ void addParameters(Map<String, Object> parameters);
+
+ /**
+ * Remove a parameter from the executor
+ * @param parameter the parameter name
+ * @see #addParameter(String, Object)
+ */
+ boolean removeParameter(String parameter);
+
+ /**
+ * Remove a collection of parameters from the executor.
+ * @param parameters the parameters
+ * @see #addParameter(String, Object)
+ */
+ default void removeParameters(Collection<String> parameters) {
+ parameters.forEach(this::removeParameter);
+ }
+
+ /**
+ * Return an unmodifiable view of the Native Type Delegates used by the executor
+ * @return
+ */
+ Set<IToolNativeTypeDelegate> getNativeDelegates();
+
+ /**
+ * Add Native Type Delegates to the executor
+ * @param delegates A collection of IToolNativeTypeDelegate to add
+ * @return
+ */
+ boolean addNativeDelegates(Collection<IToolNativeTypeDelegate> delegates);
+
+ /**
+ * Add a Native Type Delegates to the executor
+ * @param delegate The IToolNativeTypeDelegate to add
+ * @return
+ */
+ boolean addNativeDelegate(IToolNativeTypeDelegate delegate);
+
+ /**
+ * Remove Native Type Delegates from the executor
+ * @param delegates A collection of IToolNativeTypeDelegate to remove
+ * @return
+ */
+ boolean removeNativeDelegates(Collection<IToolNativeTypeDelegate> delegates);
+
+ /**
+ * Remove a Native Type Delegate from the executor
+ * @param delegate The IToolNativeTypeDelegate to remove
+ * @return
+ */
+ boolean removeNativeDelegate(IToolNativeTypeDelegate delegate);
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/EclExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/EclExecutor.java
new file mode 100644
index 0000000..199de60
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/EclExecutor.java
@@ -0,0 +1,54 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.ecl;
+
+import org.eclipse.epsilon.ecl.EclModule;
+import org.eclipse.epsilon.ecl.IEclModule;
+import org.eclipse.epsilon.ecl.trace.MatchTrace;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ *
+ * @author Sina Madani
+ * @since 1.6
+ */
+public class EclExecutor extends AbstractLanguageExecutor implements IEclExecutor {
+
+ static final Logger logger = LoggerFactory.getLogger(EclExecutor.class);
+
+ public EclExecutor() {
+ this(new EclModule());
+ }
+
+ public EclExecutor(IEclModule module) {
+ super(module);
+ logger.info("Creating the EclStandaloneEngine");
+ }
+
+ @Override
+ protected MatchTrace executeInternal() throws EolRuntimeException {
+ logger.info("Executing ECL script.");
+ return getModule().execute();
+ }
+
+ @Override
+ public MatchTrace getResult() {
+ return (MatchTrace) result;
+ }
+
+ @Override
+ public IEclModule getModule() {
+ return (IEclModule) module;
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/IEclExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/IEclExecutor.java
new file mode 100644
index 0000000..0bab31f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/ecl/IEclExecutor.java
@@ -0,0 +1,33 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.ecl;
+
+import org.eclipse.epsilon.ecl.IEclModule;
+import org.eclipse.epsilon.ecl.trace.MatchTrace;
+import org.eclipse.epsilon.executors.IEpsilonLanguageExecutor;
+
+/**
+ *
+ *
+ * @author Sina Madani
+ * @since 1.6
+ */
+public interface IEclExecutor extends IEpsilonLanguageExecutor {
+
+ @Override
+ IEclModule getModule();
+
+ @Override
+ MatchTrace getResult();
+
+ default MatchTrace getMatchTrace() {
+ return getResult();
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EglExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EglExecutor.java
new file mode 100644
index 0000000..769cff3
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EglExecutor.java
@@ -0,0 +1,43 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.egl;
+
+import org.eclipse.epsilon.egl.EglTemplateFactory;
+import org.eclipse.epsilon.egl.EglTemplateFactoryModuleAdapter;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The EGL executor
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EglExecutor extends AbstractLanguageExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(EglExecutor.class);
+
+ public EglExecutor() {
+ super(new EglTemplateFactoryModuleAdapter(new EglTemplateFactory()));
+ logger.info("Creating the EglStandaloneEngine");
+ }
+
+ @Override
+ public void postProcess() {
+ System.out.println(result);
+ }
+
+ @Override
+ protected String executeInternal() throws EolRuntimeException {
+ logger.info("Executing EGL template.");
+ return (String) getModule().execute();
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EgxExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EgxExecutor.java
new file mode 100644
index 0000000..76e52ee
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/EgxExecutor.java
@@ -0,0 +1,47 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.egl;
+
+import org.eclipse.epsilon.egl.EglTemplateFactory;
+import org.eclipse.epsilon.egl.EgxModule;
+import org.eclipse.epsilon.egl.IEgxModule;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The EGX executor
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EgxExecutor extends AbstractLanguageExecutor implements IEgxExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(EgxExecutor.class);
+
+ public EgxExecutor() {
+ this(new EgxModule(new EglTemplateFactory()));
+ }
+
+ public EgxExecutor(IEgxModule module) {
+ super(module);
+ logger.info("Creating the EgxStandaloneEngine");
+ }
+
+ @Override
+ protected Object executeInternal() throws EolRuntimeException {
+ logger.info("Executing EGX Script.");
+ return module.execute();
+ }
+
+ @Override
+ public IEgxModule getModule() {
+ return (IEgxModule) super.getModule();
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/IEgxExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/IEgxExecutor.java
new file mode 100644
index 0000000..4fb0c79
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/egl/IEgxExecutor.java
@@ -0,0 +1,26 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.egl;
+
+import org.eclipse.epsilon.egl.IEgxModule;
+import org.eclipse.epsilon.executors.IEpsilonLanguageExecutor;
+
+/**
+ *
+ *
+ * @author Sina Madani
+ * @since 1.6
+ */
+public interface IEgxExecutor extends IEpsilonLanguageExecutor {
+
+ @Override
+ IEgxModule getModule();
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/EolExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/EolExecutor.java
new file mode 100644
index 0000000..2b0e171
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/EolExecutor.java
@@ -0,0 +1,88 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.eol;
+
+import java.util.Collections;
+import java.util.List;
+import org.eclipse.epsilon.eol.IEolModule;
+import org.eclipse.epsilon.eol.concurrent.EolModuleParallel;
+import org.eclipse.epsilon.eol.dom.Operation;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The EOL executor
+ *
+ * By default the complete EOL script is executed. Alternatively, a specific operation can be
+ * invoked by setting the desired operationName name (see {@link #setOperationName(String)}).
+ *
+ * Additionally, the {@link #setOperationArguments(List)} method can be used to provide a list of
+ * arguments to use for invocation of the operation. The arguments are considered to be in the same
+ * order and of the correct type of the operation signature.
+ *
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EolExecutor extends AbstractLanguageExecutor implements IEolExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(EolExecutor.class);
+
+ private String operationName = "";
+ private List<Object> arguments = Collections.emptyList();
+ private EolMode mode = EolMode.COMPLETE;
+
+ public EolExecutor() {
+ this(new EolModuleParallel());
+ }
+
+ public EolExecutor(IEolModule module) {
+ super(module);
+ logger.info("Creating the EolStandaloneEngine");
+ }
+
+ @Override
+ protected Object executeInternal() throws EolRuntimeException {
+ switch(mode) {
+ case COMPLETE:
+ logger.info("Executing complete EOL script.");
+ return module.execute();
+ case OPERATION:
+ if (operationName.length() == 0) {
+ throw new EolRuntimeException("Can not invoke executor in OPERATION mode without an operation name assigned.");
+ }
+ logger.info("Executing EOL operation {} with arguments: {}.", operationName, arguments);
+ Operation operation = module.getDeclaredOperations().getOperation(operationName);
+ return operation.execute(null, arguments, module.getContext());
+ }
+ return null;
+ }
+
+ @Override
+ public void setOperationName(String operationName) {
+ this.operationName = operationName;
+ if (operationName.length() > 0) {
+ this.mode = EolMode.OPERATION;
+ }
+ else {
+ this.mode = EolMode.COMPLETE;
+ }
+ }
+
+ @Override
+ public void setOperationArguments(List<Object> arguments) {
+ this.arguments = arguments;
+ }
+
+ @Override
+ public void setMode(EolMode mode) {
+ this.mode = mode;
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/IEolExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/IEolExecutor.java
new file mode 100644
index 0000000..086e5f2
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/eol/IEolExecutor.java
@@ -0,0 +1,60 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.eol;
+
+import org.eclipse.epsilon.executors.IEpsilonLanguageExecutor;
+import java.util.List;
+
+/**
+ * The IEolExecutor API provides additional methods to invoke a single operation inside an EOL
+ * script. The desired operation can be set using {@link #setOperationName(String)} and any
+ * required parameters for the operation passed via {@link #setOperationArguments(List)}. Setting
+ * the operation name with a non-empty string will set the execution mode to {@link EolMode#OPERATION}.
+ * Executing in {@link EolMode#OPERATION} without previously setting the operation name
+ * (via {@link #setOperationName(String)} will result in an {@link EolRuntimeException}.
+ *
+ * Setting the operation name to an empty string will result in the execution mode to change to
+ * {@link EolMode#COMPLETE}. Alternatively the {@link #setMode(EolMode)} method can be used to
+ * change the execution mode.
+ *
+ * @author Horacio Hoyos Rodriguez
+ *
+ */
+public interface IEolExecutor extends IEpsilonLanguageExecutor {
+
+ public static enum EolMode {
+ COMPLETE,
+ OPERATION
+ }
+
+ /**
+ * Set the operation name to invoke. Arguments to invoke the operation
+ * can be provided via {@link #setOperationArguments(List)}
+ *
+ * @param operationName the operation name
+ */
+ void setOperationName(String operationName);
+
+ /**
+ * Set any parameters to pass to the operation being invoked. The operation
+ *
+ * @param arguments
+ */
+ void setOperationArguments(List<Object> arguments);
+
+ /**
+ * Set the executor to "complete script mode", where the whole script as opposed to a single
+ * operation is run.
+ * <p>
+ * If the mode is set to {@link EolMode#OPERATION} and no operation name has been set
+ */
+ void setMode(EolMode mode);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlExecutor.java
new file mode 100644
index 0000000..fd6db40
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlExecutor.java
@@ -0,0 +1,54 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.etl;
+
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.etl.EtlModule;
+import org.eclipse.epsilon.etl.IEtlModule;
+import org.eclipse.epsilon.etl.trace.TransformationTrace;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The ETL executor
+ *
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EtlExecutor extends AbstractLanguageExecutor implements IEtlExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(EtlExecutor.class);
+
+ public EtlExecutor() {
+ this(new EtlModule());
+ }
+
+ public EtlExecutor(IEtlModule module) {
+ super(module);
+ logger.info("Creating the EvlStandaloneEngine");
+ }
+
+ @Override
+ public IEtlModule getModule() {
+ return (IEtlModule) super.getModule();
+ }
+
+ @Override
+ protected TransformationTrace executeInternal() throws EolRuntimeException {
+ logger.info("Executing ETL script.");
+ return (TransformationTrace) getModule().execute();
+ }
+
+ @Override
+ public TransformationTrace getResult() {
+ return (TransformationTrace) super.getResult();
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.ecore b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.ecore
new file mode 100644
index 0000000..8fec375
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.ecore
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="EtlSimpleTrace" nsURI="http://www.eclipse.org/epsilon/etl/EtlSimpleTrace"
+ nsPrefix="etltr">
+ <eClassifiers xsi:type="ecore:EClass" name="Trace">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
+ eType="#//TraceLink" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TraceLink">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="sources" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="targets" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="description" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.emf b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.emf
new file mode 100644
index 0000000..b487f55
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/EtlSimpleTrace.emf
@@ -0,0 +1,12 @@
+@namespace(uri="http://www.eclipse.org/epsilon/etl/EtlSimpleTrace", prefix="etltr")
+package EtlSimpleTrace;
+
+class Trace {
+ val TraceLink[*] links;
+}
+
+class TraceLink {
+ ref EObject[*] sources;
+ ref EObject[*] targets;
+ attr String description;
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/IEtlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/IEtlExecutor.java
new file mode 100644
index 0000000..3b9a916
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/etl/IEtlExecutor.java
@@ -0,0 +1,63 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.etl;
+
+import org.eclipse.epsilon.etl.IEtlModule;
+import org.eclipse.epsilon.etl.trace.TransformationTrace;
+import org.eclipse.epsilon.executors.IEpsilonLanguageExecutor;
+
+/**
+ * The IEtlExecutor API provides additional methods to return the transformation trace and to store
+ * the trace as a model.
+ *
+ * @author Horacio Hoyos Rodriguez
+ *
+ * @param <M> the Module type
+ */
+public interface IEtlExecutor extends IEpsilonLanguageExecutor {
+
+ /**
+ * Wrapper method to return the trace.
+ *
+ * @return the transformation trace
+ */
+ default TransformationTrace getTransformationTrace() {
+ return (TransformationTrace) getResult();
+ }
+
+ @Override
+ IEtlModule getModule();
+
+// /**
+// * Save the transformation trace as an EMF model. The model conforms to the EtlSimpleTrace
+// * metamodel defined as:
+// * <pre>
+// * {@code
+// * @namespace(uri="http://www.eclipse.org/epsilon/etl/EtlSimpleTrace", prefix="etltr")
+// * package EtlSimpleTrace;
+// *
+// * class Trace {
+// * val TraceLink[*] links;
+// * }
+// *
+// * class TraceLink {
+// * ref EObject[*] sources;
+// * ref EObject[*] targets;
+// * attr String description;
+// * }
+// * }
+// * </pre>
+// * The metamodel can be retrieved via <code>IEtlExecutor.class.getResource("SimpleTrace.ecore")</code>.
+// *
+// * @param location The path where the model will be stored
+// */
+// public void saveTransformationTraceAsEmfModel(Path location);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java
new file mode 100644
index 0000000..65e2904
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/EvlExecutor.java
@@ -0,0 +1,96 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.evl;
+
+import java.util.Collection;
+import java.util.Set;
+import org.eclipse.epsilon.executors.AbstractLanguageExecutor;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.evl.IEvlModule;
+import org.eclipse.epsilon.evl.concurrent.EvlModuleParallelAnnotation;
+import org.eclipse.epsilon.evl.execute.UnsatisfiedConstraint;
+import org.eclipse.epsilon.evl.execute.context.IEvlContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The EVL executor
+ * @author Horacio Hoyos Rodriguez
+ */
+public class EvlExecutor extends AbstractLanguageExecutor implements IEvlExecutor {
+
+ private static final Logger logger = LoggerFactory.getLogger(EvlExecutor.class);
+
+ public EvlExecutor() {
+ this(new EvlModuleParallelAnnotation());
+ }
+
+ public EvlExecutor(IEvlModule module) {
+ super(module);
+ logger.info("Creating the EvlStandaloneEngine");
+ }
+
+ @Override
+ public void postProcess() {
+ logger.info("Retrieving unsatisfied Constraints.");
+ }
+
+ @Override
+ protected Collection<UnsatisfiedConstraint> executeInternal() throws EolRuntimeException {
+ logger.info("Executing EVL script.");
+ return getModule().execute();
+ }
+
+ @Override
+ public void dispose() {
+ logger.info("Disposing engine.");
+ super.dispose();
+ getResult().clear();
+ }
+
+ @Override
+ public IEvlModule getModule() {
+ return (IEvlModule) module;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Collection<UnsatisfiedConstraint> getResult() {
+ return (Collection<UnsatisfiedConstraint>) result;
+ }
+
+ /**
+ * Prints the validation results.
+ */
+ // FIXME Make a nicer print method!, e.g. something like log entries that can be consumed by other APIs
+ @Override
+ public void printResult() {
+ IEvlContext context = getModule().getContext();
+ Set<UnsatisfiedConstraint> unsatisfiedConstraints = context.getUnsatisfiedConstraints();
+ int numUnsatisfied = unsatisfiedConstraints.size();
+ if (numUnsatisfied > 0) {
+ logger.warn(String.format("There %s %s unsatisfied Constraint(s).",
+ numUnsatisfied > 1 ? "were" : "was",
+ numUnsatisfied));
+ for (UnsatisfiedConstraint uc : unsatisfiedConstraints) {
+ if (uc.getConstraint().isCritique()) {
+ logger.warn(uc.getMessage());
+ }
+ else {
+ logger.error(uc.getMessage());
+ }
+ }
+ }
+ else {
+ logger.info("All constraints have been satisfied.");
+ }
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/IEvlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/IEvlExecutor.java
new file mode 100644
index 0000000..8fdcc4b
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/IEvlExecutor.java
@@ -0,0 +1,44 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.evl;
+
+import java.util.Collection;
+
+import org.eclipse.epsilon.evl.IEvlModule;
+import org.eclipse.epsilon.evl.execute.UnsatisfiedConstraint;
+import org.eclipse.epsilon.executors.IEpsilonLanguageExecutor;
+
+/**
+ * The IEvlExecutor API provides additional methods to get the validation results (a collection
+ * of {@link UnsatisfiedConstraint}s) and to print the validation results.
+ *
+ */
+public interface IEvlExecutor extends IEpsilonLanguageExecutor {
+
+ @Override
+ Collection<UnsatisfiedConstraint> getResult();
+
+ /**
+ * Gets the unsatisfied constraints.
+ *
+ * @return the unsatisfied constraints
+ */
+ default Collection<UnsatisfiedConstraint> getUnsatisfiedConstraints() {
+ return (Collection<UnsatisfiedConstraint>) getResult();
+ }
+
+ @Override
+ IEvlModule getModule();
+
+ /**
+ * Prints the validation results.
+ */
+ void printResult();
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/ParallelEvlExecutor.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/ParallelEvlExecutor.java
new file mode 100644
index 0000000..fc84ec7
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/evl/ParallelEvlExecutor.java
@@ -0,0 +1,34 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.evl;
+
+import org.eclipse.epsilon.evl.concurrent.EvlModuleParallel;
+import org.eclipse.epsilon.evl.concurrent.EvlModuleParallelElements;
+
+/**
+ * Parallel EVL executor (parallelises everything by default).
+ *
+ * @author Sina Madani
+ * @since 1.6
+ */
+public class ParallelEvlExecutor extends EvlExecutor {
+
+ public ParallelEvlExecutor() {
+ this(new EvlModuleParallelElements());
+ }
+
+ public ParallelEvlExecutor(int parallelism) {
+ this(new EvlModuleParallelElements(parallelism));
+ }
+
+ public ParallelEvlExecutor(EvlModuleParallel module) {
+ super(module);
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/CachedModelBuilder.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/CachedModelBuilder.java
new file mode 100644
index 0000000..7a1535b
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/CachedModelBuilder.java
@@ -0,0 +1,30 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.epsilon.eol.models.IModel;
+
+/**
+ * Base class for Cached model builders
+ * @param <T>
+ * @param <M>
+ *
+ */
+public abstract class CachedModelBuilder<M extends IModel, T extends CachedModelBuilder<M, T>>
+ extends ModelBuilder<M, T> implements ICachedModelBuilder<M, T> {
+
+ protected boolean useCache = true;
+
+ @Override
+ public T useCache(boolean useCache) {
+ this.useCache = useCache;
+ return self();
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java
new file mode 100644
index 0000000..4bdccb9
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ICachedModelBuilder.java
@@ -0,0 +1,26 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.epsilon.eol.models.IModel;
+
+/**
+ * A model builder for models that support cache
+ * @param <T> The type of model builder
+ * @param <M> The type of model being built
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public interface ICachedModelBuilder<M extends IModel, T extends ICachedModelBuilder<M, T>> extends IModelBuilder<M, T> {
+
+ T useCache(boolean useCache);
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/IModelBuilder.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/IModelBuilder.java
new file mode 100644
index 0000000..3a9ead8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/IModelBuilder.java
@@ -0,0 +1,91 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import org.eclipse.epsilon.eol.models.IModel;
+
+import java.lang.reflect.ParameterizedType;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+/**
+ * A builder to build different type of EMC models.
+ *
+ * @param <M> The type of model being built
+ * @param <T> The type of model builder
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public interface IModelBuilder<M extends IModel, T extends IModelBuilder<M, T>> {
+
+ /**
+ * Utility method to return "this" that allows extending models to return an appropriate T
+ * @return the model builder
+ */
+ T self();
+
+ /**
+ * Return a human readable name for the builder. By default the name of the specific IModel returned by the builder
+ * is used.
+ * @return The name of the builder
+ */
+ default String getName() {
+ return ((Class<?>)
+ ((ParameterizedType)getClass().getGenericSuperclass())
+ .getActualTypeArguments()[1]).getName();
+ }
+
+ /**
+ * Set the model aliases
+ * @param aliases the aliases to use for the model
+ * @return the builder
+ */
+ T withAliases(String... aliases);
+
+ /**
+ * Store the model on disposal
+ * @param storeOnDisposal True to store the model
+ * @return the builder
+ */
+ T storeOnDisposal(boolean storeOnDisposal);
+
+ /**
+ * Read the model on load
+ * @param readOnLoad True to read the model
+ * @return the builder
+ */
+ T readOnLoad(boolean readOnLoad);
+
+ /**
+ * Use the provided name as the model name
+ * @param name The name for the model
+ * @return the builder
+ */
+ T withName(String name);
+
+ /**
+ * The Path of the model
+ * @param modelPath The Path of the model
+ * @return the builder
+ */
+ T withModelPath(Path modelPath);
+
+ default T withModelPath(String modelPath) {
+ return withModelPath(Paths.get(modelPath));
+ }
+
+ /**
+ * Build the model
+ * @return The M model configured based on the provided values.
+ * @throws Exception
+ */
+ M build() throws Exception;
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ModelBuilder.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ModelBuilder.java
new file mode 100644
index 0000000..fbf223a
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/model/ModelBuilder.java
@@ -0,0 +1,61 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.model;
+
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.Collection;
+import org.eclipse.epsilon.eol.models.IModel;
+
+/**
+ * Base class for the model builders.
+ *
+ * @author Horacio Hoyos Rodriguez
+ * @author Beatriz Sanchez Piña
+ */
+public abstract class ModelBuilder<M extends IModel, T extends ModelBuilder<M, T>> implements IModelBuilder<M, T> {
+
+ protected String name;
+ protected String modelUri;
+ protected Collection<String> aliases;
+ protected boolean storeOnDisposal = false;
+ protected boolean readOnLoad = true;
+
+ @Override
+ public T withAliases(String ... aliases) {
+ this.aliases = Arrays.asList(aliases);
+ return self();
+ }
+
+ @Override
+ public T storeOnDisposal(boolean storeOnDisposal) {
+ this.storeOnDisposal = storeOnDisposal;
+ return self();
+ }
+
+ @Override
+ public T readOnLoad(boolean readOnLoad) {
+ this.readOnLoad = readOnLoad;
+ return self();
+ }
+
+ @Override
+ public T withName(String name) {
+ this.name = name;
+ return self();
+ }
+
+ @Override
+ public T withModelPath(Path modelPath) {
+ this.modelUri = modelPath.toString();
+ return self();
+ }
+
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/BasePathResolver.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/BasePathResolver.java
new file mode 100644
index 0000000..3d4ca9f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/BasePathResolver.java
@@ -0,0 +1,37 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.util;
+
+import org.eclipse.epsilon.eol.models.IRelativePathResolver;
+
+/**
+ * A base path resolver that uses a prefix (basePath) to create full paths.
+ */
+public class BasePathResolver implements IRelativePathResolver {
+
+ private String basePath;
+
+ public BasePathResolver(String basePath) {
+ this.basePath = basePath;
+ }
+
+ public String getBasePath() {
+ return basePath;
+ }
+
+ public void setBasePath(String basePath) {
+ this.basePath = basePath;
+ }
+
+ @Override
+ public String resolve(String relativePath) {
+ return basePath + relativePath;
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/JavaRelativePathResolver.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/JavaRelativePathResolver.java
new file mode 100644
index 0000000..c8b3083
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/JavaRelativePathResolver.java
@@ -0,0 +1,80 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.util;
+
+import org.eclipse.epsilon.eol.models.IRelativePathResolver;
+
+import java.util.regex.Pattern;
+
+/**
+ * An IRelativePathResolver that resolves resource URLs in the gen(bin/target) folder to the src folder.
+ * NOTE: This class is intended to be used in testing environments where it is desirable to access/modify
+ * scripts in the src folder as opposed to the gen folder. In deployment stick to the resources as loaded
+ * form the class or provide other means to access the scripts.
+ * NOTE: The implemented strategy only works with resources added side-by-side with the Java code (i.e. in the
+ * same folders).
+ * NOTE: If your maven build changes the default locations of resources in the target folder then using the provided
+ * find regex and replace value will fail to resolve the original files correctly. In this case you can provide your
+ * own find regex and replace values (see {@link #setGenFolder(Pattern)} and {@link #setSrcFolder(String)}).
+ *
+ * This RelativePathResolver can be used to resolve ExL scripts or model locations, in the output folder of a Java
+ * project to the original source folder. The gen folder lookup is a regex expression, which can be useful to match
+ * complex structures.
+ *
+ * The class provides static fields for the basic java style (bin -> src) and for maven like structures
+ * (target/classes/ -> src/main/java). By default java style resolution is used.
+
+ *
+ * <pre>
+ * {@code
+ * URL scriptUrl = SomeClass.getClass().getResource(/some/resource/location/myScript.eol);
+ * // scriptUrl = "some/path/bin/some/resource/location/myScript.eol"
+ * // Resolve
+ * IRelativePathResolver pr = new JavaRelativePathResolver();
+ * String srcPath = pr.resolve(scriptUrl.toString();
+ * System.out.println(srcPath); // prints: some/path/src/some/resource/location/myScript.eol"
+ * }
+ * </pre>
+ *
+ */
+public class JavaRelativePathResolver extends BasePathResolver implements IRelativePathResolver {
+
+ public static final Pattern JAVA_GEN_FOLDER = Pattern.compile("/bin/");
+ public static final String JAVA_SRC_FOLDER = "/src/";
+ public static final Pattern MAVEN_GEN_FOLDER = Pattern.compile("/target/classes/");
+ public static final String MAVEN_SRC_FOLDER = "/src/main/java";
+
+ private Pattern genFolder;
+ private String srcFolder;
+
+ public JavaRelativePathResolver() {
+ super("");
+ genFolder = JAVA_GEN_FOLDER;
+ srcFolder = JAVA_SRC_FOLDER;
+ }
+
+ public JavaRelativePathResolver(String basePath) {
+ super(basePath);
+ }
+
+ public void setGenFolder(Pattern genFolder) {
+ this.genFolder = genFolder;
+ }
+
+ public void setSrcFolder(String srcFolder) {
+ this.srcFolder = srcFolder;
+ }
+
+ @Override
+ public String resolve(String s) {
+ String fullPath = super.resolve(s);
+ return genFolder.matcher(fullPath).replaceAll(srcFolder);
+ }
+}
diff --git a/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/ParameterUtil.java b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/ParameterUtil.java
new file mode 100644
index 0000000..1b3eacd
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.executors/src/org/eclipse/epsilon/executors/util/ParameterUtil.java
@@ -0,0 +1,16 @@
+/*********************************************************************
+* Copyright (c) 2019 The University of York.
+*
+* This program and the accompanying materials are made
+* available under the terms of the Eclipse Public License 2.0
+* which is available at https://www.eclipse.org/legal/epl-2.0/
+*
+* SPDX-License-Identifier: EPL-2.0
+**********************************************************************/
+package org.eclipse.epsilon.executors.util;
+
+/**
+ * The Parameter util provides utility methods for creating parameters.
+ */
+public class ParameterUtil {
+}
diff --git a/plugins/org.eclipse.epsilon.targetplatform/org.eclipse.epsilon.targetplatform.target b/plugins/org.eclipse.epsilon.targetplatform/org.eclipse.epsilon.targetplatform.target
index 53dde89..2989e3f 100644
--- a/plugins/org.eclipse.epsilon.targetplatform/org.eclipse.epsilon.targetplatform.target
+++ b/plugins/org.eclipse.epsilon.targetplatform/org.eclipse.epsilon.targetplatform.target
@@ -5,20 +5,14 @@
<repository location="http://download.eclipse.org/emfatic/update/"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
-<unit id="org.eclipse.e4.core.tools.feature.feature.group" version="4.8.0.v20180512-1132"/>
-<unit id="org.eclipse.emf.sdk.feature.group" version="2.14.0.v20180529-1157"/>
-<unit id="org.eclipse.emf.validation.sdk.feature.group" version="1.12.0.201805030717"/>
-<unit id="org.eclipse.equinox.sdk.feature.group" version="3.14.0.v20180518-2029"/>
-<unit id="org.eclipse.gef.sdk.feature.group" version="3.11.0.201606061308"/>
-<unit id="org.eclipse.gmf.feature.group" version="1.12.0.201806010809"/>
-<unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.12.0.201805221301"/>
-<unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.12.0.201806010809"/>
-<unit id="org.eclipse.jdt.feature.group" version="3.14.0.v20180611-0500"/>
-<unit id="org.eclipse.platform.feature.group" version="4.8.0.v20180611-0656"/>
-<unit id="org.eclipse.platform.sdk" version="4.8.0.I20180611-0500"/>
-<unit id="org.eclipse.rcp.feature.group" version="4.8.0.v20180611-0656"/>
-<unit id="org.eclipse.sdk.ide" version="4.8.0.I20180611-0500"/>
<repository location="http://download.eclipse.org/releases/photon/"/>
+ <unit id="org.eclipse.emf.compare.ide.ui.source.feature.group" version="3.3.3.201805161152"/>
+ <unit id="org.eclipse.emf.compare.uml2.source.feature.group" version="3.3.3.201805161152"/>
+ <unit id="org.eclipse.ocl.all.sdk.feature.group" version="5.4.0.v20180611-1119"/>
+ <unit id="org.eclipse.sirius.runtime.feature.group" version="6.0.0.201806111309"/>
+ <unit id="org.eclipse.sirius.runtime.ide.ui.feature.group" version="6.0.0.201806111309"/>
+ <unit id="org.eclipse.xsd.sdk.feature.group" version="2.14.0.v20180131-0817"/>
+ <unit id="org.eclipse.xtext.sdk.feature.group" version="2.14.0.v20180523-0937"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.gmf.sdk.feature.group" version="3.2.1.201409171321"/>
@@ -27,15 +21,17 @@
<unit id="org.eclipse.gmf.tooling.runtime.feature.group" version="3.2.1.201409171321"/>
<repository location="http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/releases"/>
</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
-<unit id="org.eclipse.emf.compare.ide.ui.source.feature.group" version="3.3.3.201805161152"/>
-<unit id="org.eclipse.emf.compare.uml2.source.feature.group" version="3.3.3.201805161152"/>
-<unit id="org.eclipse.ocl.all.sdk.feature.group" version="5.4.0.v20180611-1119"/>
-<unit id="org.eclipse.sirius.runtime.feature.group" version="6.0.0.201806111309"/>
-<unit id="org.eclipse.sirius.runtime.ide.ui.feature.group" version="6.0.0.201806111309"/>
-<unit id="org.eclipse.xsd.sdk.feature.group" version="2.14.0.v20180131-0817"/>
-<unit id="org.eclipse.xtext.sdk.feature.group" version="2.14.0.v20180523-0937"/>
+<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="http://download.eclipse.org/releases/photon/"/>
+ <unit id="org.eclipse.emf.sdk.feature.group" version="2.14.0.v20180529-1157"/>
+ <unit id="org.eclipse.emf.validation.sdk.feature.group" version="1.12.0.201805030717"/>
+ <unit id="org.eclipse.equinox.sdk.feature.group" version="3.14.0.v20180518-2029"/>
+ <unit id="org.eclipse.gef.sdk.feature.group" version="3.11.0.201606061308"/>
+ <unit id="org.eclipse.gmf.feature.group" version="1.12.0.201806010809"/>
+ <unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.12.0.201805221301"/>
+ <unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.12.0.201806010809"/>
+ <unit id="org.eclipse.jdt.feature.group" version="3.14.0.v20180611-0500"/>
+ <unit id="org.eclipse.modisco.sdk.feature.feature.group" version="1.2.0.201805182005"/>
</location>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="false" type="InstallableUnit">
<unit id="org.eclipse.pde.feature.group" version="3.13.100.v20180611-0826"/>
diff --git a/standalone/org.eclipse.epsilon.standalone.engine/.gitignore b/standalone/org.eclipse.epsilon.standalone.engine/.gitignore
new file mode 100644
index 0000000..dbef52f
--- /dev/null
+++ b/standalone/org.eclipse.epsilon.standalone.engine/.gitignore
@@ -0,0 +1,3 @@
+*.settings
+*.project
+*.classpath
\ No newline at end of file
diff --git a/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.core.resources.prefs b/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..99f26c0
--- /dev/null
+++ b/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.m2e.core.prefs b/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/standalone/org.eclipse.epsilon.standalone.engine/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/standalone/org.eclipse.epsilon.standalone.engine/pom.xml b/standalone/org.eclipse.epsilon.standalone.engine/pom.xml
new file mode 100644
index 0000000..6b4d715
--- /dev/null
+++ b/standalone/org.eclipse.epsilon.standalone.engine/pom.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (c) 2008-2018 The University of York.
+ ~ This program and the accompanying materials
+ ~ are made available under the terms of the Eclipse Public License 2.0
+ ~ which is available at https://www.eclipse.org/legal/epl-2.0/
+ -->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>standalone.engine.parent</artifactId>
+ <version>0.0.6</version>
+ <packaging>pom</packaging>
+ <url>https://eclipse.org/epsilon/</url>
+
+ <licenses>
+ <license>
+ <name>Eclipse Public License 2.0</name>
+ <url>https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt</url>
+ </license>
+ </licenses>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <epsilonVersion>1.6.0-SNAPSHOT</epsilonVersion>
+ <slf4jVersion>1.7.25</slf4jVersion>
+ <junitVersion>4.12</junitVersion>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>oss-sonatype</id>
+ <name>oss-sonatype</name>
+ <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <distributionManagement>
+ <snapshotRepository>
+ <id>ojo-snapshots</id>
+ <name>oss-jfrog-artifactory-snapshots</name>
+ <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
+ </snapshotRepository>
+ <repository>
+ <id>bintray-epsilonlabs-epsilon-standalone</id>
+ <url>https://api.bintray.com/maven/epsilonlabs/epsilon-standalone/standalone-engine/;publish=1</url>
+ </repository>
+
+ </distributionManagement>
+
+ <modules>
+ <module>org.eclipse.epsilon.standalone.engine</module>
+ <module>org.eclipse.epsilon.standalone.engine.emf</module>
+ <module>org.eclipse.epsilon.standalone.engine.simulink</module>
+ <module>org.eclipse.epsilon.standalone.engine.spreadsheets</module>
+ <module>org.eclipse.epsilon.standalone.engine.spreadsheets.excel</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.7.0</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <additionalparam>${javadoc.opts}</additionalparam>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.5.3</version>
+ <configuration>
+ <tagNameFormat>@{project.version}</tagNameFormat>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>java8-doclint-disabled</id>
+ <activation>
+ <jdk>[1.8,)</jdk>
+ </activation>
+ <properties>
+ <javadoc.opts>-Xdoclint:none</javadoc.opts>
+ </properties>
+ </profile>
+ </profiles>
+</project>
diff --git a/standalone/org.eclipse.epsilon.standalone/jarmodel.xml b/standalone/org.eclipse.epsilon.standalone/jarmodel.xml
index 743b68f..5a8b491 100644
--- a/standalone/org.eclipse.epsilon.standalone/jarmodel.xml
+++ b/standalone/org.eclipse.epsilon.standalone/jarmodel.xml
@@ -48,6 +48,10 @@
groupId="org.eclipse.emf"
artifactId="org.eclipse.emf.ecore.xmi"
version="2.12.0" />
+ <plugin name="org.eclipse.core.runtime"
+ groupId="org.eclipse.platform"
+ artifactId="org.eclipse.core.runtime"
+ version="3.12.0" />
<plugin name="org.eclipse.xsd"
groupId="org.eclipse.xsd"
artifactId="org.eclipse.xsd"
diff --git a/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/Graph.ecore b/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/Graph.ecore
new file mode 100644
index 0000000..ef92c26
--- /dev/null
+++ b/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/Graph.ecore
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="Graph"
+ nsURI="Graph" nsPrefix="Graph">
+ <eClassifiers xsi:type="ecore:EClass" name="Graph">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
+ eType="#//Node" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Node">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="outgoing" upperBound="-1"
+ eType="#//Edge" containment="true" eOpposite="#//Edge/source"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="incoming" upperBound="-1"
+ eType="#//Edge" eOpposite="#//Edge/target"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Edge">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="source" eType="#//Node"
+ eOpposite="#//Node/outgoing"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="target" eType="#//Node"
+ eOpposite="#//Node/incoming"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/graph.ecl b/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/graph.ecl
new file mode 100644
index 0000000..9e3037f
--- /dev/null
+++ b/tests/org.eclipse.epsilon.ecl.engine.test.acceptance/src/org/eclipse/epsilon/ecl/engine/test/acceptance/graphs/graph.ecl
@@ -0,0 +1,20 @@
+$parallel (lg.nodes.size() + rg.nodes.size()) > 2000
+rule Graph
+ match lg : Left!Graph with rg : Right!Graph {
+ compare : lg.nodes.asSet().matches(rg.nodes.asSet())
+}
+
+@lazy
+rule Node
+ match ln : Left!Node with rn : Right!Node {
+ guard : ln.name.equalsIgnoreCase(rn.name)
+ compare : ln.outgoing.size() == rn.outgoing.size() and
+ ln.incoming.size() == rn.outgoing.size()
+}
+
+post {
+ matchTrace.getMatches()
+ .parallelSelect(m | m.`rule`.name == "Node")
+ .parallelForAll(m | m.isMatching())
+ .println();
+}
\ No newline at end of file