CDO & Xtext: Will it blend?

Session Type: 
Standard [35 minutes]

During the past two years, I talked to several people - customers and Eclipse hackers alike - about a simple question: Whether it is actually possible to store models edited with Xtext in CDO - or, if you like the other point of view better: whether you can edit a model stored in CDO with an Xtext editor.

While the question is rather simple, the answer is not:

  • Xtext usually does not store EMF models but textual representations;
  • Xtext uses an XtextResource to deserialize and serialize EMF models;
  • CDO uses an EMF root class to intercept and delegate feature read/write operations;
  • CDO uses a CDOResource to store and access models;
  • CDO requires the EMF model to maintain and stick to CDOIDs during modifications.

In short: both technologies seem quite incompatible for several reasons.

Nevertheless, I have tried to tie both technologies together and achieved a first breakthrough with a proof-of-concept implementation.

In this talk, I will give a short overview of both CDO and Xtext and how they deal with EMF models. I will elaborate on the problem fields which make both technologies incompatible at first sight. Then I will present my approach which utilizes a mixture of adapters for Xtext and EMF Compare to detect and propagate changes made in the Xtext editor. And of course, there will be a demo ;-)

Schedule info



Cool Stuff
Experience level: