Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Use code generator from Eclipse and CLI
Use code generator from Eclipse and CLI [message #1241209] Fri, 07 February 2014 16:30 Go to next message
Nicolas MEDERLE is currently offline Nicolas MEDERLEFriend
Messages: 2
Registered: February 2014
Junior Member
Hi all,

I developped a code generator using XTEXT and I generated the assoicated eclipse plug-in. This generator generates C++ code used by an application.

I would like to use two ways to generate the code:
1. From the eclipse editor by a command in the context menu.
2. From a makefile.

I thinks I can create a java execute wich contains the generator. I'm looking for it, but I do not found the solution.

Could you help me,
Thanks.
Re: Use code generator from Eclipse and CLI [message #1241404 is a reply to message #1241209] Fri, 07 February 2014 23:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi have a Look at the generatorfragment in the workflow. You can configure it to generate a Java Main.
You can use this Main to Export a Runnable Jar using the Export wizard eclipse offers for that


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Use code generator from Eclipse and CLI [message #1245993 is a reply to message #1241404] Fri, 14 February 2014 15:05 Go to previous message
Nicolas MEDERLE is currently offline Nicolas MEDERLEFriend
Messages: 2
Registered: February 2014
Junior Member
Thanks for your answer. It is working fine.

For more details:
- Add 'generateJavaMain = true' to the fragment 'generator.GeneratorFragment' in the workflow
- Run the workflow configuration: a main file will be generated in the folder generator
- Creat a run configuration 'Java Application' in your project using the main class of our generator.
- 'File' > 'Export'> 'Runnable JAR File' and select the configuration previously created.
Previous Topic:OSS project needs help
Next Topic:Junit for Dependent DSL
Goto Forum:
  


Current Time: Thu Apr 25 21:56:43 GMT 2024

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

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

Back to the top