[SOLVED] A (very stupid?) beginner problem [message #1859876] |
Mon, 03 July 2023 14:15 |
Antonio Cicchetti Messages: 18 Registered: November 2013 |
Junior Member |
|
|
Dear all,
I am sorry if this is a very stupid question but I could not find a solution after two days of tries, forum/internet browsing.
I am using XText SDK 2.30 and Eclipse EMF 202303. I am trying to run code generation by using/adapting the 15min tutorial available in the documentation, however I have not been successful in even getting an initial generator override to run. This is the code I am trying to run in ("Challenge" is a type in my xText grammar/model):
@SuppressWarnings("all")
public class MyDslGenerator extends AbstractGenerator {
@Override
public void doGenerate(final Resource resource, final IFileSystemAccess2 fsa, final IGeneratorContext context) {
for (e : resource.allContents.toIterable.filter(Challenge)) {
}
}
}
In particular, it looks like I do not have the "allContents" operation for the resource type (I have a getAllContents method but then the code is completely different from the tutorial). I tried by looking at complete examples and it seems I am not missing any imports but it really feels like I am missing something in my environment to run this. Any help/hint would be appreciated. Thanks a lot.
Antonio
[Updated on: Tue, 04 July 2023 06:36] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04676 seconds