Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » code generation in java
code generation in java [message #910450] Sun, 09 September 2012 18:06 Go to next message
Stan Rosenberg is currently offline Stan RosenbergFriend
Messages: 2
Registered: September 2012
Junior Member
Hi,

Is it possible to use java for code generation as opposed to xtend?
Sorry if the question is too silly, but I've just gone through a tutorial, and it appears that the java file(s) are meant to be generated from xtend; can this be overriden?

Thanks,

stan
Re: code generation in java [message #910471 is a reply to message #910450] Sun, 09 September 2012 19:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i dont get your question can you please explain?

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: code generation in java [message #910472 is a reply to message #910471] Sun, 09 September 2012 19:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
P.S: of course your implementation of an IGenerator can be any java class - but of course you wont have rich string support there

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: code generation in java [message #910896 is a reply to message #910471] Mon, 10 September 2012 15:26 Go to previous messageGo to next message
Stan Rosenberg is currently offline Stan RosenbergFriend
Messages: 2
Registered: September 2012
Junior Member
[quote title=Christian Dietrich wrote on Sun, 09 September 2012 15:29]Hi,

i dont get your question can you please explain?

If I want to provide code generation for my DSL, I need to edit, say MyDslGenerator.xtend from which
MyDslGenerator.java is generated (in xtend-gen). Now my question. Can this behavior be altered? I'd like to implement code generation in java thereby bypassing xtend. Of course I could do so outside of eclipse, but in eclipse I am unable to edit MyDslGenerator.java.

Thanks,

stan
Re: code generation in java [message #910923 is a reply to message #910896] Mon, 10 September 2012 16:24 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi delete the Xtend file and its java file. Open the workflow and
set generate stub To false in the generator fragment. Rerun the
workflow. Create the missing class in java

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:XText hover swallows marker resolution extension points
Next Topic:error when generating language
Goto Forum:
  


Current Time: Sat Apr 20 02:07:09 GMT 2024

Powered by FUDForum. Page generated in 0.03850 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top