Hello,
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.
in
[for (aProperty : Property | aContainer.properties)]
[aProperty.printProperties()/]
[/for]
'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,
Saphira
EDIT:
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 06:59] by Moderator