What does it mean?You can build a grammar description and with the use of the framework get a:
- EMF model related to this grammar.
- Fully functional text editor.
- Scaffold for the generation tool
I need to record some data in structured form. I need model. Text editor is more convincing.
But this is only my motivation. There is a sea of use cases.
How to start ?You can download Eclispe Modeling tools distribution from Eclipse downloads site. Or use update site.
Then you can follow Xtext documentation. And this is the reason for this post. Although, you don't need to spend weeks on learning Xtext principles to build usable tools, still there are some things missing from the documentation.
You are generating without ANTLR. It is highly recommended to download and use the plug-in 'de.itemis.xtext.antlr' using the update site http://download.itemis.com/updates/milestones
Of course solution is to download the plug-in. After that you can follow the getting started tutorial.
The simplest way is to import your xxx.generator plug-in project from source to target. You are almost done. The only thing left is to add required dependencies to imported project. It is also helpful to add XPand nature to this project. After that you can follow tutorial, build XPand templates, and generate Java code.
Next time I will show you how to change editor default coloring.