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/API LayerDifferences"

 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
= THIS PAGE IS OUTDATED AND IS NOT SCHEDULED TO BE UPDATED =
+
{{Template:EMF Compare Archive Notice}}
  
 
The API enables to compute differences between GMF diagrams and to layer these differences (through decorators) on out diagram resources. It is the service class: GMFCompareServices which contains this API:  
 
The API enables to compute differences between GMF diagrams and to layer these differences (through decorators) on out diagram resources. It is the service class: GMFCompareServices which contains this API:  
Line 33: Line 33:
 
ComparedResourceSets result = GMFCompareService.layerDifferences(diffModel);
 
ComparedResourceSets result = GMFCompareService.layerDifferences(diffModel);
 
</pre>
 
</pre>
 
[[Category:Modeling]] [[Category:EMF Compare OUTDATED]]
 

Latest revision as of 12:00, 5 March 2014

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

The API enables to compute differences between GMF diagrams and to layer these differences (through decorators) on out diagram resources. It is the service class: GMFCompareServices which contains this API:

  • ComparedResourceSets layerDifferences(ComparedResourceSets input, final Map<String, Object> options)

The CompareResourceSets class is a structure to contain the set of the resources to compare (left, right and ancestor).

This method returns this structure with decorated resources, corresponding to the computed differences.

The parameter "options" is the options for the match processing.

Here is an exemple to call this API:

ComparedResourceSets input = new ComparedResourceSets();
input.setLeft(modifiedResourceSet.getResources());
input.setRight(originalResourceSet.getResources());
		
ComparedResourceSets result = GMFCompareService.layerDifferences(input, Collections.EMPTY_MAP);

There is an other API to decorate the compared diagrams from a result of comparison (DiffResourceSet):

  • ComparedResourceSets layerDifferences(final DiffResourceSet diffModel)

Here is an exemple to call this API:

final MatchResourceSet matchModel = MatchService.doResourceSetMatch(modifiedResourceSet, originalResourceSet, Collections.<String, Object> emptyMap());
final DiffResourceSet diffModel = DiffService.doDiff(matchModel, false);
		
ComparedResourceSets result = GMFCompareService.layerDifferences(diffModel);

Back to the top