Call a jar library function from generated code in src-gen [message #1698982] |
Fri, 19 June 2015 09:44 |
sam narayan Messages: 11 Registered: June 2015 |
Junior Member |
|
|
Hello all,
Am using Eclipse 3.7.2 and XText 2.3.0. I am writing a simple Xtext grammar with commands. In the Xtend code generator class "org.xtext.example.mydsl.generator/MyDslGenerator.xtend" file, I have added code to instantiate another class and use its methods.
When I edit the Xtext file, the "src-gen" folder is created, however the class that I have added is not resolved. When I add the external jar to the project as a referenced library, then the generated code finds the class and runs without errors.
The use case is that , when a user creates any new java project, and edits a"xxxx .mydsl" file, the code which is generated in the src-gen shall call the library functions, in the jar when executed.
I do not know how to add this jar referenced library to each java project that is created, even before code generation, so the generated code can find and resolve the classes.
Many thanks for your time,
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02451 seconds