Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EMF Compare/CompareUMLPapyrusAPI

THIS PAGE IS ARCHIVED. IT IS PROBABLY OUTDATED AND WILL NOT BE UPDATED

This work is developed by Obeo and sponsored by Ericsson in the context of the Modeling Platform Industrial Working Group

Enhance the existing tree editor

EMFCompare support for Logical Model Integration

The need for a more logical view on resources has been discussed and implemented in Eclipse and the work on this started prior to Eclipse 3.2. It was there identified that also the Team API needs to be more logical context aware so that not all operations were performed file-by-file. This includes fetching logical context for different versions and also the ability to commit changes in several physical files in one merge commit which logical model merging does.

Information spawn from the bugzilla bug 37723 that was filed 2005 https://bugs.eclipse.org/bugs/show_bug.cgi?id=37723 and http://www.eclipse.org/eclipse/platform-team/team3.0/logical-physical.html

Logical model API aware SCM (only CVS currently) should have the ability to resolve related artifacts that are participating in a merge. When merging in one commit/change-set you are comparing files that are part and not part of the change set. The rest of the files are identical for the two versions of the model to be merged.

Detailed specifications

Specific support of UML Model

In order to provide the best possible accuracy and precision when comparing and merging UML models, it is necessary to implement a specific comparison engine which handles the UML meta-model directly (according to the UML metamodel defined with EMF in Eclipse / Modeling Tools / UML).

For example, for the addition (or deletion or modification) of an association at the UML level, there is 3 additions (or deletions, or potential modifications) in the EMF representation : one "association", and two "property ends". We will define specific UML extensions for EMF Compare using the DiffExtension API to create the UML level operations (AddAssociation, DeleteAssociation, ModifyAssociation) and write the recognition code to identify these UML level change operations from the EMF level change operations. So, the end-user who diffs and merges a UML model will only see UML level change operations, and the changes will be applied atomically on the model to avoid model inconsistency.

Additionally, EMF Compare will support diff and merge of fragmented UML models, that is UML models stored in several physical resources, and of sets of UML model fragments. The fact that UML level operations are atomically applied will be specifically addressed in the case of merging of model fragments to forbid partial merges in one fragment that would corrupt the whole model. See previous section for more information #Support of Eclipse logical model Team API.

Another transversal UML issue to be addressed is the support of UML profiles.

We will also ensure that generic APIs are adapted to work at the UML level. More specifically, we will provide UML level APIs for:

  • API to request a UML diff between two models providing the result as a list of structural differences or serialized to a file
  • API to retrieve the UML modification types (e.g. add, delete, change, move, separation/fragment, join/fragment)

Then, we identify separate sets of UML diagram meta-models which will be supported incrementally:

  • Support first set of Structural metamodels : Package, Class
  • Support second set of structural metamodels : Composite
  • Support first set of behavioral metamodels : Use Case , Sequence, Activity
  • Support second set of behavioral metamodels : State, Communication

Detailed specifications

GMF Diagram Comparison

With diagram comparison, a user must be able to graphically visualize the changes between two or three diagrams. Diagram comparison will contribute a new comparison editor, in addition to the tree and textual comparison editors. This new editor will be available when the compared resources are GMF diagrams. Typically, the diagram comparison editor will display one version of the diagram without decoration (the original diagram) alongside another version of the diagram with graphical decorations to show the differences.

  • Additions of nodes or edges must be highlighted with a specific graphical decoration.
  • Suppression of nodes and edges must be highlighted with a specific decoration.
  • Labels changes must be highlighted with a specific decoration.
  • Layout changes must be displayable, but must also be filtered with a configurable threshold. This threshold must be configurable either through an API, or an Eclipse preference.

Example of integration of the different graphical decorations for a diagram:

Detailed specifications

Support fo various UML diagrams comparison in Papyrus

Beyond the generic implementation of GMF graphical diagrams comparison, we will integrate diagram comparison in the Eclipse foundation open source tool Papyrus. We will incrementally implement the different diagrams supported in Papyrus:

  • Support first set of Structural diagram metamodels : Package, Class
  • Support second set of structural diagram metamodels : Composite
  • Support first set of behavioral diagram metamodels : Use Case , Sequence, Activity
  • Support second set of behavioral diagram metamodels : State, Communication

A specific communication and contribution channel will be established to ensure that the UML model comparison is integrated with the mainstream Papyrus releases.

Detailed specifications

Others generic APIs

The following APIs will be implemented to work both with the Tree and diagram comparison editors:

Back to the top