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/New and Noteworthy/0.8.0"

 
(No difference)

Latest revision as of 02:56, 6 October 2014

Ganymede Release

Model Comparison and Merge

You can compare any EMF based model and get the differences. Providing the 3 way comparison it will even be able to detect conflicts. Once you've got your differences you'll be able to merge them in order to synchronize your models.

CompareUI.png

1. The diff model displaying all the differences found on the models

2. The version 1 model

3. The version 2 model

4. The "export differences" button

5. Move to next/Move to previous difference

6. Merge the current difference (left to right or right to left)

7. Merge all non conflicting differences (left to right or right to left)

8. Display properties differences

Eclipse Team API

EMF Compare will be triggered on any comparison from CVS/SVN or Local History. It should be compatible with any Eclipse Team API implementation.

Compare-team-history.png

Export diff as ...

Any difference on model may be exported in a customized format. A tutorial is available exporting a difference to an HTML status report.

CompareHTMLExport.png

Standalone (without Eclipse)

You may use the component (no UI) without Eclipse as a pure Java jar, it only depends on the EMF core and runtime jars.

  final EObject model1 = ModelUtils.load(new File(args[0]), resourceSet);
  final EObject model2 = ModelUtils.load(new File(args[1]), resourceSet);
  // Creates the match then the diff model for those two models
  System.out.println("Matching models.\n"); //$NON-NLS-1$
  final MatchModel match = MatchService.doMatch(model1, model2, Collections
                                               .<String, Object> emptyMap());
  System.out.println("Differencing models.\n"); //$NON-NLS-1$
  final DiffModel diff = DiffService.doDiff(match, false);


Core Extensibility

Every part of the comparison process is extensible, you may redefine your own diff, match or merge support specific for a given model.

Compare extensibility.png

Back to the top