Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to integrate Xtext with an Eclipse plugin?

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?

like image 909
Georgios Bouloukakis Avatar asked Nov 03 '22 10:11

Georgios Bouloukakis


1 Answers

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

like image 140
xavier.seignard Avatar answered Nov 11 '22 03:11

xavier.seignard