在 Xtend 中,是否可以中断循环或进行检查以中断循环?
«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»
我的输出是:
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"
但我想要的是:
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"
如何实现我想要的输出?我听说您可以调用其他方法或其他方法,但我不知道该怎么做,有人可以给我一些解决这个问题的代码吗?谢谢 :)