Skip to main content



      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 11:30 Go to next message
Eclipse UserFriend
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 18:03 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Use code generator from Eclipse and CLI [message #1245993 is a reply to message #1241404] Fri, 14 February 2014 10:05 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 02:36:26 EDT 2025

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

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

Back to the top