summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Schuetz2013-06-19 03:25:57 (EDT)
committerThomas Schuetz2013-06-19 03:25:57 (EDT)
commit826f5fd531f5c0c9b38758a271044539d1134cec (patch)
treec0b9a6b7d6b9d213e525b8c28feb8ba2df357eb5
parentb9bf0826e37b956fbd2ba175b90c8ae785cf54df (diff)
downloadorg.eclipse.etrice-826f5fd531f5c0c9b38758a271044539d1134cec.zip
org.eclipse.etrice-826f5fd531f5c0c9b38758a271044539d1134cec.tar.gz
org.eclipse.etrice-826f5fd531f5c0c9b38758a271044539d1134cec.tar.bz2
[core.etmap, core.etphys] fixes for formatters
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etmap2
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etphys43
-rw-r--r--examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room24
-rw-r--r--plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/formatting/ETMapFormatter.java9
-rw-r--r--plugins/org.eclipse.etrice.core.etphys/src/org/eclipse/etrice/core/etphys/formatting/ETPhysFormatter.java11
5 files changed, 49 insertions, 40 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 637eb0f..55feae9 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,11 @@
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/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etphys b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etphys
index edab5b2..a9e2761 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etphys
+++ b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.etphys
@@ -1,19 +1,24 @@
-PhysicalModel PhysicalModel1 {
- PhysicalSystem PhysSys1 {
- NodeRef nodeRef1 : NodeClass1
- }
-
- NodeClass NodeClass1 {
- runtime = RuntimeClass1 priomin = -10 priomax = 10
- DefaultThread PhysicalThread1 {
- execmode = blocked
- prio = 0
- stacksize = 1024 msgblocksize = 32 msgpoolsize = 10
- }
- }
-
- RuntimeClass RuntimeClass1 {
- model = multiThreaded
- }
-
-}
+PhysicalModel PhysicalModel1 {
+
+ PhysicalSystem PhysSys1 {
+ NodeRef nodeRef1 : NodeClass1
+ }
+
+ NodeClass NodeClass1 {
+ runtime = RuntimeClass1
+ priomin = -10
+ priomax = 10
+ DefaultThread PhysicalThread1 {
+ execmode = blocked
+ prio = 0
+ stacksize = 1024
+ msgblocksize = 32
+ msgpoolsize = 10
+ }
+ }
+
+ RuntimeClass RuntimeClass1 {
+ model = multiThreaded
+ }
+
+}
diff --git a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room
index ac23155..da396e2 100644
--- a/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room
+++ b/examples/org.eclipse.etrice.tutorials.c/model/HelloWorld/HelloWorld.room
@@ -1,12 +1,14 @@
-RoomModel RoomModel1 {
- LogicalSystem LogSys1 {
- SubSystemRef SubSysRef1:SubSysClass1
- }
- SubSystemClass SubSysClass1 {
- ActorRef ActorRef1:ActorClass1
- LogicalThread defaultThread
- }
- ActorClass ActorClass1 {
- }
-
+RoomModel RoomModel1 {
+
+ LogicalSystem LogSys1 {
+ SubSystemRef SubSysRef1: SubSysClass1
+ }
+
+ SubSystemClass SubSysClass1 {
+ ActorRef ActorRef1: ActorClass1
+ LogicalThread defaultThread
+ }
+
+ ActorClass ActorClass1 { }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/formatting/ETMapFormatter.java b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/formatting/ETMapFormatter.java
index f5f030d..60cd7f1 100644
--- a/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/formatting/ETMapFormatter.java
+++ b/plugins/org.eclipse.etrice.core.etmap/src/org/eclipse/etrice/core/etmap/formatting/ETMapFormatter.java
@@ -55,10 +55,9 @@ public class ETMapFormatter extends AbstractDeclarativeFormatter {
c.setNoSpace().around(k);
}
- c.setLinewrap(1).after(f.getImportRule());
-
- c.setLinewrap(1).after(f.getMappingRule());
- c.setLinewrap(1).after(f.getSubSystemMappingRule());
- c.setLinewrap(1).after(f.getThreadMappingRule());
+ c.setLinewrap(2).around(f.getMappingRule());
+ c.setLinewrap(1).around(f.getImportRule());
+ c.setLinewrap(1).around(f.getSubSystemMappingRule());
+ c.setLinewrap(1).around(f.getThreadMappingRule());
}
}
diff --git a/plugins/org.eclipse.etrice.core.etphys/src/org/eclipse/etrice/core/etphys/formatting/ETPhysFormatter.java b/plugins/org.eclipse.etrice.core.etphys/src/org/eclipse/etrice/core/etphys/formatting/ETPhysFormatter.java
index 44ecf80..6a372aa 100644
--- a/plugins/org.eclipse.etrice.core.etphys/src/org/eclipse/etrice/core/etphys/formatting/ETPhysFormatter.java
+++ b/plugins/org.eclipse.etrice.core.etphys/src/org/eclipse/etrice/core/etphys/formatting/ETPhysFormatter.java
@@ -55,13 +55,14 @@ public class ETPhysFormatter extends AbstractDeclarativeFormatter {
c.setLinewrap().before(k);
}
- c.setLinewrap(1).after(f.getImportRule());
+ c.setLinewrap(1).around(f.getImportRule());
- c.setLinewrap(2).after(f.getPhysicalSystemRule());
- c.setLinewrap(2).after(f.getNodeClassRule());
- c.setLinewrap(2).after(f.getRuntimeClassRule());
- c.setLinewrap(1).after(f.getNodeRefRule());
+ c.setLinewrap(2).around(f.getPhysicalSystemRule());
+ c.setLinewrap(2).around(f.getNodeClassRule());
+ c.setLinewrap(2).around(f.getRuntimeClassRule());
+
+ c.setLinewrap(1).around(f.getNodeRefRule());
c.setLinewrap(1).around(f.getPhysicalThreadRule());
}
}