Upgraded to Xtext 2.1: first impressions

by Алекс Руис on November 22, 2011

During this past weekend I upgraded protobuf-dt to the new and shiny Xtext 2.1.1. I didn’t have a real need for the upgrade, the protocol buffer editor has been working well with version 2.0. It was mostly curiosity.

Once again, the Xtext team did a great job. We, Xtext users, got an early Xmas gift. Soon after upgrading I was pleasantly surprised by some pretty good improvements. These are my favorite ones:

  1. Removing grammar ambiguity is easier. The soon-to-be-released version 1.1 of the protocol buffer editor aims at supporting 100% of the language syntax and scoping rules. Unfortunately the grammar for the protocol buffer is ambiguous, and I was having a hard time cleaning it up (I’m still a Xtext newbie.) The syntactic predicates I added to remove ambiguity in the grammar did not work in 2.0, but they worked fine in 2.1!
  2. Speed, speed, speed. My tests now execute considerably faster. Now I can run them constantly (even the integration tests,) without losing context. Note: I don’t have any numbers to back up this claim (I wasn’t even expecting any speed improvements.) I was just amazed to see how fast my test suite now runs.
  3. Rename refactoring now works. In Xtext 2.0 I had a few use cases where rename refactoring did not work well. It is all fixed in Xtext 2.1.
  4. Marker customization. Xtext comes with a really nice framework for adding semantic checks to your editor. Unfortunately, in Xtext 2.0 all editor markers created by this framework were of type “Xtext Check.” There was no way to change such type (e.g. “Protocol Buffer Problem.”) Now this is fixed in 2.1 (tracked as bug 351963.)

Please note that these are just my first impressions after upgrading, I’m sure there are more goodies in Xtext 2.1 :)

As a side note, one of my sessions proposals, “Xtext Success Story at Google,” got accepted for EclipseCon 2012 as an early-bird pick. I hope to see you there!

(Image taken from allerleirau’s flickr stream under the creative commons license)

{ 6 comments… read them below or add one }

Sebastian November 22, 2011 at 12:59 pm

Thanks for sharing your impressions! See you at EclipseCon!


Alex Ruiz November 22, 2011 at 5:29 pm

Hi Sebastian,

Thank you and the Xtext team for this great project! Looking forward to seeing you at EclipseCon :)



Hendrik November 23, 2011 at 12:28 am

At Sigasi we are working on some more speed improvements for Xtext: parallelization and model caching. We hope to get them in the master branch soon. This will increase your speed even more.



Alex Ruiz November 23, 2011 at 10:03 am

Thanks Hendrik! That’s awesome news! Looking forward to those improvements :)



Gerrit February 6, 2012 at 10:22 am

The “XText Check” message was actually the reason I found out about XText. I think XText is a great framework, and the protobuffer editor is a nice example of what is possible with it.


Alex Ruiz February 6, 2012 at 10:55 am

Thanks Gerrit :)


Leave a Comment

Previous post:

Next post: