Is there a way to infer a non-JVM dsl model [message #1397196] |
Wed, 09 July 2014 10:52 |
|
I am trying to infer a dsl from another dsl during the DoGenerate(...) method call.
This works nicely when the generated dsl doesnt cross-reference other files using Import statements
When I manually generate the derived dsl code in eclipse, the scoping and cross-references work, however, when I use doGenerate(...) to derive the dsl code automatically, the scoping / cross references don't work as it seems the new derived resources/models are not visible.
I use a recursive method which iterates through the import statements and generates the dependent models. I serialize these models to their DSL representation and save them to the project using FileSystemAccess.. I have also tried creating and adding new Resources (which then dont appear in the project after the doGenerate is called). Both of these strategies do not seem to apply them to the scope because i get ["No EObjectDescription could be found in Scope"] exceptions.
Any insight would be appreciated. i can provide a project for you to reproduce if this will help...
Many thanks,
Regards
|
|
|
|
Re: Is there a way to infer a non-JVM dsl model [message #1397832 is a reply to message #1397340] |
Thu, 10 July 2014 08:06 |
|
Thanks Christian for your response. I managed to get this scenario working by adding the generated model and its dependencies to the contents of a resource. It turns out I didnt need to save the resource, and serializing it and saving it using FileSystemAccess works well. The scoping/cross referencing actually just worked out of the box once the dependant models where added to the contents of a resource....
|
|
|
Powered by
FUDForum. Page generated in 0.03502 seconds