Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2020-02-12 11:49:11 +0000
committerHenrik Rentz-Reichert2020-02-12 11:49:11 +0000
commit0a720c6717aebe8b7a909e83d2d8d90aadb84cc6 (patch)
tree04f093191519a119db2eb666ce90e35129eaf0b7
parent3b7ea206ef388f7165188b9bd6396227db8cbe24 (diff)
downloadorg.eclipse.etrice-master.tar.gz
org.eclipse.etrice-master.tar.xz
org.eclipse.etrice-master.zip
Bug 559964: generate sorted includesHEADmaster
#include paths are sorted alphabetically Change-Id: Ia6ec09e30469f6ccbc489a6863050790957eb201
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend8
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend4
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend4
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend4
4 files changed, 10 insertions, 10 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
index f199c8b25..d34f402d9 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ActorClassGen.xtend
@@ -94,8 +94,8 @@ class ActorClassGen extends GenericActorClassGenerator {
#include "messaging/etMessage.h"
/* include all referenced room classes */
- «FOR rc : (root.getReferencedDataClasses(ac) + root.getReferencedEnumClasses(ac) + root.getReferencedProtocolClasses(ac)).sortBy[name]»
- #include «rc.includePath»
+ «FOR path : (root.getReferencedDataClasses(ac) + root.getReferencedEnumClasses(ac) + root.getReferencedProtocolClasses(ac)).map[includePath].sort»
+ #include «path»
«ENDFOR»
«ac.userCode(1, true)»
@@ -349,8 +349,8 @@ class ActorClassGen extends GenericActorClassGenerator {
#include "etUnit/etUnit.h"
#include "base/etMemory.h"
- «FOR pc : root.getReferencedProtocolClasses(ac)»
- #include «pc.includePath»
+ «FOR path : root.getReferencedProtocolClasses(ac).map[includePath].sort»
+ #include «path»
«ENDFOR»
#include "«ac.getCUtilsFileName»"
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
index 47ac9fe28..3a0f63d79 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/DataClassGen.xtend
@@ -69,8 +69,8 @@ class DataClassGen {
/* include all referenced room classes */
««« TODO: includes only for used DataClasses, also for other models
- «FOR rc : (root.getReferencedDataClasses(dc) + root.getReferencedEnumClasses(dc)).sortBy[name]»
- #include «rc.includePath»
+ «FOR path : (root.getReferencedDataClasses(dc) + root.getReferencedEnumClasses(dc)).map[includePath].sort»
+ #include «path»
«ENDFOR»
«dc.userCode(1)»
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
index 5d6f3fca7..72cc347fa 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeGen.xtend
@@ -347,8 +347,8 @@ class NodeGen {
#include "messaging/etMessageService.h"
/* include all referenced room classes */
- «FOR dc : (root.getReferencedActorClasses(ssi.subSystemClass) + root.getReferencedProtocolClasses(ssi.subSystemClass)).sortBy[name]»
- #include «dc.includePath»
+ «FOR path : (root.getReferencedActorClasses(ssi.subSystemClass) + root.getReferencedProtocolClasses(ssi.subSystemClass)).map[includePath].sort»
+ #include «path»
«ENDFOR»
/* instantiation of message services and message buffers */
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
index 1b6fde86b..ce215cd2e 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/ProtocolClassGen.xtend
@@ -79,8 +79,8 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«pc.userCode(1)»
/* include all referenced room classes */
- «FOR dc : (root.getReferencedProtocolClasses(pc) + root.getReferencedDataClasses(pc) + root.getReferencedEnumClasses(pc)).sortBy[name]»
- #include «dc.includePath»
+ «FOR path : (root.getReferencedProtocolClasses(pc) + root.getReferencedDataClasses(pc) + root.getReferencedEnumClasses(pc)).map[includePath].sort»
+ #include «path»
«ENDFOR»
«IF pc.commType==CommunicationType::EVENT_DRIVEN»

Back to the top