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 "EMF Compare/CompareUMLPapyrusAPI"

(Enhance the existing tree editor)
 
(33 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Some of this work are sponsored by [http://www.ericsson.com Ericsson]
+
{{Template:EMF Compare Archive Notice}}
 +
 
 +
This work is developed by [http://www.obeo.fr Obeo] and sponsored by [http://www.ericsson.com Ericsson] in the context of the [[ModelingPlatform | Modeling Platform Industrial Working Group]]
  
 
== Enhance the existing tree editor ==
 
== Enhance the existing tree editor ==
  
* [[EMF Compare/EGit support | Specific team handler for model resources managed through Git with eGit]]. This handler enables the comparison and merge of files managed with Git.
 
 
* [[EMF Compare/Textual diff in model diff | Capability to switch between the tree and textual editor by using a popup menu, without losing the selection.]]
 
* [[EMF Compare/Textual diff in model diff | Capability to switch between the tree and textual editor by using a popup menu, without losing the selection.]]
* Capability to restrict the comparison on the current selection
+
* [[EMF Compare/Restrict comparison on selection | Capability to restrict the comparison on the current selection]]
* Capability to group differences by:
+
* [[EMF Compare/Grouping facility | Capability to group differences]] by:
 
** File
 
** File
 
** Modification type
 
** Modification type
 
** Meta model element
 
** Meta model element
** Flat text elements (?)
+
** Flat text elements
  
* Capability to dynamically hide/show the displayed elements with filters:
+
* [[EMF Compare/Filtering facility | Capability to dynamically hide/show the displayed elements with filters]]:
 
** Filter add changes
 
** Filter add changes
 
** Filter delete changes
 
** Filter delete changes
Line 18: Line 19:
 
** Filter element order changes
 
** Filter element order changes
 
   
 
   
* Propose a Preference page to define default settings for EMF compare filter
+
* [[EMF Compare/Filtering facility#Preference_page_for_filter_setting_configuration | Propose a Preference page to define default settings for EMF compare filter]]
* Provide an API enabling the contribution of new filters.
+
* [[EMF Compare/Filtering facility#Provide_an_API_enabling_the_contribution_of_new_filters | Provide an API enabling the contribution of new filters.]]
 +
 
 +
== 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. 
 +
 
 +
'''[[EMF Compare/Logical model support | Detailed specifications]]'''
  
 
== Specific support of UML Model ==
 
== Specific support of UML Model ==
Line 27: Line 39:
 
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.  
 
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.  
+
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.
 
Another transversal UML issue to be addressed is the support of UML profiles.
Line 42: Line 54:
 
* Support first set of behavioral metamodels : Use Case , Sequence, Activity
 
* Support first set of behavioral metamodels : Use Case , Sequence, Activity
 
* Support second set of behavioral metamodels : State, Communication
 
* Support second set of behavioral metamodels : State, Communication
 +
 +
'''[[EMF Compare/UML Compare | Detailed specifications]]'''
  
 
== GMF Diagram Comparison ==
 
== GMF Diagram Comparison ==
Line 48: Line 62:
  
 
* Additions of nodes or edges must be highlighted with a specific graphical decoration.
 
* Additions of nodes or edges must be highlighted with a specific graphical decoration.
* Modifications of nodes and edges must be highlighted with a specific decoration.
+
 
 +
<gallery widths="150px" heights="200px">
 +
Image:Diag_comp_add_1.png‎|'''Example''' of graphical decoration for node addition
 +
Image:Diag_comp_add_2.png‎|'''Example''' of graphical decoration for edge addition
 +
</gallery>
 +
 
 +
* Suppression of nodes and edges must be highlighted with a specific decoration.
 +
 
 +
<gallery widths="150px" heights="200px">
 +
Image:Diag_comp_del_1.png‎|'''Example''' of graphical decoration for node deletion
 +
Image:Diag_comp_del_2.png‎|'''Example''' of graphical decoration for edge deletion
 +
</gallery>
 +
 
 +
* Labels changes must be highlighted with a specific decoration.
 +
 
 +
<gallery widths="450px" heights="200px">
 +
Image:Diag_comp_label_1.png‎|'''Example''' of graphical decoration for node label modification
 +
Image:Diag_comp_label_2.png‎|'''Example''' of graphical decoration for edge label modification
 +
</gallery>
 +
 
 
* 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.
 
* 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.
 +
 +
<gallery widths="200px" heights="200px">
 +
Image:Diag_comp_figmove_1.png‎|'''Example''' of graphical decoration for layout change
 +
</gallery>
 +
 +
Example of integration of the different graphical decorations for a diagram:
 +
 +
<gallery widths="450px" heights="300px" perrow="2">
 +
Image:Diag_comp_before.png‎|Original diagram
 +
Image:Diag_comp_after.png‎|Diagram after modification
 +
Image:Diag_comp_diff.png‎|'''Example''' of diagram with decorations for all the changes
 +
</gallery>
 +
 +
'''[[EMF Compare/GMF Compare Markers | Detailed specifications]]'''
  
 
== Support fo various UML diagrams comparison in Papyrus ==
 
== Support fo various UML diagrams comparison in Papyrus ==
Line 61: Line 108:
  
 
A specific communication and contribution channel will be established to ensure that the UML model comparison is integrated with the mainstream Papyrus releases.
 
A specific communication and contribution channel will be established to ensure that the UML model comparison is integrated with the mainstream Papyrus releases.
 +
 +
'''[[EMF Compare/UML Compare Papyrus integration | Detailed specifications]]'''
  
 
== Others generic APIs ==
 
== Others generic APIs ==
Line 66: Line 115:
 
The following APIs will be implemented to work both with the Tree and diagram comparison editors:
 
The following APIs will be implemented to work both with the Tree and diagram comparison editors:
  
* API to create a viewer listing all structural changes resulting from a model comparison which includes the filtering and grouping options as mentioned previously. This API will offer the capability to programmatically retrieve the Meta model class (type) e.g. Documentation, stereotype)
+
* [[EMF_Compare/API_Viewer_FilteringGrouping | API to create a viewer listing all structural changes resulting from a model comparison which includes the filtering and grouping options as mentioned previously. This API will offer the capability to programmatically retrieve the Meta model class (type) e.g. Documentation, stereotype)]]
* API to query the viewer for the list of visible changes (e.g. not filtered out) The type of elements returned in the list of structural differences should offer an API to retrieve the location information of the affected elements, in order to trigger the selection of the affected elements in both the Project Explorer and Editor.
+
* [[EMF_Compare/API_GetVisibleDiffElements | API to query the viewer for the list of visible changes (e.g. not filtered out) The type of elements returned in the list of structural differences should offer an API to retrieve the location information of the affected elements, in order to trigger the selection of the affected elements in both the Project Explorer and Editor.]]
* API to handle and serialize a set of graphical elements under comparison so that it is possible to pass them on to another tool.
+
* [[EMF_Compare/API_LayerDifferences | API to handle and serialize a set of graphical elements under comparison so that it is possible to pass them on to another tool.]]
* API to launch an Eclipse Model Compare editor with two specified versions of model files and be able to programmatically request the selection of a structural change based on a previously obtained location.
+
* [[EMF_Compare/API_OpenEditorWithSelection | API to launch an Eclipse Model Compare editor with two specified versions of model files and be able to programmatically request the selection of a structural change based on a previously obtained location.]]
 +
 
 +
* [[EMF_Compare/API_MetamodelRequiresLink | Meta-model API to define dependencies between difference elements]]

Latest revision as of 11:59, 5 March 2014

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