Added Flexmi example with vehicles
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/.project b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/.project
new file mode 100644
index 0000000..30af4c3
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.epsilon.examples.flexmi.vehicles</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicle2svg.egl b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicle2svg.egl
new file mode 100644
index 0000000..60acf21
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicle2svg.egl
@@ -0,0 +1,99 @@
+[%
+var top = v.wheels.sublist(0, v.wheels.size()/2);
+var bottom = v.wheels.excludingAll(top);
+var rearWindowWidth = 35;
+var roofWidth = Sequence{top.size()*90, 150}.max();
+var spacing = 10;
+var frontWindowWidth = 45;
+var engineWidth = 80;
+var regPlateWidth = 103;
+var bodyWidth = rearWindowWidth + roofWidth + frontWindowWidth + engineWidth + spacing*5;
+var regPlateX = rearWindowWidth+spacing*2+roofWidth/2-regPlateWidth/2;
+%]
+<html>
+<body>
+<style>
+.round {
+ stroke-linejoin: round;
+}
+</style>
+<svg width="580" height="400" xmlns="http://www.w3.org/2000/svg">
+ <g>
+ <rect fill="#fff" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
+ <g display="none" overflow="visible" y="0" x="0" height="100%" width="100%" id="canvasGrid">
+ <rect fill="url(#gridpattern)" stroke-width="0" y="0" x="0" height="100%" width="100%"/>
+ </g>
+ </g>
+ <g>
+ <title>[%=v.reg%]</title>
+
+
+ <!-- Wheels -->
+ [%for(w in top){%]
+ <rect rx="10" height="30" width="50" y="50" x="[%=50+(loopCount-1)*120%]" stroke-width="1.5" stroke="#000" fill="#666666"/>
+ <text xml:space="preserve" text-anchor="start"
+ font-family="Helvetica, Arial, sans-serif" font-size="16"
+ y="40" x="[%=60+(loopCount-1)*120%]" fill-opacity="null" stroke-opacity="null"
+ stroke-width="0" stroke="#000" fill="#000000">[%=w.size%]''</text>
+ [%}%]
+ [%for(w in bottom){%]
+ <rect rx="10" height="30" width="50" y="140" x="[%=50+(loopCount-1)*120%]" stroke-width="1.5" stroke="#000" fill="#666666"/>
+ <text xml:space="preserve" text-anchor="start"
+ font-family="Helvetica, Arial, sans-serif" font-size="16"
+ y="192" x="[%=60+(loopCount-1)*120%]" fill-opacity="null" stroke-opacity="null"
+ stroke-width="0" stroke="#000" fill="#000000">[%=w.size%]''</text>
+ [%}%]
+
+ <!-- Main body -->
+ <rect rx="20" id="svg_1" height="100" width="[%=bodyWidth%]" y="60" x="1" stroke-width="1.5" stroke="#000" fill="#[%=v.getColour()%]"/>
+
+ <!-- Rear window -->
+ <!--rect rx="10" id="svg_8" height="80" width="[%=rearWindowWidth%]" y="70" x="[%=spacing%]" stroke-width="1.5" stroke="#000" fill="#fff"/-->
+ <polygon class="round" stroke-width="1.5" points="[%=spacing%],70 [%=spacing+rearWindowWidth%],75 [%=rearWindowWidth+spacing%],145 [%=spacing%],150" stroke="#000" fill="#fff"/>
+
+ <!-- Roof -->
+ <rect id="svg_5" height="70" width="[%=roofWidth%]" y="75" x="[%=rearWindowWidth+spacing*2%]" stroke-width="1.5" stroke="#000" fill="#[%=v.getColour()%]"/>
+
+ <!-- Front window -->
+ <polygon class="round" stroke-width="1.5" points="[%=rearWindowWidth+roofWidth+spacing*3%],75 [%=rearWindowWidth+roofWidth+spacing*3+frontWindowWidth%],70 [%=rearWindowWidth+roofWidth+spacing*3+frontWindowWidth%],150 [%=rearWindowWidth+roofWidth+spacing*3%],145" stroke="#000" fill="#fff"/>
+
+ <!-- Engine -->
+ <rect rx="10" id="svg_8" height="80" width="[%=engineWidth%]" y="70" x="[%=rearWindowWidth+roofWidth+frontWindowWidth+spacing*4%]" stroke-width="1.5" stroke="#000" fill="#[%=v.getEngineColour()%]"/>
+ <text xml:space="preserve" text-anchor="start"
+ font-family="Helvetica, Arial, sans-serif" font-size="16"
+ y="117" x="[%=rearWindowWidth+roofWidth+frontWindowWidth+spacing*5%]" fill-opacity="null" stroke-opacity="null"
+ stroke-width="0" stroke="#000" fill="#000000">[%=v.getEngineLabel()%]CC</text>
+
+ <!-- Reg plate -->
+ <rect rx="0" id="svg_8" height="30" width="[%=regPlateWidth%]" y="95" x="[%=regPlateX%]" stroke-width="1.5" stroke="#000" fill="#ecc274"/>
+ <text xml:space="preserve" text-anchor="start"
+ font-family="UKNumberPlate, sans-serif" font-size="20"
+ y="117" x="[%=regPlateX+spacing%]" fill-opacity="1" stroke-opacity="null"
+ stroke-width="0" stroke="#000" fill="#000">[%=v.reg%]</text>
+
+
+ </g>
+</svg>
+</body>
+</html>
+
+[%
+operation Vehicle getColour() {
+ if (self.colour.isDefined()) return self.colour;
+ else return "ffffff";
+}
+
+operation Engine getColour(){
+ if (self.isTypeOf(DieselEngine)) return "cce8f2";
+ else return "cccccc";
+}
+operation Vehicle getEngineLabel() {
+ if (self.engine.isDefined()) return self.engine.cc;
+ else return "???";
+}
+
+operation Vehicle getEngineColour() {
+ if (self.engine.isDefined()) return self.engine.getColour();
+ else return "fff";
+}
+%]
\ No newline at end of file
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore
new file mode 100644
index 0000000..0555bc6
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="vehicles" nsURI="vehicles" nsPrefix="">
+ <eClassifiers xsi:type="ecore:EClass" name="Vehicle">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="reg" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="colour" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="wheels" upperBound="-1"
+ eType="#//Wheel" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="engine" eType="#//Engine"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Engine" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="cc" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="DieselEngine" eSuperTypes="#//Engine"/>
+ <eClassifiers xsi:type="ecore:EClass" name="PetrolEngine" eSuperTypes="#//Engine"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Wheel">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="size" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore_diagram b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore_diagram
new file mode 100644
index 0000000..aa4e636
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.ecore_diagram
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_dF1R4FuNEemnK64eMxisZw" type="Ecore" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_dSAssFuNEemnK64eMxisZw" type="2001" fontName=".SF NS Text">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dSDwAFuNEemnK64eMxisZw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSGzUFuNEemnK64eMxisZw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSGzUVuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSGzUluNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSGzU1uNEemnK64eMxisZw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSGzVFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSGzVVuNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSGzVluNEemnK64eMxisZw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSGzV1uNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSGzWFuNEemnK64eMxisZw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="vehicles.ecore#//Vehicle"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dSAssVuNEemnK64eMxisZw" x="179" y="45"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_dSHaYFuNEemnK64eMxisZw" type="2001" fontName=".SF NS Text">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dSHaYluNEemnK64eMxisZw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSHaY1uNEemnK64eMxisZw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSHaZFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSHaZVuNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSHaZluNEemnK64eMxisZw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSHaZ1uNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSHaaFuNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSHaaVuNEemnK64eMxisZw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSHaaluNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSHaa1uNEemnK64eMxisZw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="vehicles.ecore#//Engine"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dSHaYVuNEemnK64eMxisZw" x="332" y="180"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_dSHabFuNEemnK64eMxisZw" type="2001" fontName=".SF NS Text">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dSHabluNEemnK64eMxisZw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSHab1uNEemnK64eMxisZw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSHacFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSHacVuNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIBcFuNEemnK64eMxisZw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIBcVuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIBcluNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIBc1uNEemnK64eMxisZw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIBdFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIBdVuNEemnK64eMxisZw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="vehicles.ecore#//DieselEngine"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dSHabVuNEemnK64eMxisZw" x="276" y="292"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_dSIBdluNEemnK64eMxisZw" type="2001" fontName=".SF NS Text">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dSIBeFuNEemnK64eMxisZw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIBeVuNEemnK64eMxisZw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIBeluNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIBe1uNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIBfFuNEemnK64eMxisZw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIBfVuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIBfluNEemnK64eMxisZw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIBf1uNEemnK64eMxisZw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIBgFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIBgVuNEemnK64eMxisZw"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="vehicles.ecore#//PetrolEngine"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dSIBd1uNEemnK64eMxisZw" x="388" y="292"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_dSIBgluNEemnK64eMxisZw" type="2001" fontName=".SF NS Text">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dSIogFuNEemnK64eMxisZw" type="5001"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIogVuNEemnK64eMxisZw" type="7001">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIogluNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIog1uNEemnK64eMxisZw"/>
+ <layoutConstraint xmi:type="notation:Ratio" xmi:id="_gHUF4FuNEemnK64eMxisZw" value="0.2033898305084746"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIohFuNEemnK64eMxisZw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIohVuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIohluNEemnK64eMxisZw"/>
+ <layoutConstraint xmi:type="notation:Ratio" xmi:id="_gHUs8FuNEemnK64eMxisZw" value="0.3220338983050847"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_dSIoh1uNEemnK64eMxisZw" type="7003">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_dSIoiFuNEemnK64eMxisZw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_dSIoiVuNEemnK64eMxisZw"/>
+ <layoutConstraint xmi:type="notation:Ratio" xmi:id="_gHUs8VuNEemnK64eMxisZw" value="0.2033898305084746"/>
+ </children>
+ <element xmi:type="ecore:EClass" href="vehicles.ecore#//Wheel"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dSIBg1uNEemnK64eMxisZw" x="92" y="180"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_dF1R4VuNEemnK64eMxisZw"/>
+ <element xmi:type="ecore:EPackage" href="vehicles.ecore#/"/>
+ <edges xmi:type="notation:Connector" xmi:id="_dWlqsFuNEemnK64eMxisZw" type="4003" source="_dSAssFuNEemnK64eMxisZw" target="_dSIBgluNEemnK64eMxisZw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dWmRwFuNEemnK64eMxisZw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dWmRwVuNEemnK64eMxisZw" x="60" y="17"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_dWm40FuNEemnK64eMxisZw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dWm40VuNEemnK64eMxisZw" x="-26" y="-13"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_dWlqsVuNEemnK64eMxisZw" fontName=".SF NS Text"/>
+ <element xmi:type="ecore:EReference" href="vehicles.ecore#//Vehicle/wheels"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dWlqsluNEemnK64eMxisZw" points="[0, 0, 0, -60]$[0, 60, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYu_wFuNEemnK64eMxisZw" id="(0.4948453608247423,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYu_wVuNEemnK64eMxisZw" id="(0.5,0.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_dXVRkFuNEemnK64eMxisZw" type="4003" source="_dSAssFuNEemnK64eMxisZw" target="_dSHaYFuNEemnK64eMxisZw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_dXV4oFuNEemnK64eMxisZw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dXV4oVuNEemnK64eMxisZw" x="58" y="-19"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_dXV4oluNEemnK64eMxisZw" type="6004">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_dXV4o1uNEemnK64eMxisZw" x="-28" y="13"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_dXVRkVuNEemnK64eMxisZw" fontName=".SF NS Text"/>
+ <element xmi:type="ecore:EReference" href="vehicles.ecore#//Vehicle/engine"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dXVRkluNEemnK64eMxisZw" points="[0, 0, -102, -60]$[102, 60, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYu_wluNEemnK64eMxisZw" id="(0.7422680412371134,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYu_w1uNEemnK64eMxisZw" id="(0.24705882352941178,0.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_dXaKEFuNEemnK64eMxisZw" type="4004" source="_dSHabFuNEemnK64eMxisZw" target="_dSHaYFuNEemnK64eMxisZw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_dXaKEVuNEemnK64eMxisZw" fontName=".SF NS Text"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dXaKEluNEemnK64eMxisZw" points="[0, 0, 0, -83]$[0, 83, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYvm0FuNEemnK64eMxisZw" id="(0.5,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYvm0VuNEemnK64eMxisZw" id="(0.49411764705882355,0.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_dXfCkFuNEemnK64eMxisZw" type="4004" source="_dSIBdluNEemnK64eMxisZw" target="_dSHaYFuNEemnK64eMxisZw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_dXfCkVuNEemnK64eMxisZw" fontName=".SF NS Text"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dXfCkluNEemnK64eMxisZw" points="[0, 0, 114, -83]$[-114, 83, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYvm0luNEemnK64eMxisZw" id="(0.49333333333333335,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dYvm01uNEemnK64eMxisZw" id="(0.7411764705882353,0.0)"/>
+ </edges>
+</notation:Diagram>
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.egx b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.egx
new file mode 100644
index 0000000..19269e6
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.egx
@@ -0,0 +1,14 @@
+rule Vehicle2Svg
+ transform v : Vehicle {
+
+ parameters : Map {
+ "path" = Sequence{"Vehicles", v.reg},
+ "format" = "html",
+ "icon" = "diagram"
+ }
+
+ template : "vehicle2svg.egl"
+
+ target: v.reg + ".svg"
+
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.emf b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.emf
new file mode 100644
index 0000000..32bdc26
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.emf
@@ -0,0 +1,26 @@
+@namespace(uri="vehicles", prefix="")
+package vehicles;
+
+
+class Vehicle {
+ attr String reg;
+ attr String colour;
+ val Wheel[*] wheels;
+ val Engine engine;
+}
+
+abstract class Engine {
+ attr int cc;
+}
+
+class DieselEngine extends Engine {
+
+}
+
+class PetrolEngine extends Engine {
+
+}
+
+class Wheel {
+ attr int size;
+}
\ No newline at end of file
diff --git a/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.flexmi b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.flexmi
new file mode 100644
index 0000000..dd391d9
--- /dev/null
+++ b/examples/org.eclipse.epsilon.examples.flexmi.vehicles/vehicles.flexmi
@@ -0,0 +1,46 @@
+<?nsuri vehicles?>
+<?render-egx vehicles.egx?>
+<_>
+
+ <vehicle reg="SUP 3R1O" colour="c0c0c0">
+ <wheel size="12"/>
+ <wheel size="14"/>
+ <wheel size="12"/>
+ <wheel size="14"/>
+ <wheel size="10"/>
+ <wheel size="10"/>
+ <diesel cc="2800"/>
+ </vehicle>
+
+ <car wheel-size="14" colour="c0c0c0" reg="YY55 ABC">
+ <diesel cc="1600"/>
+ </car>
+
+ <car wheel-size="16" colour="c0c0c0" reg="YY55 BCD">
+ <petrol cc="1400"/>
+ </car>
+
+ <smallcar reg="B0R 1NG5" colour="e7817c"/>
+
+ <:template name="smallcar">
+ <content>
+ <car wheel-size="14">
+ <petrol cc="1000"/>
+ </car>
+ </content>
+ </:template>
+
+ <:template name="car">
+ <parameter name="wheel-size"/>
+ <content>
+ <vehicle>
+ <wheel size="${wheel-size}"/>
+ <wheel size="${wheel-size}"/>
+ <wheel size="${wheel-size}"/>
+ <wheel size="${wheel-size}"/>
+ <:slot/>
+ </vehicle>
+ </content>
+ </:template>
+
+</_>
\ No newline at end of file