Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPAND] Casting possibilities
[XPAND] Casting possibilities [message #776520] Sun, 08 January 2012 12:08 Go to previous message
Verena Himmelbauer is currently offline Verena Himmelbauer
Messages: 3
Registered: January 2012
Junior Member
hi, i´m trying to transform some ecore model to java code.
my current problem are method parameters as i have to decide wether they are simple or complex.

«DEFINE methodBuilder FOR myModel::Method»
public void «name»(«FOREACH parameters AS param SEPARATOR ','» «HERE THE TYPE»
«param.name»
«ENDFOREACH»)

«HERE THE TYPE» is the part where i´m experiencing problems.
as far as i found out i can use the typeSelect only on the parameters List, but then i have as param only simple OR complex left.
if i make one FOREACH for simple and one for complex i´m missing commas:

«DEFINE methodBuilder FOR myModel::Method»
public void «name»((
«FOREACH parameters.typeSelect(myModel::SimpleParameter) AS param SEPARATOR ','» «HERE THE TYPE»
«FOREACH parameters.typeSelect(myModel::ComplexParameter) AS param SEPARATOR ','» «HERE THE TYPE»
«param.name»
«ENDFOREACH»)

Could anyone give me a hint how to do this?

thx Asa
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:[Acceleo] *.emtl files missing when building updatesite
Next Topic:[acceleo] binary/XMI format & java application
Goto Forum:
  


Current Time: Wed May 22 04:54:18 EDT 2013

Powered by FUDForum. Page generated in 0.01862 seconds