Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-11-14 11:26:35 +0000
committerHenrik Rentz-Reichert2013-11-15 09:47:35 +0000
commitaf42471511f758e47a5962345e91d5a1f5fe266c (patch)
treed55f732b54c06b81ce3d9ee051268693615906e8 /plugins/org.eclipse.etrice.generator.java/src/org/eclipse/etrice/generator/java/gen/ProtocolClassGen.xtend
parent88ef1ceb04743522dca1198378771480754d3657 (diff)
downloadorg.eclipse.etrice-af42471511f758e47a5962345e91d5a1f5fe266c.tar.gz
org.eclipse.etrice-af42471511f758e47a5962345e91d5a1f5fe266c.tar.xz
org.eclipse.etrice-af42471511f758e47a5962345e91d5a1f5fe266c.zip
Bug 392072: enums as Primitive Types that can be used as Attributes for Operations and Messages
https://bugs.eclipse.org/392072 Change-Id: I6e16a691df0d720956652529f912eaed1d58097b
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.xtend6
1 files changed, 3 insertions, 3 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 fde3e5a42..ce7d93095 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
@@ -19,7 +19,6 @@ import org.eclipse.etrice.core.genmodel.etricegen.Root
import org.eclipse.etrice.core.room.CommunicationType
import org.eclipse.etrice.core.room.DataClass
import org.eclipse.etrice.core.room.Message
-import org.eclipse.etrice.core.room.PrimitiveType
import org.eclipse.etrice.core.room.ProtocolClass
import org.eclipse.etrice.generator.base.IGeneratorFileIo
import org.eclipse.etrice.generator.generic.GenericProtocolClassGenerator
@@ -81,7 +80,8 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«pc.userCode(1)»
«var models = root.getReferencedModels(pc)»
- «FOR model : models»import «model.name».*;
+ «FOR model : models»
+ import «model.name».*;
«ENDFOR»
public class «pc.name» {
@@ -273,7 +273,7 @@ class ProtocolClassGen extends GenericProtocolClassGenerator {
«IF m.data==null»
getPeerMsgReceiver().receive(new EventMessage(getPeerAddress(), «dir»_«m.name»));
«ELSE»
- getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), «dir»_«m.name», «m.data.name»«IF (!m.data.refType.ref && !(m.data.refType.type instanceof PrimitiveType))».deepCopy()«ENDIF»));
+ getPeerMsgReceiver().receive(new EventWithDataMessage(getPeerAddress(), «dir»_«m.name», «m.data.name»«IF (!m.data.refType.ref && !(m.data.refType.type.enumerationOrPrimitive))».deepCopy()«ENDIF»));
«ENDIF»
«ENDIF»
}

Back to the top