Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-07-08 10:26:52 -0400
committerHenrik Rentz-Reichert2011-07-08 10:26:52 -0400
commit78af9377d98bdd036b7fe9e1761c7097a019a69d (patch)
treeda55cd8192b5aaf24ce38239d73a3a901b0ac460
parenta4779a2782f30fd0997c8fde83e54ab61fe2f229 (diff)
downloadorg.eclipse.etrice-78af9377d98bdd036b7fe9e1761c7097a019a69d.tar.gz
org.eclipse.etrice-78af9377d98bdd036b7fe9e1761c7097a019a69d.tar.xz
org.eclipse.etrice-78af9377d98bdd036b7fe9e1761c7097a019a69d.zip
[generator.java] use default initial value in actor classes if specified
-rw-r--r--plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt b/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt
index c8b957ba1..5d3b8949b 100644
--- a/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt
+++ b/plugins/org.eclipse.etrice.generator.java/src/templates/ActorClass.xpt
@@ -83,9 +83,11 @@ public «IF ac.abstract»abstract «ENDIF»class «ac.name» extends «IF ac.base!=null
«ENDIF»
setClassName("«ac.name»");
- // instantiate data class attributes
+ // initialize attributes
«FOREACH ac.attributes AS a-»
- «IF a.type.type!=null-»
+ «IF a.defaultValueLiteral!=null-»
+ «a.name» = «a.defaultValueLiteral»;
+ «ELSEIF a.type.type!=null-»
«a.name» = new «a.type.type.name»();
«ENDIF-»
«ENDFOREACH-»

Back to the top