[Xpand] loop with separator , [message #1220651] |
Thu, 12 December 2013 16:37  |
Eclipse User |
|
|
|
Hello all ,
I have problem getting the output the way I want ,
I have a model with some attributes and references . I want to have only list of my references that have Upperbound==1 separated by comma (,) , but the problem is that I got also extra commas fro also refrences that are Upperbound !=1
for example I have the following references :
type with upperbound==-1,
property with upperbound==1,
supertype with upperbound==1
by applying the following xpand code :
«EXPAND myrefrence FOREACH eAllReferences SEPARATOR ','-»
«DEFINE myrefrence FOR ecore::EReference-»«IF upperBound==1»
('«name-»')
«ENDIF»
«ENDDEFINE»
I got the result :
( , property, supertype)
as you can see there is extra comma added , I want to ignore the extra comma that will be added when it ignores the reference that does not fit with the condition. any suggestions I appreciate
thank you in advance.
|
|
|
|
|
Powered by
FUDForum. Page generated in 21.09510 seconds