First version of the EMC YAML Driver
diff --git a/features/org.eclipse.epsilon.core.dt.feature/feature.xml b/features/org.eclipse.epsilon.core.dt.feature/feature.xml
index cf2e93b..6ca70e2 100644
--- a/features/org.eclipse.epsilon.core.dt.feature/feature.xml
+++ b/features/org.eclipse.epsilon.core.dt.feature/feature.xml
@@ -99,6 +99,13 @@
install-size="0"
version="0.0.0"
unpack="false"/>
+
+ <plugin
+ id="org.eclipse.epsilon.emc.yaml.dt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
<plugin
id="org.eclipse.epsilon.flock.dt"
diff --git a/features/org.eclipse.epsilon.core.feature/feature.xml b/features/org.eclipse.epsilon.core.feature/feature.xml
index 326d5c1..2afd28e 100644
--- a/features/org.eclipse.epsilon.core.feature/feature.xml
+++ b/features/org.eclipse.epsilon.core.feature/feature.xml
@@ -155,6 +155,13 @@
install-size="0"
version="0.0.0"
unpack="false"/>
+
+ <plugin
+ id="org.eclipse.epsilon.emc.yaml"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
<plugin
id="org.eclipse.epsilon.emc.bibtex"
diff --git a/features/org.eclipse.epsilon.emc.yaml.dt.feature/.project b/features/org.eclipse.epsilon.emc.yaml.dt.feature/.project
new file mode 100644
index 0000000..bf30a77
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.emc.yaml.dt.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.epsilon.emc.yaml.dt.feature/EPL-2.0.html b/features/org.eclipse.epsilon.emc.yaml.dt.feature/EPL-2.0.html
new file mode 100644
index 0000000..637a181
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/EPL-2.0.html
@@ -0,0 +1,300 @@
+<!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/features/org.eclipse.epsilon.emc.yaml.dt.feature/about.html b/features/org.eclipse.epsilon.emc.yaml.dt.feature/about.html
new file mode 100644
index 0000000..1601de9
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/about.html
@@ -0,0 +1,28 @@
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>April 27, 2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.epsilon.emc.yaml.dt.feature/build.properties b/features/org.eclipse.epsilon.emc.yaml.dt.feature/build.properties
new file mode 100644
index 0000000..ec5f564
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ EPL-2.0.html,\
+ about.html
diff --git a/features/org.eclipse.epsilon.emc.yaml.dt.feature/feature.xml b/features/org.eclipse.epsilon.emc.yaml.dt.feature/feature.xml
new file mode 100644
index 0000000..2155485
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/feature.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.epsilon.emc.yaml.dt.feature"
+ label="Epsilon YAML Driver Development Tools"
+ version="2.4.0.qualifier"
+ provider-name="Eclipse Modeling Project"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description url="http://www.eclipse.org/epsilon">
+ This feature provides the YAML Driver's Developer Tools.
+ </description>
+
+ <copyright>
+ Copyright (c) 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
+ </copyright>
+
+ <includes id="org.eclipse.epsilon.core.dt.feature" version="2.4.0.qualifier"/>
+ <includes id="org.eclipse.epsilon.emc.yaml.feature" version="2.4.0.qualifier"/>
+
+ <plugin
+ id="org.eclipse.epsilon.emc.yaml.dt"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.epsilon.emc.yaml.dt.feature/pom.xml b/features/org.eclipse.epsilon.emc.yaml.dt.feature/pom.xml
new file mode 100644
index 0000000..8814581
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.dt.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>features</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.epsilon.emc.yaml.dt.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/features/org.eclipse.epsilon.emc.yaml.feature/.project b/features/org.eclipse.epsilon.emc.yaml.feature/.project
new file mode 100644
index 0000000..6d63001
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.emc.yaml.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/org.eclipse.epsilon.emc.yaml.feature/EPL-2.0.html b/features/org.eclipse.epsilon.emc.yaml.feature/EPL-2.0.html
new file mode 100644
index 0000000..637a181
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/EPL-2.0.html
@@ -0,0 +1,300 @@
+<!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/features/org.eclipse.epsilon.emc.yaml.feature/about.html b/features/org.eclipse.epsilon.emc.yaml.feature/about.html
new file mode 100644
index 0000000..1601de9
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/about.html
@@ -0,0 +1,28 @@
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>April 27, 2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/features/org.eclipse.epsilon.emc.yaml.feature/build.properties b/features/org.eclipse.epsilon.emc.yaml.feature/build.properties
new file mode 100644
index 0000000..ec5f564
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/build.properties
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+ EPL-2.0.html,\
+ about.html
diff --git a/features/org.eclipse.epsilon.emc.yaml.feature/feature.xml b/features/org.eclipse.epsilon.emc.yaml.feature/feature.xml
new file mode 100644
index 0000000..5c7c01e
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/feature.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.epsilon.emc.yaml.feature"
+ label="Epsilon YAML Driver"
+ version="2.4.0.qualifier"
+ provider-name="Eclipse Modeling Project"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description url="http://www.eclipse.org/epsilon">
+ This feature provides the YAML Driver.
+ </description>
+
+ <copyright>
+ Copyright (c) 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
+ </copyright>
+
+ <includes id="org.eclipse.epsilon.core.feature" version="2.4.0.qualifier"/>
+
+ <plugin
+ id="org.eclipse.epsilon.emc.yaml"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/org.eclipse.epsilon.emc.yaml.feature/pom.xml b/features/org.eclipse.epsilon.emc.yaml.feature/pom.xml
new file mode 100644
index 0000000..b5c8003
--- /dev/null
+++ b/features/org.eclipse.epsilon.emc.yaml.feature/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>features</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.epsilon.emc.yaml.feature</artifactId>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/features/pom.xml b/features/pom.xml
index 27d3e88..d8b1bea 100644
--- a/features/pom.xml
+++ b/features/pom.xml
@@ -16,6 +16,8 @@
<module>org.eclipse.epsilon.core.feature</module>
<module>org.eclipse.epsilon.emc.csv.feature</module>
<module>org.eclipse.epsilon.emc.csv.dt.feature</module>
+ <module>org.eclipse.epsilon.emc.yaml.feature</module>
+ <module>org.eclipse.epsilon.emc.yaml.dt.feature</module>
<module>org.eclipse.epsilon.emc.graphml.feature</module>
<module>org.eclipse.epsilon.emc.html.feature</module>
<module>org.eclipse.epsilon.emc.html.dt.feature</module>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/.classpath b/plugins/org.eclipse.epsilon.emc.yaml.dt/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/.project b/plugins/org.eclipse.epsilon.emc.yaml.dt/.project
new file mode 100644
index 0000000..f63c331
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.emc.yaml.dt</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/EPL-2.0.html b/plugins/org.eclipse.epsilon.emc.yaml.dt/EPL-2.0.html
new file mode 100644
index 0000000..637a181
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/EPL-2.0.html
@@ -0,0 +1,300 @@
+<!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.emc.yaml.dt/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.emc.yaml.dt/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..35d9161
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: EMC YAML development tools
+Bundle-SymbolicName: org.eclipse.epsilon.emc.yaml.dt;singleton=true
+Bundle-Version: 2.4.0.qualifier
+Bundle-Activator: org.eclipse.epsilon.emc.yaml.dt.Activator
+Require-Bundle: org.eclipse.epsilon.emc.yaml,
+ org.eclipse.epsilon.common.dt
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.epsilon.emc.yaml.dt
+Bundle-Vendor: Eclipse Modeling Project
+Automatic-Module-Name: org.eclipse.epsilon.emc.yaml.dt
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/about.html b/plugins/org.eclipse.epsilon.emc.yaml.dt/about.html
new file mode 100644
index 0000000..b491992
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/about.html
@@ -0,0 +1,28 @@
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>April 27, 2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/build.properties b/plugins/org.eclipse.epsilon.emc.yaml.dt/build.properties
new file mode 100644
index 0000000..8beeae1
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+EPL-2.0.html,\
+about.html,\
+ .,\
+ plugin.xml,\
+ images/,\
+ src/
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/images/yaml.png b/plugins/org.eclipse.epsilon.emc.yaml.dt/images/yaml.png
new file mode 100644
index 0000000..6be217d
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/images/yaml.png
Binary files differ
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/plugin.xml b/plugins/org.eclipse.epsilon.emc.yaml.dt/plugin.xml
new file mode 100644
index 0000000..21b2fb3
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/plugin.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.epsilon.common.dt.modelType">
+ <modelType
+ class="org.eclipse.epsilon.emc.yaml.YamlModel"
+ dialog="org.eclipse.epsilon.emc.yaml.dt.YamlModelConfigurationDialog"
+ icon="images/yaml.png"
+ label="YAML Document"
+ stable="true"
+ type="YAML">
+ </modelType>
+ </extension>
+</plugin>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/pom.xml b/plugins/org.eclipse.epsilon.emc.yaml.dt/pom.xml
new file mode 100644
index 0000000..f95a7d3
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>plugins</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.epsilon.emc.yaml.dt</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/Activator.java b/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/Activator.java
new file mode 100644
index 0000000..1e6e6e8
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/Activator.java
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml.dt;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.epsilon.emc.yaml.dt";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/YamlModelConfigurationDialog.java b/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/YamlModelConfigurationDialog.java
new file mode 100644
index 0000000..d0abe1f
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml.dt/src/org/eclipse/epsilon/emc/yaml/dt/YamlModelConfigurationDialog.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml.dt;
+
+import org.eclipse.epsilon.common.dt.launching.dialogs.AbstractCachedModelConfigurationDialog;
+import org.eclipse.epsilon.common.dt.util.DialogUtil;
+import org.eclipse.epsilon.emc.yaml.YamlProperty;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Text;
+
+public class YamlModelConfigurationDialog extends AbstractCachedModelConfigurationDialog {
+
+ protected Label fileTextLabel;
+ protected Text fileText;
+ protected Label uriTextLabel;
+ protected Text uriText;
+ protected Button browseModelFile;
+ protected Button filebasedButton;
+
+ protected String getModelName() {
+ return "YAML Document";
+ }
+
+ protected String getModelType() {
+ return "YAML";
+ }
+
+ protected void createGroups(Composite control) {
+ super.createGroups(control);
+ createFilesGroup(control);
+ createLoadStoreOptionsGroup(control);
+ toggleEnabledFields();
+ }
+
+ protected void toggleEnabledFields() {
+ if (filebasedButton.getSelection()) {
+ fileTextLabel.setEnabled(true);
+ fileText.setEnabled(true);
+ uriTextLabel.setEnabled(false);
+ uriText.setEnabled(false);
+ uriText.setText("");
+ }
+ else {
+ fileTextLabel.setEnabled(false);
+ fileText.setEnabled(false);
+ uriTextLabel.setEnabled(true);
+ uriText.setEnabled(true);
+ fileText.setText("");
+ storeOnDisposalCheckbox.setSelection(false);
+ }
+ }
+
+ protected Composite createFilesGroup(Composite parent) {
+ final Composite groupContent = DialogUtil.createGroupContainer(parent, "Files/URIs", 3);
+
+ filebasedButton = new Button(groupContent, SWT.CHECK);
+ GridData filebasedButtonGridData = new GridData(GridData.FILL_HORIZONTAL);
+ filebasedButtonGridData.horizontalSpan = 3;
+ filebasedButton.setSelection(true);
+ filebasedButton.setText("Workspace file");
+ filebasedButton.setLayoutData(filebasedButtonGridData);
+ filebasedButton.addListener(SWT.Selection, new Listener() {
+ public void handleEvent(Event event) {
+ toggleEnabledFields();
+ }
+ });
+
+ fileTextLabel = new Label(groupContent, SWT.NONE);
+ fileTextLabel.setText("File: ");
+
+ fileText = new Text(groupContent, SWT.BORDER);
+ fileText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ browseModelFile = new Button(groupContent, SWT.NONE);
+ browseModelFile.setText("Browse Workspace...");
+ browseModelFile.addListener(SWT.Selection, new BrowseWorkspaceForModelsListener(fileText, "YAML Documents in the workspace", "Select an YAML document"));
+
+ uriTextLabel = new Label(groupContent, SWT.NONE);
+ uriTextLabel.setText("URI: ");
+
+ uriText = new Text(groupContent, SWT.BORDER);
+ GridData uriTextGridData = new GridData(GridData.FILL_HORIZONTAL);
+ uriTextGridData.horizontalSpan = 2;
+ uriText.setLayoutData(uriTextGridData);
+
+ groupContent.layout();
+ groupContent.pack();
+ return groupContent;
+ }
+
+ protected void loadProperties(){
+ super.loadProperties();
+ if (properties == null) return;
+ fileText.setText(properties.getProperty(YamlProperty.PROPERTY_FILE));
+ filebasedButton.setSelection(properties.getBooleanProperty("fileBased", true));
+ toggleEnabledFields();
+ }
+
+ protected void storeProperties(){
+ super.storeProperties();
+ properties.put(YamlProperty.PROPERTY_FILE, fileText.getText());
+ properties.put("fileBased", filebasedButton.getSelection() + "");
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/.classpath b/plugins/org.eclipse.epsilon.emc.yaml/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/.project b/plugins/org.eclipse.epsilon.emc.yaml/.project
new file mode 100644
index 0000000..757a382
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.emc.yaml</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/EPL-2.0.html b/plugins/org.eclipse.epsilon.emc.yaml/EPL-2.0.html
new file mode 100644
index 0000000..637a181
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/EPL-2.0.html
@@ -0,0 +1,300 @@
+<!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.emc.yaml/META-INF/MANIFEST.MF b/plugins/org.eclipse.epsilon.emc.yaml/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..f5f07b7
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/META-INF/MANIFEST.MF
@@ -0,0 +1,12 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: YAML Driver for EMC
+Bundle-SymbolicName: org.eclipse.epsilon.emc.yaml
+Bundle-Version: 2.4.0.qualifier
+Require-Bundle: org.eclipse.epsilon.eol.engine,
+ org.yaml.snakeyaml;bundle-version="1.27.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.epsilon.emc.yaml
+Bundle-Vendor: Eclipse Modeling Project
+Automatic-Module-Name: org.eclipse.epsilon.emc.yaml
+
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/about.html b/plugins/org.eclipse.epsilon.emc.yaml/about.html
new file mode 100644
index 0000000..b491992
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/about.html
@@ -0,0 +1,28 @@
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>April 27, 2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/build.properties b/plugins/org.eclipse.epsilon.emc.yaml/build.properties
new file mode 100644
index 0000000..fda05a1
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+EPL-2.0.html,\
+about.html,\
+ .,\
+ src/
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/pom-plain.xml b/plugins/org.eclipse.epsilon.emc.yaml/pom-plain.xml
new file mode 100644
index 0000000..5bcbc3a
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/pom-plain.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.eclipse.epsilon.emc.yaml</artifactId>
+ <name>Eclipse Epsilon EMC for YAML Files</name>
+
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>epsilon-plain-parent</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ <relativePath>../../pom-plain.xml</relativePath>
+ </parent>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.eclipse.epsilon.eol.engine</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.yaml</groupId>
+ <artifactId>snakeyaml</artifactId>
+ <version>1.21</version>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/pom.xml b/plugins/org.eclipse.epsilon.emc.yaml/pom.xml
new file mode 100644
index 0000000..4a9c764
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>plugins</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.epsilon.emc.yaml</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlDataType.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlDataType.java
new file mode 100644
index 0000000..71c6d1d
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlDataType.java
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+public enum YamlDataType {
+
+ STRING,
+ BOOLEAN,
+ INTEGER,
+ FLOAT,
+ DOUBLE
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModel.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModel.java
new file mode 100644
index 0000000..4ea0d32
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModel.java
@@ -0,0 +1,235 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map.Entry;
+import org.eclipse.epsilon.common.util.StringProperties;
+import org.eclipse.epsilon.common.util.StringUtil;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.eol.exceptions.models.EolEnumerationValueNotFoundException;
+import org.eclipse.epsilon.eol.exceptions.models.EolModelElementTypeNotFoundException;
+import org.eclipse.epsilon.eol.exceptions.models.EolModelLoadingException;
+import org.eclipse.epsilon.eol.execute.operations.contributors.IOperationContributorProvider;
+import org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor;
+import org.eclipse.epsilon.eol.models.CachedModel;
+import org.eclipse.epsilon.eol.models.IRelativePathResolver;
+
+public class YamlModel extends CachedModel<Entry> implements IOperationContributorProvider {
+
+ protected File file;
+ protected Object yamlContent;
+ protected YamlModelOperationContributor yamlModelOperationContributor;
+ protected List<Entry> createdNodes = new ArrayList<>();
+
+ public YamlModel() {
+ propertyGetter = new YamlPropertyGetter(this);
+ propertySetter = new YamlPropertySetter(this);
+ }
+
+ public synchronized void clear() {
+ this.yamlContent = null;
+ this.createdNodes.clear();
+ }
+
+ public synchronized Object getYamlContent() {
+ return this.yamlContent;
+ }
+
+ public synchronized void setYamlContent(Object yamlContent) {
+ this.yamlContent = yamlContent;
+ }
+
+ public synchronized void setYamlContent(String yamlContent) {
+ this.yamlContent = YamlNodeUtility.getYamlContent(yamlContent);
+ }
+
+ public synchronized Object getRoot() {
+ return YamlNodeUtility.getRootNode(this.yamlContent);
+ }
+
+ public synchronized void setRootAsList() {
+ this.yamlContent = new ArrayList<>();
+ }
+
+ public synchronized void setRootAsMap() {
+ this.yamlContent = new LinkedHashMap<String, Object>();
+ }
+
+ public File getFile() {
+ return file;
+ }
+
+ public void setFile(File file) {
+ this.file = file;
+ }
+
+ @Override
+ public boolean isLoaded() {
+ return (this.yamlContent != null);
+ }
+
+ @Override
+ public Object getEnumerationValue(String enumeration, String label) throws EolEnumerationValueNotFoundException {
+ return null;
+ }
+
+ @Override
+ public String getTypeNameOf(Object instance) {
+ return (instance instanceof Entry) ? YamlNodeUtility.getTypeNameOf((Entry)instance) : instance.getClass().getName();
+ }
+
+ @Override
+ public Object getTypeOf(Object instance) {
+ return instance.getClass();
+ }
+
+ @Override
+ public Object getElementById(String id) {
+ return null;
+ }
+
+ @Override
+ public String getElementId(Object instance) {
+ return null;
+ }
+
+ @Override
+ public void setElementId(Object instance, String newId) {}
+
+ @Override
+ public boolean owns(Object instance) {
+ return YamlNodeUtility.ownsYamlObject(this.yamlContent, createdNodes, instance);
+ }
+
+ @Override
+ public boolean isInstantiable(String type) {
+ return hasType(type);
+ }
+
+ @Override
+ public boolean hasType(String type) {
+ return (YamlProperty.parse(type, 1) != null);
+ }
+
+ @Override
+ public boolean isModelElement(Object instance) {
+ return (instance instanceof Entry);
+ }
+
+ @Override
+ public synchronized boolean store(String location) {
+ try {
+ YamlNodeUtility.storeYamlContent(this.file, this.yamlContent);
+ return true;
+ }
+ catch (Exception ex) {
+ ex.printStackTrace();
+ return false;
+ }
+ }
+
+ @Override
+ public boolean store() {
+ if (file != null) {
+ return store(file.getAbsolutePath());
+ }
+ return false;
+ }
+
+ @Override
+ protected synchronized Collection<Entry> allContentsFromModel() {
+ YamlProperty yamlProperty = YamlProperty.parse(YamlNodeType.Node.toString(), 0);
+ return YamlNodeUtility.getNodes(this.yamlContent, yamlProperty, true);
+ }
+
+ @Override
+ protected synchronized Collection<Entry> getAllOfTypeFromModel(String type) throws EolModelElementTypeNotFoundException {
+ YamlProperty yamlProperty = YamlProperty.parse(type, 1);
+ return YamlNodeUtility.getNodes(this.yamlContent, yamlProperty, true);
+ }
+
+ @Override
+ protected Collection<Entry> getAllOfKindFromModel(String kind) throws EolModelElementTypeNotFoundException {
+ return getAllOfTypeFromModel(kind);
+ }
+
+ @Override
+ protected Entry createInstanceInModel(String type) throws EolModelElementTypeNotFoundException {
+ return createInstance(type, Collections.emptyList());
+ }
+
+ @Override
+ public synchronized Entry createInstance(String type, Collection<Object> parameters) throws EolModelElementTypeNotFoundException {
+ Entry newNode = YamlNodeUtility.getNode(type, 1, parameters);
+ createdNodes.add(newNode);
+ return newNode;
+ }
+
+ @Override
+ protected void disposeModel() {
+ clear();
+ }
+
+ @Override
+ protected synchronized boolean deleteElementInModel(Object instance) throws EolRuntimeException {
+ if (!(instance instanceof Entry)) {
+ return false;
+ }
+ Entry node = (Entry) instance;
+ return YamlNodeUtility.deleteNode(this.yamlContent, this.createdNodes, node);
+ }
+
+ @Override
+ protected Object getCacheKeyForType(String type) throws EolModelElementTypeNotFoundException {
+ return type;
+ }
+
+ @Override
+ protected Collection<String> getAllTypeNamesOf(Object instance) {
+ return Collections.singleton(getTypeNameOf(instance));
+ }
+
+ @Override
+ protected synchronized void loadModel() throws EolModelLoadingException {
+ try {
+ if (readOnLoad) {
+ if (this.file != null) {
+ this.yamlContent = YamlNodeUtility.getYamlContent(this.file);
+ }
+ }
+ this.yamlModelOperationContributor = new YamlModelOperationContributor(this);
+ this.createdNodes = new ArrayList<>();
+ }
+ catch (Exception ex) {
+ throw new EolModelLoadingException(ex, this);
+ }
+ }
+
+ @Override
+ public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException {
+ super.load(properties, resolver);
+ String filePath = properties.getProperty(YamlProperty.PROPERTY_FILE);
+ if (!StringUtil.isEmpty(filePath)) {
+ file = new File(resolver != null ? resolver.resolve(filePath) : filePath);
+ }
+ load();
+ }
+
+ @Override
+ public OperationContributor getOperationContributor() {
+ return yamlModelOperationContributor;
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModelOperationContributor.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModelOperationContributor.java
new file mode 100644
index 0000000..d86ced9
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlModelOperationContributor.java
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.eol.execute.operations.contributors.OperationContributor;
+
+public class YamlModelOperationContributor extends OperationContributor {
+
+ protected YamlModel yamlModel;
+
+ public YamlModelOperationContributor(YamlModel yamlModel) {
+ this.yamlModel = yamlModel;
+ }
+
+ @Override
+ public boolean contributesTo(Object target) {
+ return (target instanceof Entry) || (target instanceof Map) || (target instanceof List);
+ }
+
+ public void appendNode(Object item) throws EolRuntimeException {
+ Object target = getTarget();
+ if(target instanceof Map) {
+ Entry entry = (Entry) item;
+ ((Map) target).put(entry.getKey(), entry.getValue());
+ }
+ else {
+ throw new EolRuntimeException("The object to which you append a node must be a MappingNode. A MappingNode is represented as a map.");
+ }
+ }
+
+ public void addRow() throws EolRuntimeException {
+ Object target = getTarget();
+ if((target instanceof List) && (YamlNodeUtility.isListNode((List)target))) {
+ ((List) target).add(new LinkedHashMap());
+ }
+ else {
+ throw new EolRuntimeException("The object to which you add a row must be a ListNode. A ListNode is represented as a list of maps.");
+ }
+ }
+
+ public void addRows(int size) throws EolRuntimeException {
+ Object target = getTarget();
+ if((target instanceof List) && (YamlNodeUtility.isListNode((List)target))) {
+ for (int i=0; i < size; i++) {
+ ((List) target).add(new LinkedHashMap());
+ }
+ }
+ else {
+ throw new EolRuntimeException("The object to which you add a row must be a ListNode. A ListNode is represented as a list of maps.");
+ }
+ }
+
+ public void set(int index, Object object) throws EolRuntimeException {
+ Object target = getTarget();
+ if(target instanceof List) {
+ ((List) target).set(index, object);
+ }
+ else {
+ throw new EolRuntimeException("The object to which you set a value must be a List.");
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeType.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeType.java
new file mode 100644
index 0000000..4daa308
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeType.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+public enum YamlNodeType {
+
+ Node,
+ MappingNode,
+ ListNode,
+ ScalarNode
+
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeUtility.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeUtility.java
new file mode 100644
index 0000000..674799c
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlNodeUtility.java
@@ -0,0 +1,381 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.List;
+import org.yaml.snakeyaml.DumperOptions;
+import org.yaml.snakeyaml.Yaml;
+
+public class YamlNodeUtility {
+
+ public static Collection<Entry> getNodes(Object yamlContent, YamlProperty yamlProperty, boolean areAllNodes) {
+ Collection<Entry> nodes = new ArrayList<>();
+ setNodes(yamlContent, nodes, yamlProperty, areAllNodes);
+ return nodes;
+ }
+
+ private static void setNodes(Object yamlContent, Collection<Entry> nodes, YamlProperty yamlProperty, boolean areAllNodes) {
+ if (yamlContent instanceof List) {
+ setNodes((List)yamlContent, nodes, yamlProperty, areAllNodes);
+ }
+ else if (yamlContent instanceof Map) {
+ setNodes((Map)yamlContent, nodes, yamlProperty, areAllNodes);
+ }
+ }
+
+ private static void setNodes(List listNode, Collection<Entry> nodes, YamlProperty yamlProperty, boolean areAllNodes) {
+ for (Object node: listNode) {
+ if (node instanceof Map) {
+ setNodes((Map) node, nodes, yamlProperty, areAllNodes);
+ }
+ }
+ }
+
+ private static void setNodes(Map mappingNode, Collection<Entry> nodes, YamlProperty yamlProperty, boolean areAllNodes) {
+ Set<Entry> entries = (Set<Entry>) mappingNode.entrySet();
+ for (Entry entry: entries) {
+ setNodes(entry, nodes, yamlProperty, areAllNodes);
+ }
+ }
+
+ private static void setNodes(Entry entry, Collection<Entry> nodes, YamlProperty yamlProperty, boolean areAllNodes) {
+ Object entryValue = entry.getValue();
+ if (entryValue instanceof List) {
+ if (yamlProperty.isListNode()) {
+ addNodeIfNecessary(entry, yamlProperty, nodes);
+ }
+ if (areAllNodes) {
+ setNodes((List) entryValue, nodes, yamlProperty, areAllNodes);
+ }
+ }
+ else if (entryValue instanceof Map) {
+ if (yamlProperty.isMappingNode()) {
+ addNodeIfNecessary(entry, yamlProperty, nodes);
+ }
+ if (areAllNodes) {
+ setNodes((Map) entryValue, nodes, yamlProperty, areAllNodes);
+ }
+ }
+ else {
+ if (yamlProperty.isScalarNode()) {
+ addNodeIfNecessary(entry, yamlProperty, nodes);
+ }
+ }
+ }
+
+ private static void addNodeIfNecessary(Entry entry, YamlProperty yamlProperty, Collection<Entry> nodes) {
+ String property = yamlProperty.getProperty();
+ if (property == null) {
+ nodes.add(entry);
+ }
+ else {
+ if (entry.getKey().equals(property)) {
+ nodes.add(entry);
+ }
+ }
+ }
+
+ public static Object getQueryResult(Collection<Entry> queryResult, YamlProperty yamlProperty) {
+ if (queryResult == null || queryResult.isEmpty()) {
+ return null;
+ }
+ else {
+ return yamlProperty.isMany() ? queryResult : queryResult.iterator().next();
+ }
+ }
+
+ public static boolean isListNode(List list) {
+ for (Object object : list) {
+ if (!(object instanceof LinkedHashMap))
+ return false;
+ }
+ return true;
+ }
+
+ public static YamlNodeType getNodeType(String type) {
+ YamlNodeType nodeType;
+ try {
+ nodeType = YamlNodeType.valueOf(type);
+ }
+ catch(Exception ex) {
+ nodeType = null;
+ }
+ return nodeType;
+ }
+
+ public static YamlNodeType getNodeType(Entry node) {
+ Object nodeValue = node.getValue();
+ YamlNodeType nodeType = null;
+ if (nodeValue instanceof Map) {
+ nodeType = YamlNodeType.MappingNode;
+ }
+ else if (nodeValue instanceof List) {
+ nodeType = YamlNodeType.ListNode;
+ }
+ else {
+ nodeType = YamlNodeType.ScalarNode;
+ }
+ return nodeType;
+ }
+
+ private static Entry getNode(YamlProperty yamlProperty, Collection<Object> parameters) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ switch(yamlProperty.getType()) {
+ case ScalarNode:
+ return getScalarNode(yamlProperty, new ArrayList(parameters));
+
+ case MappingNode:
+ return getMappingNode(yamlProperty, new ArrayList(parameters));
+
+ case ListNode:
+ return getListNode(yamlProperty, new ArrayList(parameters));
+ }
+ return map.entrySet().iterator().next();
+ }
+
+ public static Entry getNode(String type, int indexOfSeparator, Collection<Object> parameters) {
+ YamlProperty yamlProperty = YamlProperty.parse(type, indexOfSeparator);
+ return YamlNodeUtility.getNode(yamlProperty, parameters);
+ }
+
+ private static Entry getScalarNode(YamlProperty yamlProperty, List parameters) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ String nodeName = getNameParameter(yamlProperty, parameters, YamlNodeType.ScalarNode);
+ Object nodeValue = getValueParameter(yamlProperty, parameters);
+ map.put(nodeName, nodeValue);
+ return map.entrySet().iterator().next();
+ }
+
+ private static Entry getListNode(YamlProperty yamlProperty, List parameters) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ String nodeName = getNameParameter(yamlProperty, parameters, YamlNodeType.ListNode);
+ Object valueParameter = getValueParameter(yamlProperty, parameters);
+ int listSize = (int) YamlTypeConverter.cast(valueParameter.toString(), YamlDataType.INTEGER);
+ List list = new ArrayList<>();
+ for(int i=0; i < listSize; i++) {
+ list.add(new LinkedHashMap());
+ }
+ map.put(nodeName, list);
+ return map.entrySet().iterator().next();
+ }
+
+ private static Entry getMappingNode(YamlProperty yamlProperty, List parameters) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ String nodeName = getNameParameter(yamlProperty, parameters, YamlNodeType.MappingNode);
+ map.put(nodeName, new LinkedHashMap<String, Object>());
+ return map.entrySet().iterator().next();
+ }
+
+ private static String getNameParameter(YamlProperty yamlProperty, List parameters, YamlNodeType yamlNodeType) {
+ String nodeName;
+ if(yamlProperty.getProperty() != null) {
+ nodeName = yamlProperty.getProperty();
+ }
+ else if(parameters.size() > 0) {
+ nodeName = parameters.get(0).toString();
+ }
+ else {
+ nodeName = yamlNodeType.toString();
+ }
+ return nodeName;
+ }
+
+ private static Object getValueParameter(YamlProperty yamlProperty, List parameters) {
+ int indexOfValueParameter = (yamlProperty.getProperty() != null) ? 0 : 1;
+ Object nodeValue = (parameters.size() > indexOfValueParameter) ? parameters.get(indexOfValueParameter) : "";
+ return nodeValue;
+ }
+
+ public static boolean deleteNode(Object yamlContent, List<Entry> createdNodes, Entry instance) {
+ boolean isCreatedNode = createdNodes.contains(instance);
+ if (isCreatedNode) {
+ createdNodes.remove(instance);
+ return true;
+ }
+ else {
+ YamlObject yamlObject = new YamlObject(instance);
+ findYamlObject(yamlContent, yamlObject);
+ if(yamlObject.isFound()) {
+ yamlObject.getParentNode().remove(instance.getKey());
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+ }
+
+ public static boolean ownsYamlObject(Object yamlContent, List<Entry> createdNodes, Object instance) {
+ boolean isOwnYamlObject = ownsYamlObject(yamlContent, instance);
+ boolean isCreated = (!isOwnYamlObject) ? isCreatedYamlObject(createdNodes, new YamlObject(instance)) : false;
+ return isOwnYamlObject || isCreated;
+ }
+
+ private static boolean ownsYamlObject(Object yamlContent, Object instance) {
+ if (instance instanceof List) {
+ return ownsYamlObjects(yamlContent, (List)instance);
+ }
+ else {
+ YamlObject yamlObject = null;
+ if (instance instanceof YamlModel) {
+ yamlObject = new YamlObject(((YamlModel)instance).getYamlContent());
+ }
+ else if (instance instanceof Entry) {
+ Entry entry = (Entry) instance;
+ yamlObject = (YamlProperty.PROPERTY_ROOT.equals(entry.getKey())) ? new YamlObject(entry.getValue()) : new YamlObject(instance);
+ }
+ else {
+ yamlObject = new YamlObject(instance);
+ }
+ return ownsYamlObject(yamlContent, yamlObject);
+ }
+ }
+
+ private static boolean ownsYamlObjects(Object yamlContent, List yamlObjects) {
+ for (Object yamlObject : yamlObjects) {
+ boolean isOwnYamlObject = (yamlObject instanceof List) ? ownsYamlObjects(yamlContent, (List)yamlObject) : ownsYamlObject(yamlContent, new YamlObject(yamlObject));
+ if (!isOwnYamlObject) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private static boolean ownsYamlObject(Object yamlContent, YamlObject yamlObject) {
+ findYamlObject(yamlContent, yamlObject);
+ return yamlObject.isFound();
+ }
+
+ private static void findYamlObject(Object yamlContent, YamlObject yamlObject) {
+ if (Objects.equals(yamlContent, yamlObject.getValue())) {
+ yamlObject.setIsFound(true);
+ }
+ else {
+ if (yamlContent instanceof List) {
+ findYamlObject((List)yamlContent, yamlObject);
+ }
+ else if (yamlContent instanceof Map) {
+ findYamlObject((Map)yamlContent, yamlObject);
+ }
+ }
+ }
+
+ private static void findYamlObject(List listNode, YamlObject yamlObject) {
+ for (Object node: listNode) {
+ if (!yamlObject.isFound()) {
+ findYamlObject(node, yamlObject);
+ }
+ else {
+ break;
+ }
+ }
+ }
+
+ private static void findYamlObject(Map mappingNode, YamlObject yamlObject) {
+ Set<Entry> entries = (Set<Entry>) mappingNode.entrySet();
+ for (Entry entry: entries) {
+ if (!yamlObject.isFound()) {
+ if (entry.equals(yamlObject.getValue())) {
+ yamlObject.setParentNode(mappingNode);
+ }
+ else {
+ findYamlObject(entry.getValue(), yamlObject);
+ }
+ }
+ else {
+ break;
+ }
+ }
+ }
+
+ private static boolean isCreatedYamlObject(List<Entry> createdNodes, YamlObject yamlObject) {
+ for (Entry createdNode : createdNodes) {
+ if (createdNode.equals(yamlObject.getValue())) {
+ return true;
+ }
+ else {
+ boolean isCreatedYamlObject = ownsYamlObject(createdNode.getValue(), yamlObject);
+ if (isCreatedYamlObject) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public static String getPrefixOfType(YamlNodeType yamlNodeType) {
+ String prefix;
+ switch(yamlNodeType) {
+ case ScalarNode:
+ prefix = String.valueOf(YamlProperty.PROPERTY_SCALAR);
+ break;
+
+ case MappingNode:
+ prefix = String.valueOf(YamlProperty.PROPERTY_MAPPING);
+ break;
+
+ case ListNode:
+ prefix = String.valueOf(YamlProperty.PROPERTY_LIST);
+ break;
+
+ default:
+ prefix = null;
+ }
+ return prefix + YamlProperty.PROPERTY_SEPARATOR;
+ }
+
+ public static String getTypeNameOf(Entry node) {
+ YamlNodeType yamlNodeType = getNodeType(node);
+ return getPrefixOfType(yamlNodeType);
+ }
+
+ public static Object getYamlContent(File file) throws FileNotFoundException, IOException {
+ Object yamlContent = null;
+ Yaml yaml = new Yaml();
+ try(InputStream inputStream = new FileInputStream(file)) {
+ yamlContent = yaml.load(inputStream);
+ }
+ return yamlContent;
+ }
+
+ public static Object getYamlContent(String yamlContent) {
+ Yaml yaml = new Yaml();
+ return yaml.load(yamlContent);
+ }
+
+ public static void storeYamlContent(File file, Object yamlContent) throws IOException {
+ try(FileWriter writer = new FileWriter(file)) {
+ DumperOptions dumperOptions = new DumperOptions();
+ dumperOptions.setPrettyFlow(true);
+ dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
+ Yaml yaml = new Yaml(dumperOptions);
+ yaml.dump(yamlContent, writer);
+ }
+ }
+
+ public static Entry getRootNode(Object yamlContent) {
+ Map<String, Object> map = new LinkedHashMap<String, Object>();
+ map.put(YamlProperty.PROPERTY_ROOT, yamlContent);
+ return map.entrySet().iterator().next();
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlObject.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlObject.java
new file mode 100644
index 0000000..a098ee9
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlObject.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.util.Map;
+
+public class YamlObject {
+
+ protected Object value;
+ protected Map parentNode;
+ protected boolean isFound;
+
+ public YamlObject(Object value) {
+ this.value = value;
+ }
+
+ public Object getValue() {
+ return this.value;
+ }
+
+ public Map getParentNode() {
+ return parentNode;
+ }
+
+ public void setParentNode(Map parentNode) {
+ this.parentNode = parentNode;
+ }
+
+ public void setIsFound(boolean isFound) {
+ this.isFound = isFound;
+ }
+
+ public boolean isFound() {
+ return (this.isFound || (this.parentNode != null));
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlProperty.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlProperty.java
new file mode 100644
index 0000000..22149d6
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlProperty.java
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+public class YamlProperty {
+
+ protected String property;
+ protected YamlNodeType type;
+ protected boolean many;
+ protected boolean isScalarNode;
+ protected boolean isMappingNode;
+ protected boolean isListNode;
+
+ public static final char PROPERTY_MAPPING = 'm';
+ public static final char PROPERTY_LIST = 'l';
+ public static final char PROPERTY_SCALAR = 's';
+ public static final char PROPERTY_COLLECTION = 'c';
+ public static final char PROPERTY_ONE_ELEMENT = 'e';
+ public static final char PROPERTY_SEPARATOR = '_';
+ public static final String PROPERTY_ROOT = "YamlRoot";
+ public static final String PROPERTY_FILE = "file";
+
+ public static YamlProperty parse(String property, int indexOfSeparator) {
+ YamlProperty yamlProperty = new YamlProperty();
+ yamlProperty.type = YamlNodeUtility.getNodeType(property);
+ if (yamlProperty.type == null) {
+ yamlProperty.many = (indexOfSeparator == 2) ? isManyFor(property) : true;
+ yamlProperty.property = property.substring(indexOfSeparator + 1);
+ if (propertyHasPrefix(property, indexOfSeparator, PROPERTY_SCALAR)) {
+ yamlProperty.type = YamlNodeType.ScalarNode;
+ }
+ else if (propertyHasPrefix(property, indexOfSeparator, PROPERTY_MAPPING)) {
+ yamlProperty.type = YamlNodeType.MappingNode;
+ } else if (propertyHasPrefix(property, indexOfSeparator, PROPERTY_LIST)) {
+ yamlProperty.type = YamlNodeType.ListNode;
+ } else {
+ yamlProperty = null;
+ }
+ }
+ setNodeType(yamlProperty, property);
+ return yamlProperty;
+ }
+
+ private static void setNodeType(YamlProperty yamlProperty, String property) {
+ if ((yamlProperty != null) && (yamlProperty.type != null)) {
+ yamlProperty.isScalarNode = (yamlProperty.type.equals(YamlNodeType.Node)) ? true : (yamlProperty.type.equals(YamlNodeType.ScalarNode));
+ yamlProperty.isMappingNode = (yamlProperty.type.equals(YamlNodeType.Node)) ? true : (yamlProperty.type.equals(YamlNodeType.MappingNode));
+ yamlProperty.isListNode = (yamlProperty.type.equals(YamlNodeType.Node)) ? true : (yamlProperty.type.equals(YamlNodeType.ListNode));
+ }
+ }
+
+ private static boolean propertyHasPrefix(String property, int indexOfSeparator, char prefix) {
+ return (property.charAt(0) == prefix) && (property.charAt(indexOfSeparator) == PROPERTY_SEPARATOR);
+ }
+
+ private static boolean isManyFor(String property) {
+ return (property.charAt(1) == PROPERTY_ONE_ELEMENT) ? false : true;
+ }
+
+ public String getProperty() {
+ return property;
+ }
+
+ public YamlNodeType getType() {
+ return type;
+ }
+
+ public boolean isMany() {
+ return many;
+ }
+
+ public boolean isScalarNode() {
+ return isScalarNode;
+ }
+
+ public boolean isMappingNode() {
+ return isMappingNode;
+ }
+
+ public boolean isListNode() {
+ return isListNode;
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertyGetter.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertyGetter.java
new file mode 100644
index 0000000..0410c64
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertyGetter.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.eol.execute.context.IEolContext;
+import org.eclipse.epsilon.eol.execute.introspection.java.JavaPropertyGetter;
+
+public class YamlPropertyGetter extends JavaPropertyGetter {
+
+ protected YamlModel model;
+
+ public YamlPropertyGetter(YamlModel model) {
+ this.model = model;
+ }
+
+ @Override
+ public Object invoke(Object object, String property, IEolContext context) throws EolRuntimeException {
+ synchronized (this.model) {
+ if ((object instanceof Entry) || (object instanceof Map) || (object instanceof List)) {
+ Object yamlContent = object;
+ if (object instanceof Entry) {
+ yamlContent = ((Entry)object).getValue();
+ if(property.endsWith("value")) {
+ return YamlTypeConverter.getValue(yamlContent, property);
+ }
+ else if(property.equals("name")) {
+ return ((Entry)object).getKey();
+ }
+ else if(property.equals("type")) {
+ return YamlNodeUtility.getNodeType((Entry)object);
+ }
+ }
+ YamlProperty yamlProperty = YamlProperty.parse(property, 2);
+ Collection<Entry> queryResult = YamlNodeUtility.getNodes(yamlContent, yamlProperty, false);
+ return YamlNodeUtility.getQueryResult(queryResult, yamlProperty);
+ }
+ else {
+ return super.invoke(object, property, context);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertySetter.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertySetter.java
new file mode 100644
index 0000000..88a015d
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlPropertySetter.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+import java.util.List;
+import java.util.Map.Entry;
+import org.eclipse.epsilon.eol.exceptions.EolIllegalPropertyException;
+import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
+import org.eclipse.epsilon.eol.execute.context.IEolContext;
+import org.eclipse.epsilon.eol.execute.introspection.AbstractPropertySetter;
+
+public class YamlPropertySetter extends AbstractPropertySetter {
+
+ protected YamlModel model;
+
+ public YamlPropertySetter(YamlModel model) {
+ this.model = model;
+ }
+
+ @Override
+ public void invoke(Object object, String property, Object value, IEolContext context) throws EolRuntimeException {
+ synchronized (this.model) {
+ if("value".equals(property)) {
+ if (object instanceof Entry) {
+ setValue((Entry)object, value);
+ }
+ else if(object instanceof List) {
+ setValue((List)object, value);
+ }
+ else {
+ throw new EolIllegalPropertyException(object, property, context);
+ }
+ }
+ else {
+ super.invoke(object, property, context);
+ }
+ }
+ }
+
+ private void setValue(Entry node, Object value) {
+ Object newValue = (value instanceof Entry) ? ((Entry)value).getValue() : value;
+ if(YamlProperty.PROPERTY_ROOT.equals(node.getKey())) {
+ this.model.setYamlContent(newValue);
+ }
+ node.setValue(newValue);
+ }
+
+ private void setValue(List listNode, Object value) {
+ for(Entry node: (List<Entry>) listNode) {
+ setValue(node, value);
+ }
+ }
+}
\ No newline at end of file
diff --git a/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlTypeConverter.java b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlTypeConverter.java
new file mode 100644
index 0000000..080a2dd
--- /dev/null
+++ b/plugins/org.eclipse.epsilon.emc.yaml/src/org/eclipse/epsilon/emc/yaml/YamlTypeConverter.java
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2022 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/
+ *
+ * Contributors:
+ * Ionut Predoaia - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.epsilon.emc.yaml;
+
+public class YamlTypeConverter {
+
+ protected static YamlDataType dataType;
+
+ public static final char PROPERTY_STRING = 's';
+ public static final char PROPERTY_BOOLEAN = 'b';
+ public static final char PROPERTY_INTEGER = 'i';
+ public static final char PROPERTY_FLOAT = 'f';
+ public static final char PROPERTY_DOUBLE = 'd';
+
+ public static Object getValue(Object object, String property) {
+ YamlDataType yamlPropertyDataType = null;
+ if(property.charAt(1) == YamlProperty.PROPERTY_SEPARATOR) {
+ yamlPropertyDataType = dataTypeFor(property.charAt(0));
+ }
+ return (yamlPropertyDataType == null) ? object : cast(object.toString(), yamlPropertyDataType);
+ }
+
+ public static Object cast(String value, YamlDataType dataType) {
+ value = value.trim();
+ switch(dataType)
+ {
+ case BOOLEAN:
+ return Boolean.parseBoolean(value);
+
+ case INTEGER:
+ return parseInteger(value);
+
+ case FLOAT:
+ return parseFloat(value);
+
+ case DOUBLE:
+ return parseDouble(value);
+
+ default:
+ return value;
+ }
+ }
+
+ private static int parseInteger(String value) {
+ try {
+ return Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex) {
+ return 0;
+ }
+ }
+
+ private static float parseFloat(String value) {
+ try {
+ return Float.parseFloat(value);
+ }
+ catch (NumberFormatException ex) {
+ return 0.0f;
+ }
+ }
+
+ private static double parseDouble(String value) {
+ try {
+ return Double.parseDouble(value);
+ }
+ catch (NumberFormatException ex) {
+ return 0.0d;
+ }
+ }
+
+ private static YamlDataType dataTypeFor(char prefix) {
+ YamlDataType dataType = null;
+ switch(prefix)
+ {
+ case PROPERTY_STRING:
+ dataType = YamlDataType.STRING;
+ break;
+
+ case PROPERTY_BOOLEAN:
+ dataType = YamlDataType.BOOLEAN;
+ break;
+
+ case PROPERTY_INTEGER:
+ dataType = YamlDataType.INTEGER;
+ break;
+
+ case PROPERTY_FLOAT:
+ dataType = YamlDataType.FLOAT;
+ break;
+
+ case PROPERTY_DOUBLE:
+ dataType = YamlDataType.DOUBLE;
+ break;
+ }
+ return dataType;
+ }
+}
\ No newline at end of file
diff --git a/plugins/pom.xml b/plugins/pom.xml
index 4c9478d..7fef37f 100644
--- a/plugins/pom.xml
+++ b/plugins/pom.xml
@@ -48,6 +48,8 @@
<module>org.eclipse.epsilon.emc.muddle</module>
<module>org.eclipse.epsilon.emc.plainxml</module>
<module>org.eclipse.epsilon.emc.plainxml.dt</module>
+ <module>org.eclipse.epsilon.emc.yaml</module>
+ <module>org.eclipse.epsilon.emc.yaml.dt</module>
<module>org.eclipse.epsilon.emc.spreadsheets</module>
<module>org.eclipse.epsilon.emc.spreadsheets.excel</module>
<module>org.eclipse.epsilon.emc.spreadsheets.excel.dt</module>
diff --git a/pom-plain.xml b/pom-plain.xml
index 4ba347e..a462e34 100644
--- a/pom-plain.xml
+++ b/pom-plain.xml
@@ -66,6 +66,11 @@
<roles><role>Committer</role></roles>
</developer>
<developer>
+ <id>ionutpredoaia</id>
+ <name>Ionut Predoaia</name>
+ <roles><role>Committer</role></roles>
+ </developer>
+ <developer>
<id>jonco</id>
<name>Jonathan Co</name>
<roles><role>Committer</role></roles>
@@ -133,6 +138,7 @@
<module>plugins/org.eclipse.epsilon.emc.composite/pom-plain.xml</module>
<module>plugins/org.eclipse.epsilon.emc.csv/pom-plain.xml</module>
<module>plugins/org.eclipse.epsilon.emc.plainxml/pom-plain.xml</module>
+ <module>plugins/org.eclipse.epsilon.emc.yaml/pom-plain.xml</module>
<module>plugins/org.eclipse.epsilon.eml.engine/pom-plain.xml</module>
<module>plugins/org.eclipse.epsilon.emg.engine/pom-plain.xml</module>
<module>plugins/org.eclipse.epsilon.eol.engine/pom-plain.xml</module>
diff --git a/releng/org.eclipse.epsilon.updatesite/category.xml b/releng/org.eclipse.epsilon.updatesite/category.xml
index bc1bbe1..a9693b4 100644
--- a/releng/org.eclipse.epsilon.updatesite/category.xml
+++ b/releng/org.eclipse.epsilon.updatesite/category.xml
@@ -81,6 +81,12 @@
<feature id="org.eclipse.epsilon.emc.csv.feature">
<category name="Epsilon Spreadsheet Integration"/>
</feature>
+ <feature id="org.eclipse.epsilon.emc.yaml.dt.feature">
+ <category name="Epsilon YAML Integration"/>
+ </feature>
+ <feature id="org.eclipse.epsilon.emc.yaml.feature">
+ <category name="Epsilon YAML Integration"/>
+ </feature>
<feature id="org.eclipse.epsilon.emc.html.dt.feature">
<category name="Epsilon HTML Integration"/>
</feature>
@@ -106,6 +112,11 @@
Support for managing EMF-based models with languages of the Epsilon platform.
</description>
</category-def>
+ <category-def name="Epsilon YAML Integration" label="Epsilon YAML Integration">
+ <description>
+ Support for managing YAML-based models with languages of the Epsilon platform.
+ </description>
+ </category-def>
<category-def name="Picto" label="Picto">
<description>
Model visualisation via model-to-text transformation.
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/.classpath b/tests/org.eclipse.epsilon.emc.yaml.test/.classpath
new file mode 100644
index 0000000..eca7bdb
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/.project b/tests/org.eclipse.epsilon.emc.yaml.test/.project
new file mode 100644
index 0000000..a804f84
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.emc.yaml.test</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.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/EPL-2.0.html b/tests/org.eclipse.epsilon.emc.yaml.test/EPL-2.0.html
new file mode 100644
index 0000000..637a181
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/EPL-2.0.html
@@ -0,0 +1,300 @@
+<!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/tests/org.eclipse.epsilon.emc.yaml.test/META-INF/MANIFEST.MF b/tests/org.eclipse.epsilon.emc.yaml.test/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..69b475d
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test
+Bundle-SymbolicName: org.eclipse.epsilon.emc.yaml.test
+Bundle-Version: 2.4.0.qualifier
+Bundle-Activator: org.eclipse.epsilon.emc.yaml.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.epsilon.emc.yaml,
+ org.eclipse.epsilon.test.dependencies
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.epsilon.emc.yaml.test
+Automatic-Module-Name: org.eclipse.epsilon.emc.yaml.test
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/about.html b/tests/org.eclipse.epsilon.emc.yaml.test/about.html
new file mode 100644
index 0000000..b491992
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/about.html
@@ -0,0 +1,28 @@
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>April 27, 2020</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 2.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v20.html">http://www.eclipse.org/legal/epl-v20.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/build.properties b/tests/org.eclipse.epsilon.emc.yaml.test/build.properties
new file mode 100644
index 0000000..9d5fb68
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+EPL-2.0.html,\
+about.html,\
+ .
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/pom.xml b/tests/org.eclipse.epsilon.emc.yaml.test/pom.xml
new file mode 100644
index 0000000..1e5df06
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/pom.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ <parent>
+ <groupId>org.eclipse.epsilon</groupId>
+ <artifactId>tests</artifactId>
+ <version>2.4.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.epsilon.emc.yaml.test</artifactId>
+ <packaging>eclipse-plugin</packaging>
+</project>
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/Activator.java b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/Activator.java
new file mode 100644
index 0000000..aea6778
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/Activator.java
@@ -0,0 +1,59 @@
+/*********************************************************************
+* Copyright (c) 2022 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.emc.yaml.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.epsilon.emc.yaml.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlModelTests.java b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlModelTests.java
new file mode 100644
index 0000000..61fdcfc
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlModelTests.java
@@ -0,0 +1,187 @@
+/*********************************************************************
+* Copyright (c) 2022 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.emc.yaml.test;
+
+import org.eclipse.epsilon.emc.yaml.YamlModel;
+import org.eclipse.epsilon.eol.EolEvaluator;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class YamlModelTests {
+
+ protected YamlModel model;
+ protected EolEvaluator evaluator;
+
+ @Before
+ public void setup() throws Exception {
+ model = new YamlModel();
+ model.setName("M");
+ model.setReadOnLoad(true);
+ model.setYamlContent(
+ "- firstName:" + newline()
+ + " age: 45" + newline()
+ + " data:" + newline()
+ + " isEncrypted: true" + newline()
+ + " firewall:" + newline()
+ + " - type: \"true\"" + newline()
+ + " - type: warning" + newline()
+ + " number: 4567868" + newline()
+ + "- coordinate:" + newline()
+ + " x_axis: 33" + newline()
+ + " y_axis: 10" + newline()
+ + " lastName: Melzer" + newline()
+ + " dataTypes:" + newline()
+ + " - numerics" + newline()
+ + " - strings" + newline()
+ + " - booleans"
+ );
+ model.load();
+ evaluator = new EolEvaluator(model);
+ }
+
+ public String newline() {
+ return System.getProperty("line.separator");
+ }
+
+ @Test
+ public void testIsPropertyCollection() {
+ assertEquals(evaluator.evaluate("l_firewall.all.sc_type").toString(), "EolSequence [[type=true, type=warning]]");
+ }
+
+ @Test
+ public void testIsPropertyOneElement() {
+ assertEquals(evaluator.evaluate("l_firewall.all.se_type").toString(), "EolSequence [type=true]");
+ }
+
+ @Test
+ public void testGetName() {
+ assertEquals(evaluator.evaluate("s_number.all.first().name"), "number");
+ }
+
+ @Test
+ public void testGetType() {
+ assertEquals(evaluator.evaluate("s_number.all.first().type").toString(), "ScalarNode");
+ }
+
+ @Test
+ public void testGetValue() {
+ assertEquals(evaluator.evaluate("s_number.all.first().value"), 4567868);
+ }
+
+ @Test
+ public void testGetValueString() {
+ assertEquals(evaluator.evaluate("s_number.all.first().s_value"), "4567868");
+ }
+
+ @Test
+ public void testGetValueBoolean() {
+ assertEquals(evaluator.evaluate("l_firewall.all.se_type.first().b_value"), true);
+ }
+
+ @Test
+ public void testGetValueInteger() {
+ assertEquals(evaluator.evaluate("s_number.all.first().i_value"), 4567868);
+ }
+
+ @Test
+ public void testGetValueDouble() {
+ assertEquals(evaluator.evaluate("s_number.all.first().d_value"), 4567868.0d);
+ }
+
+ @Test
+ public void testGetValueFloat() {
+ assertEquals(evaluator.evaluate("s_number.all.first().f_value"), 4567868.0f);
+ }
+
+ @Test
+ public void testGetScalarNode() {
+ assertEquals(evaluator.evaluate("s_lastName.all.first()").toString(), "lastName=Melzer");
+ }
+
+ @Test
+ public void testGetMappingNode() {
+ assertEquals(evaluator.evaluate("m_data.all.first()").toString(), "data={isEncrypted=true}");
+ }
+
+ @Test
+ public void testGetListNode() {
+ assertEquals(evaluator.evaluate("l_firewall.all.first()").toString(), "firewall=[{type=true}, {type=warning, number=4567868}]");
+ }
+
+ @Test
+ public void testGetScalarNodes() {
+ assertEquals(evaluator.evaluate("ScalarNode.all").toString(), "[age=45, isEncrypted=true, type=true, type=warning, number=4567868, x_axis=33, y_axis=10, lastName=Melzer]");
+ }
+
+ @Test
+ public void testGetMappingNodes() {
+ assertEquals(evaluator.evaluate("MappingNode.all").toString(), "[firstName={age=45}, data={isEncrypted=true}, coordinate={x_axis=33, y_axis=10}]");
+ }
+
+ @Test
+ public void testGetListNodes() {
+ assertEquals(evaluator.evaluate("ListNode.all").toString(), "[firewall=[{type=true}, {type=warning, number=4567868}], dataTypes=[numerics, strings, booleans]]");
+ }
+
+ @Test
+ public void testSetNode() {
+ evaluator.execute("m_data.all.at(0).value = 100;");
+ assertEquals(evaluator.evaluate("s_data.all.at(0).value"), 100);
+ }
+
+ @Test
+ public void testDeleteNode() {
+ evaluator.execute("delete m_firstName.all.at(0);");
+ assertEquals(evaluator.evaluate("m_firstName.all").toString(), "[]");
+ }
+
+ @Test
+ public void testCreateNodes() {
+ String previousYamlContent = evaluator.evaluate("M.root").toString();
+ evaluator.execute(
+ "M.setRootAsList();" + newline()
+ + "var root = M.root;" + newline()
+ + "root.value.addRows(2);" + newline()
+ + "var firstRow = root.value.at(0);" + newline()
+ + "var secondRow = root.value.at(1);" + newline()
+ + "var firstNameNode = new m_firstName;" + newline()
+ + "var ageNode = new s_age(45);" + newline()
+ + "firstNameNode.value.appendNode(ageNode);" + newline()
+ + "var dataNode = new m_data;" + newline()
+ + "var isEncryptedNode = new s_isEncrypted(true);" + newline()
+ + "dataNode.value.appendNode(isEncryptedNode);" + newline()
+ + "var firewallNode = new l_firewall(2);" + newline()
+ + "var typeNode1 = new s_type(\"true\");" + newline()
+ + "var typeNode2 = new s_type(\"warning\");" + newline()
+ + "var numberNode = new s_number(4567868);" + newline()
+ + "firewallNode.value.at(0).appendNode(typeNode1);" + newline()
+ + "firewallNode.value.at(1).appendNode(typeNode2);" + newline()
+ + "firewallNode.value.at(1).appendNode(numberNode);" + newline()
+ + "var coordinate = new m_coordinate;" + newline()
+ + "var x_axisNode = new s_x_axis(33);" + newline()
+ + "var y_axisNode = new s_y_axis(10);" + newline()
+ + "coordinate.value.appendNode(x_axisNode);" + newline()
+ + "coordinate.value.appendNode(y_axisNode);"
+ + "var lastNameNode = new s_lastName(\"Melzer\");" + newline()
+ + "var dataTypesNode = new l_dataTypes(3);" + newline()
+ + "dataTypesNode.value.set(0, \"numerics\");" + newline()
+ + "dataTypesNode.value.set(1, \"strings\");" + newline()
+ + "dataTypesNode.value.set(2, \"booleans\");" + newline()
+ + "firstRow.appendNode(firstNameNode);" + newline()
+ + "firstRow.appendNode(dataNode);" + newline()
+ + "firstRow.appendNode(firewallNode);" + newline()
+ + "secondRow.appendNode(coordinate);" + newline()
+ + "secondRow.appendNode(lastNameNode);" + newline()
+ + "secondRow.appendNode(dataTypesNode);");
+ assertEquals(previousYamlContent, evaluator.evaluate("M.root").toString());
+ }
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlTestSuite.java b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlTestSuite.java
new file mode 100644
index 0000000..45e2ac5
--- /dev/null
+++ b/tests/org.eclipse.epsilon.emc.yaml.test/src/org/eclipse/epsilon/emc/yaml/test/YamlTestSuite.java
@@ -0,0 +1,27 @@
+/*********************************************************************
+* Copyright (c) 2022 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.emc.yaml.test;
+
+import junit.framework.JUnit4TestAdapter;
+import junit.framework.Test;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses(YamlModelTests.class)
+public class YamlTestSuite {
+
+ public static Test suite() {
+ return new JUnit4TestAdapter(YamlTestSuite.class);
+ }
+
+}
\ No newline at end of file
diff --git a/tests/org.eclipse.epsilon.test.dependencies/META-INF/MANIFEST.MF b/tests/org.eclipse.epsilon.test.dependencies/META-INF/MANIFEST.MF
index 99ec1a8..f48add4 100644
--- a/tests/org.eclipse.epsilon.test.dependencies/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.epsilon.test.dependencies/META-INF/MANIFEST.MF
@@ -14,7 +14,8 @@
org.eclipse.epsilon.eunit.engine;visibility:=reexport,
org.eclipse.epsilon.emc.emf;visibility:=reexport,
org.eclipse.epsilon.hutn.engine;visibility:=reexport,
- org.eclipse.epsilon.emc.plainxml;visibility:=reexport
+ org.eclipse.epsilon.emc.plainxml;visibility:=reexport,
+ org.eclipse.epsilon.emc.yaml;visibility:=reexport
Bundle-Vendor: Eclipse.org
Export-Package: org,
org.antlr,
diff --git a/tests/org.eclipse.epsilon.test/META-INF/MANIFEST.MF b/tests/org.eclipse.epsilon.test/META-INF/MANIFEST.MF
index cf05d58..b9a22b0 100644
--- a/tests/org.eclipse.epsilon.test/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.epsilon.test/META-INF/MANIFEST.MF
@@ -20,6 +20,7 @@
org.eclipse.epsilon.etl.engine.test.acceptance,
org.eclipse.epsilon.emc.hutn.test,
org.eclipse.epsilon.emc.plainxml.test,
+ org.eclipse.epsilon.emc.yaml.test,
org.eclipse.epsilon.common.test,
org.eclipse.epsilon.workflow.test,
org.eclipse.epsilon.evl.engine.test.acceptance,
diff --git a/tests/org.eclipse.epsilon.test/src/org/eclipse/epsilon/test/EpsilonJenkinsTestSuite.java b/tests/org.eclipse.epsilon.test/src/org/eclipse/epsilon/test/EpsilonJenkinsTestSuite.java
index 6cbaedc..228a457 100644
--- a/tests/org.eclipse.epsilon.test/src/org/eclipse/epsilon/test/EpsilonJenkinsTestSuite.java
+++ b/tests/org.eclipse.epsilon.test/src/org/eclipse/epsilon/test/EpsilonJenkinsTestSuite.java
@@ -28,6 +28,7 @@
import org.eclipse.epsilon.emc.graphml.tests.*;
import org.eclipse.epsilon.emc.hutn.test.*;
import org.eclipse.epsilon.emc.plainxml.test.*;
+import org.eclipse.epsilon.emc.yaml.test.*;
import org.eclipse.epsilon.emc.spreadsheets.test.*;
import org.eclipse.epsilon.eml.engine.test.acceptance.*;
import org.eclipse.epsilon.eol.engine.test.acceptance.*;
@@ -83,6 +84,7 @@
EwlAcceptanceTestSuite.class,
EplAcceptanceTestSuite.class,
PlainXmlTestSuite.class,
+ YamlTestSuite.class,
BibtexModelTestSuite.class,
GraphmlTestSuite.class,
EmfTestSuite.class,
diff --git a/tests/pom.xml b/tests/pom.xml
index 754bb1e..21f4fe5 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -32,6 +32,7 @@
<module>org.eclipse.epsilon.emc.graphml.tests</module>
<module>org.eclipse.epsilon.emc.hutn.test</module>
<module>org.eclipse.epsilon.emc.plainxml.test</module>
+ <module>org.eclipse.epsilon.emc.yaml.test</module>
<module>org.eclipse.epsilon.emc.simulink.common.test</module>
<module>org.eclipse.epsilon.emc.simulink.test</module>
<module>org.eclipse.epsilon.emc.simulink.dictionary.test</module>