rich client 2.0

Extending RIM with Xtext


1. September 2009
Tom Seidel @ 11:39

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_1.png
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.

xtext_2.png
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.

xtext_3.png
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)

Links

Xtext Website
RIM Website

5 Comments »

  1. 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

  2. […] 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

  3. it sounds nice, but I can’t install Xtext on RMI, I got some errors:

    Cannot complete the install because one or more required items could not be found.
    Software being installed: Xtext 1.0.0.200909010204 (org.remus.infomngmnt.xtext.feature.group 1.0.0.200909010204)
    Missing requirement: Mydsl 1.0.0.200909010204 (org.remus.infomngmnt.mydsl 1.0.0.200909010204) requires ‘bundle org.remus.infomngmnt.common.ui 1.0.0′ but it could not be found
    Cannot satisfy dependency:
    From: Xtext 1.0.0.200909010204 (org.remus.infomngmnt.xtext.feature.group 1.0.0.200909010204)
    To: org.remus.infomngmnt.mydsl [1.0.0.200909010204]

    is there a conflict with the version ?

    Thanks!

    Comment by Pierrick — 30. March 2010 @ 12:02

  4. Pierrick,

    the current Version of Remus is incompatible with the Xtext feature (I didn’t adopted it). For installing XText, download an older version of Remus, see http://remus-software.org/bamboo/browse/RCP-NIGHTLY/latest/artifact

    This should work.

    Cheerz
    Tom

    Comment by Tom Seidel — 30. March 2010 @ 12:15

  5. working with Build RCP-NIGHTLY-154
    http://remus-software.org/bamboo/browse/RCP-NIGHTLY-154/artifact

    Great, now I can play with Xtext !
    I guess the latest one (Build RCP-NIGHTLY-266) is not compatible.
    Thanks ;]

    Comment by Pierrick — 1. April 2010 @ 06:06

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress