Extending RIM with Xtext
1. September 2009
I must admit I’m a big fan of all EMF derivations, so also Xtext, the new framework for developing textual DSLs. Today I want to show you how to use RIM for managing your textual models, consuming the features of both frameworks, RIM and Xtext.
Seamless integration with as less modifications as possible
A challenge is to integrate a generated Xtext editor into RIM. You probably know, for RIM everything is a type specific information unit, so we’re creating a new bundle by defining a new information structure, which has a property where the textual model of our DSL is saved. For the binding of source editors to an information type you can use a separate extension point, the integration of a generated Xtext Editor is very easy (see source).

Xtext Editor in RIM with created information unit (see left)
Get rid of the IDE flavor
A typical feature of RIM is that it behaves under the hood exactly the same way like a Eclipse SDK, but is not intended to be an application only for developers. The UI is lightweight (relatively), but the way you edit resources is the same.

New Wizard of a textual model
Use your Xtext Model as part of an information unit
Once you have integrated your Xtext Editor in RIM you can use all the features regarding information management that come with RIM in combination with your textual model. If you need synchronization with remote repositories, semantic categorization full indexed search or a desktop integration, it’s all integrated.

Search through a model is also fully integrated
Drawbacks
Ok, there are some drawbacks. RIM delivers at the moment no Problems view, so errors within your model are only visualized within an editor, this will be fixed until 1.0. An additional drawback is that the Xtext guys are binding their Xtext bundles very tightly to the JDT. I had to modify the xtext ui bundle to get rid of all jdt-dependencies; it would be great if the Xtext team could use integration bundles and extension points for a loose coupling of typical ide components.
Conclusion
All in all Xtext integrates very well in RIM. If you want to use Xtext, you could consider RIM as a container for your textual models. Thanks to the Xtext Developers for this wonderful framework. For RIM it’s now very easy to manage and visualize information units which are holding complex datastructures in textual form.
Get started
Want to see RIM and Xtext in Action? Download the latest release of RIM and the Xtext features (see Downloads). Install the unpacked feature via “Install new Software”.
Latest RIM Build
Xtext Integration Feature (Source included)


This sounds really promising. I’d like to add a more powerful wiki engine to RIM. The main feature should be automatic links (where you can define keywords and you’ll get links automatically just like you get links when you Ctrl-click in the Java editor) plus easy integration of many different markups and a side-by-side editor (source and WYSIWYG preview).
Right now, I’m unsure whether it will be more simple to implement this using XText or Mylin WikiText. Comments?
Comment by Aaron Digulla — 1. September 2009 @ 15:37
[…] Links: http://www.richclient2.eu/2009_09_01/extending-rim-with-xtext/ Possibly related posts: (automatically generated)Eclipse on a Destroyer […]
Pingback by Powerful Wiki Engine for Eclipse « Dark Views — 1. September 2009 @ 20:47