i have a very specific Question about Xtend.
In every example i read about xText/xTend i see something like this:
override void doGenerate(Resource resource, IFileSystemAccess fsa) {
for(e: resource.allContents.toIterable.filter(typeof(Entity))) {
fsa.generateFile(
e.fullyQualifiedName.toString("/") + ".java",
e.compile)
}
}
Well so be more specific the line resource.allContents.toIterable.filter(typeof(Entity)))
is the one that causes me problems. I want to know how to go down the resource tree from all the Entitys without the subclasses of the entities. The method filter gets all the objects of the type entity and its subclasses within the resource but i just want to leave out the subclasses and only get the entities.