I am working o a xtext grammar and i am referencing artifacts like this:
A: 'A' name=ID;
B: 'B' name = ID ':' ref=[A];
So after launching the eclipse runtime with plugin, i can create files with proper extension containing this:
A a
B b : a
Now i want to refer to artifacts from other files as well and it works out of the box:
if A a is declared in a.file and B b : a is declared in b.file the editor shows no errors.
The auto-compile works fine as well.
However, if i generate the code on my own like this:
generator.doGenerate(new ResourceSetImpl().getResource(URI.createURI(path), true), fsa);
The reference is not resolved.
Do i have to compile all files in one run? How could i do this?