Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Extending the differences model"

m (New page: =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 ...)
 
(Concepts and overview)
 
Line 1: Line 1:
 
=Concepts and overview=
 
=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, deleted, moved and renamed element, added,removed,updated attribute value, added, changed, removed reference value.
+
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 imply 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.  
+
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 become quite a challenge cause merging only one of this change would leed to inconsistency.
+
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  
 
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.''.
 
an "higher level" delta. Here it would be ''Adding UML2 Association.''.
 
  
 
=API=
 
=API=
  
 
=Example=
 
=Example=

Latest revision as of 22:56, 24 April 2009

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

Copyright © Eclipse Foundation, Inc. All Rights Reserved.