Let’s say you have a model-to-model transformation, and you want to provide the ability for the end-user to see and control what is going to be applied on the target model. How could you do that? EMF Compare might do the trick.
Here is a trivial transformation example: renaming all Classes which are abstract by adding a prefix to their name. The orchestrator loads the original models, applies the transformation, and then opens a comparison preview between the current serialized state (“now”) and the transformed state (“future”).
The preview is shown using EMF Compare by computing the match/diff, forging a compare editor input, and opening it:
Now, if you want to allow the end user to customize the output model and detect conflicts between transformation changes and their customizations, move to a three-way comparison by adding an untouched “ancestor” version. Use it as the common ancestor in EMF Compare, and conflicts will be highlighted:
It’s a simple example of what you can achieve using EMF Compare and how you can reuse it in your tooling.