|
|
|
Re: Model to Text error: resolution of uriFragment 'xtextLink ... [message #1112240 is a reply to message #628489] |
Thu, 19 September 2013 05:44   |
Eclipse User |
|
|
|
Hi Sebastian,
I have a grammar written in .xtext file.
Now, the default code generator is in .xtend.
But writing code generator in xtend is not easy for me, as syntax of xtend is new for me.
So, I want to change it to .java code generator.
So, if anyone has worked on it, then please let me know the steps to invoke the java code generator.
[ Right now, with .xtend, using my grammer , the files are getting generated at default location src-gen]
|
|
|
Re: Model to Text error: resolution of uriFragment 'xtextLink ... [message #1112886 is a reply to message #1112240] |
Fri, 20 September 2013 06:13   |
Eclipse User |
|
|
|
Java's syntax is really horrible for code generaton. But if you want to
write the IGenerator for your language in Java rather than Xtend anyway:
- Implement IGenerator in Java
- Bind your implementation to the IGenerator interface in the runtime
module of your language
public Class<? extends org.eclipse.xtext.generator.IGenerator>
bindIGenerator() {
return <your implementation class>;
}
- In order to avoid the Xtend stub to be generated add
generateStub = false
in for the GeneratorFragment in the MWE workflow of your language.
Am 19.09.13 11:44, schrieb Sheetal Bhatewara:
> Hi Sebastian,
>
> I have a grammar written in .xtext file.
> Now, the default code generator is in .xtend.
> But writing code generator in xtend is not easy for me, as syntax of
> xtend is new for me.
> So, I want to change it to .java code generator.
>
> So, if anyone has worked on it, then please let me know the steps to
> invoke the java code generator.
>
> [ Right now, with .xtend, using my grammer , the files are getting
> generated at default location src-gen]
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
|
|
|
|
Powered by
FUDForum. Page generated in 0.24540 seconds