|
|
|
Re: Model to Text error: resolution of uriFragment 'xtextLink ... [message #1112240 is a reply to message #628489] |
Thu, 19 September 2013 09:44 |
Sheetal Bhatewara Messages: 14 Registered: August 2013 |
Junior Member |
|
|
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 10:13 |
Jan Koehnlein Messages: 760 Registered: July 2009 Location: Hamburg |
Senior Member |
|
|
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
---
Get professional support from the Xtext committers at www.typefox.io
|
|
|
|
Powered by
FUDForum. Page generated in 0.03642 seconds