|[Acceleo] Loop over empty OrderedSet creates empty lines [message #1810144]
||Thu, 01 August 2019 10:43
| Marie-Saphira Flug
Registered: January 2019
I'm generating a .yaml file from an Xtext model and I have too many empty lines in it. In my template I print some properties that I get in an OrderedSet. During generation I get the following warning:
Invalid loop iteration at line 27 in Module generateDeployment for block for (aContainer.properties). Last recorded value of self was null.
[for (aProperty : Property | aContainer.properties)]
'aContainer.properties' is the OrderedSet, which is null sometimes. I'm pretty sure that this triggers the warning.
I would like to use "!= null" or "!oclIsUndefined" but I can't find a "not" operation anywhere.
I know that I can remove the empty lines in a post process, but I really don't want the warnings because the user will see them.
Thanks in advance,
so (something <> null) is working, I put it in front of every loop. Is there maybe a better way?
[Updated on: Thu, 01 August 2019 10:59]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01600 seconds