Commit 0a720c67 authored by Henrik Rentz-Reichert's avatar Henrik Rentz-Reichert
Browse files

Bug 559964: generate sorted includes

#include paths are sorted alphabetically

Change-Id: Ia6ec09e30469f6ccbc489a6863050790957eb201
parent 3b7ea206
......@@ -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"
......
......@@ -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)
......
......@@ -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 */
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment