Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-07-10 10:53:14 +0000
committerHenrik Rentz-Reichert2012-07-10 10:53:14 +0000
commitda61be794f02591999d6f2ae9155f59ceb815cd4 (patch)
treed93f1213c0dab7ab24ea18f1dc2d89a9f33b5ede /plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
parent438e869189416d33e553216a44bbf884c9b4b363 (diff)
downloadorg.eclipse.etrice-da61be794f02591999d6f2ae9155f59ceb815cd4.tar.gz
org.eclipse.etrice-da61be794f02591999d6f2ae9155f59ceb815cd4.tar.xz
org.eclipse.etrice-da61be794f02591999d6f2ae9155f59ceb815cd4.zip
[generator.java] bug fix in code generation for protocol classes using a derived data class
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
index 7b2a5629d..002f80b4f 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
@@ -36,6 +36,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
@Inject extension RoomExtensions roomExt
@Inject extension ProcedureHelpers helpers
@Inject extension TypeHelpers
+ @Inject extension DataClassGen
@Inject ILogger logger
def doGenerate(Root root) {
@@ -229,7 +230,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
def messageSignatureExplicit(Message m) {
var dc = (m.data.refType.type as DataClass)
- '''public void «m.name»(«IF dc.base!=null»«dc.base.typeName» _super, «ENDIF»«FOR a : dc.attributes SEPARATOR ", "»«a.refType.type.typeName»«IF a.size>1»[]«ENDIF» «a.name»«ENDFOR»)'''
+ '''public void «m.name»(«dc.argList»)'''
}
def messageCall(Message m) {
@@ -257,7 +258,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
}
«IF m.data!=null && m.data.refType.type instanceof DataClass»
«messageSignatureExplicit(m)» {
- «m.name»(new «m.data.refType.type.name»(«IF (m.data.refType.type as DataClass).base!=null»_super, «ENDIF»«FOR a : (m.data.refType.type as DataClass).attributes SEPARATOR ", "»«a.name»«ENDFOR»));
+ «m.name»(new «m.data.refType.type.name»(«(m.data.refType.type as DataClass).paramList»));
}
«ENDIF»
'''

Back to the top