I have created a simple Xtext project and I want to generate some specification files. With ANTTLR tool I will generate some other files based on the specification files of Xtext project. I have created a plugin, that uses the specification files and generates me automatically the other files that I need by using an ANTLR parser. My question is if I can integrate this plugin, with Xtext editor? More specifically, if one user wants to use the plugin, it will see the Xtext editor, than it will create the specification files, and finally, by pressing a button will generate the files with ANTLR tool (the last step is already done.) Does anybody have any ideas?
Asked
Active
Viewed 843 times
1 Answers
2
Basically you'll need to have the xtext plugins, and create another one that will rely on you antlr tool.
Let's say the xtext extension name you denifed is ".myDsl".
The plugin you need to develop will take your ".myDsl" file as input and will execute your antlr tool to generate your files.
Here is some pointers : http://www.eclipse.org/articles/article.php?file=Article-action-contribution/index.html#example4
Regards

xavier.seignard
- 11,254
- 13
- 51
- 75
-
1Thank you for your answer! Actually I have done this plugin, that takes as an input some files, and by using the ANTLR generates me some others. My problem is how to include xtext plugins to my plugin in order to open a new project editor (xtext editor), to create the file, and the finally to give it as an input to my plugin. – Georgios Bouloukakis Nov 21 '12 at 15:59
-
Hello, You do not need to include the xtext plugin in yours, you just need to create a feature (have a look here: http://www.vogella.com/articles/EclipseFeatureProject/article.html) in which you will include your plugin and the xtext ones. Then when someone installs the feature he will have all the needed plugins. Regards – xavier.seignard Nov 22 '12 at 10:09
-
Hi, thanks for your answer. I have created an eclipse feature, and I export this feature to a zip file. After I am able to install all the plugins to another eclipse IDE. – Georgios Bouloukakis Feb 20 '13 at 22:23
-
My problem now is that I would like to have the possibility at the other eclipse IDE to create one java project with specific project name and 3 files with specific filenames. With this way I will be able to know the path of each file that the user will specify with xtext editor. Do you have any idea about this? – Georgios Bouloukakis Feb 20 '13 at 22:32