Wednesday, September 24, 2008

Article on Xtext and oAW

I just found a really nice article/tutorial on Xtext and oAW on the web.

It walks you through the process of
1) designing a dsl with xtext
2) adding constraints
3) enhancing the generated text editor
4) generating some code out of it
in great detail (about 30) and very well written.

The author comes to this nice conclusion :
Finally, consider the effort we had to invest. It took a couple of pages to describe the process, but when you count the actual lines of code we had to write and the number of clicks we had to perform, you may agree that this does not amount to anything worth worrying about. The framework kept most of the complexities away from us.
It is the power of frameworks like oAW that let us leverage the potential of DSLs and related concepts into our daily projects.
:-)

6 comments:

Ed Merks said...

Sven,

Cool! You should record a link to this on your wiki so that folks looking for information about Xtext will find it easily...

Karsten Thoms said...

Really nice article. I'll put it on my recommendation list.

Matthias said...
This post has been removed by the author.
mattre said...

Now knowing the possibilites of Xtext I am really looking forward use this framework in my project: For my project I also need a graphical editor (not only a textual one). Do we have any support combining the generated XText editor with a GMF editor built up on the same (meta)model? So the two types of editors can also work together!
Does the oaW toolchain support such an environment?!

Sven Efftinge said...

@Ed: I'm not sure, since this article is on Xtext from oAW 4.3 and the wiki page is on TMF Xtext, which is a bit different (i.e. much, much cooler ;-))

@mattre:
With TMF Xtext (first usable build will be M3 due 2008-11-12) this is a no brainer, since you get a fully working implementation of EMF's Resource interface (read and write).
With the currenntly available version from oAW 4.3 you'll have to implement the serialization yourself (it is in the Format.ext extension file).

volker koster said...

Thanks for the flowers :-)
It is as much a pleasure to work with xText as it was one to write about it.

regards
volker