Skip to main content
Jump to: navigation, search

Extending the differences model

Concepts and overview

The diff (or delta) model is obtained at the end of the comparison process. This model basically says "The XX element has been added, the YY element has been moved ..." . Using the generic diff engines you'll be able to detect the following operations:

  • Added element
  • Deleted element
  • Moved element
  • Renamed element
  • Added attribute value
  • Removed attribute value
  • Updated attribute value
  • Added reference value
  • Changed reference value
  • Removed reference value

Some metamodels would need higher level operations, lets use UML2 as an example. Adding an UML2 association implies creating an "Association" element in the package, containing two "AssociationEnd", creating a "Property" object in each concerned "Class" and then setting linking these properties and the AssociationEnd.

This is quite complicated when you get that in your differencing view, that mean just for "Adding an UML2 association" you get 7 changes! And merging becomes quite a challenge cause merging only one of these changes would lead to inconsistency.

And then DiffExtension arrives and save us ! This extension point is meant to clear such issues helping people to provide an "higher level" delta. Here it would be Adding UML2 Association..

API

Example

Back to the top