Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap18
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/templates/readme.txt5
-rw-r--r--plugins/org.eclipse.etrice.core.etmap.ui/templates/templates.xml18
3 files changed, 32 insertions, 9 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap
index 2f79c4255..637eb0f70 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap
+++ b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap
@@ -1,9 +1,9 @@
-MappingModel cgenRef {
- import RoomModel1.* from "HelloWorld.room"
- import PhysicalModel1.* from "HelloWorld.etphys"
- Mapping LogSys1 -> PhysSys1 {
- SubSystemMapping SubSysRef1 -> nodeRef1 {
- ThreadMapping defaultThread -> PhysicalThread1
- }
- }
-}
+MappingModel MappingModel1 {
+ import RoomModel1.* from "HelloWorld.room"
+ import PhysicalModel1.* from "HelloWorld.etphys"
+ Mapping LogSys1 -> PhysSys1 {
+ SubSystemMapping SubSysRef1 -> nodeRef1 {
+ ThreadMapping defaultThread -> PhysicalThread1
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/templates/readme.txt b/plugins/org.eclipse.etrice.core.etmap.ui/templates/readme.txt
new file mode 100644
index 000000000..b31c7b9a0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/templates/readme.txt
@@ -0,0 +1,5 @@
+http://www.eclipse.org/Xtext/documentation/latest/xtext.html#templates
+
+However, these templates will not be visible by default. To fix it, you have to manually edit the xml-file and insert an ID attribute for each template element.
+
+Use Ctrl-Shift-F to format the exported template file.
diff --git a/plugins/org.eclipse.etrice.core.etmap.ui/templates/templates.xml b/plugins/org.eclipse.etrice.core.etmap.ui/templates/templates.xml
new file mode 100644
index 000000000..072aec2d5
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.etmap.ui/templates/templates.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<templates>
+
+ <template autoinsert="true" context="org.eclipse.etrice.core.etmap.ETMap.MappingModel"
+ deleted="false" description="model skeleton" enabled="true" id="mapping_model"
+ name="MappingModel">MappingModel ${MappingModel1} {&#13;
+ import ${RoomModel1}.* from "${RoomModelFile1}.room"
+ import ${PhysicalModel1}.* from "${PhysicalModelFile1}.etphys"
+ Mapping ${LogSys1} -> ${PhysSys1} {
+ SubSystemMapping ${SubSysRef1} -> ${nodeRef1} {
+ ThreadMapping defaultThread -> ${PhysicalThread1}
+ }
+ }
+ ${cursor}
+}&#13;</template>
+
+
+</templates> \ No newline at end of file

Back to the top