In Xtend, is it possible to break in a loop or have a check to discontinue the loop?
«FOR e:d.entitys»
«FOR a:e.attributes»
«IF a.eClass.name.contentEquals('Something')»
«e.name» "This output should be output one for each Entity e"
«ENDIF»
«ENDFOR»
«ENDFOR»
My output is:
Entity 1 "This output should be output one for each Entity e"
Entity 1 "This output should be output one for each Entity e"
Entity 1 "This output should be output one for each Entity e"
Entity 2 "This output should be output one for each Entity e"
Entity 4 "This output should be output one for each Entity e"
Entity 4 "This output should be output one for each Entity e"
But what I want is:
Entity 1 "This output should be output one for each Entity e"
Entity 2 "This output should be output one for each Entity e"
Entity 4 "This output should be output one for each Entity e"
How can my desired output be implemented? I heard you can call another method or something but I have no idea how to do that, could someone show me some code for this problem? Thank you :)