Welcome to Compare-Land
Christian W. Damus
Yes, it has been a while since I last blogged, and that was before a long run of work on the Papyrus-RT project which just this month reached the all-important 1.0 release. Now I have changed tack slightly, still working on Eclipse open-source projects, but with a focus on the EMF Compare. At least, for now.
I am diving head-first into this project with some prototyping/experimentation in the use of Façade Models for customization and stream-lining of the user experience of compare/merge in complex modeling languages such as UML, especially when profiled for DSMLs (domain-specific modeling languages).
The embedded video is a demonstration, longer than is usual for these videos of mine, of the first prototype of pluggable Façade Providers in the EMF Compare framework. The framework consults the available façade providers to obtain instances of a façade model representing the input models to be compared. The idea is that the façade can more concisely and, in some ways, usefully encode the semantics of the domain-specific language that are significant to the efficient and correct comparison and merging of those models. Indeed, even the very simple example presented in the video shows how domain-specific constraints are easily represented in the façade that enable detection of merge conflicts that are much more cumbersome to implement "by hand" in the EMF Compare framework.
Basically, what happens is that instead of comparing the underlying model content (in this case, profiled UML), the system compares the façades and presents that comparison to the user in its terms. And changes performed by the user on the merge result are propagated by the façade to the underlying model, to be written out when the user saves the merge result.
Check out the video above and get the code in my GitHub fork of the EMF Compare project, on the uml-compare branch. Look particularly at the new plug-in and test projects:
oeec.facade
— some core façade framework bitsoeec.facade.ui
— the user interface for façade provider preferencesoeec.uml2.facade
— extensions to support façades for UML profilesoeec.uml2.facade.tests
— some JUnit tests for basic façade mechanics and simple façade-based compare/merge scenarios
Where, of course, oeec
is just a compact substitute for the org.eclipse.emf.compare
namespace.