Skip to main content



      Home
Home » Modeling » TMF (Xtext) » code generation in java
code generation in java [message #910450] Sun, 09 September 2012 14:06 Go to next message
Eclipse UserFriend
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 15:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

i dont get your question can you please explain?

~Christian
Re: code generation in java [message #910472 is a reply to message #910471] Sun, 09 September 2012 15:32 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: code generation in java [message #910896 is a reply to message #910471] Mon, 10 September 2012 11:26 Go to previous messageGo to next message
Eclipse UserFriend
[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 12:24 Go to previous message
Eclipse UserFriend
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
Previous Topic:XText hover swallows marker resolution extension points
Next Topic:error when generating language
Goto Forum:
  


Current Time: Mon Jul 07 16:42:40 EDT 2025

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

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

Back to the top