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

Papyrus Compare

Papyrus Compare provides comparison and merge facilities for Papyrus models. It enables teams to work together on their Papyrus models using git. Therefore, Papyrus Compare hooks into git operations that require a merge and performs a model-level merge that respects the logical structure of Papyrus models, instead of a plain text merge. When comparing git branches or any git refs, Papyrus Compare also shows the differences on model level instead of showing a text diff. Papyrus Compare is integrated with the Eclipse Team tooling and workflows. Thus, Papyrus models can be compared, merged, cherry-picked, and rebased in Eclipse just like you would do it with source code.

To achieve that, Papyrus Compare builds on and extends EGit and EMF Compare, respectively, in order to customize them to seamlessly support their usage with Papyrus models. Papyrus Compare is an extra component of the Papyrus project but is not part of the Eclipse release train.

The goal of Papyrus Compare is to support all diagram types and domain-specific profiles provided in Papyrus. At this point, however, the maturity level varies across the diagram types and profiles.

Streams and Compatibility

Two streams of Papyrus Compare are available. The development stream called "nightly" and the more tested but less frequently updated integration stream. The nightly stream is built against the nightly build of EMF Compare, while the integration build is built against the latest release of EMF Compare.

For Papyrus Oxygen, Photon, 2018-09, 2018-12, 2019-03 or 2019-06 use the integration build version 0.7.0-I20190520-132626. For any Papyrus version after that, use versions later than 0.7.0-I20190520-132626 (such as the nightly 0.7.0-N20200320-164625).

Setting Up Papyrus Compare

Installation

To install Papyrus Compare, we first have to install the latest EMF Compare, if it isn't installed already from the EMF Compare Releases Update Site. Next, we have to add the Papyrus Compare update site. Depending on whether you want to install the nightly stream or the integration stream (see above), the location of the update sites are as follows:

To add the update site, open the menu HelpInstall New Software... and click Add.... In the Add Repository dialog, enter an arbitrary name, for instance Papyrus Compare, specify the location depending on the preferred stream as listed above, and click OK.

PapyrusCompare 1 - add-update-site.png

Select Papyrus Compare > Papyrus Compare Feature (Incubation) and click Next >. On the next page, confirm the selected feature to install and click again Next >. Now you have to confirm the Eclipse Public License by selecting I accept the terms of the license agreement and click Finish.

The installation will start in the background and may take a few minutes to finish, depending on your internet speed and the availability of the Eclipse servers. You can view the progress of the installation when you click on the progress button in the lower-right corner of the Eclipse window. If you are installing the nightly stream, you may see the warning above, as this build is not signed.

PapyrusCompare 2 - security-warning.png

Please click Install anyway if you are fine with installing unsigned content. Once the installation is finished, you will be asked to restart Eclipse. Please click Restart now to restart.

If everything went fine, Papyrus Compare is successfully installed.

Configuration

There are various configuration options to consider. In the following, we list the recommended preference settings. Especially the first one is necessary to allow Papyrus Compare to handle Papyrus models during the git merge operations. To configure the preferences, open the menu WindowPreferences.

  • Enable the model merge strategy in git (required) Go to Team → Git → Synchronize and select Recursive Model Merge Strategy
  • Enable the Scalable Conflict Detector in EMF Compare (strongly recommended) Go to EMF Compare → Engines, open the tab Conflict, and check Scalable Conflict Detector
  • Enable pre-merging non-conflicting changes (optional but recommended) Go to EMF Compare → Merge and check Pre-merge models when a real conflict is detected
  • Enable workspace resolution of cross-references (optional but recommended) Go to EMF Compare → Resolution Strategy and select Workspace in the drop-down box Resolution scope
  • Disable selecting the next unresolved difference after a merge action (optional) Go to EMF Compare → Editor, open the tab Model Difference Tree, and uncheck Select next unresolved difference after a merge action

You are all set and can now start using Papyrus Compare.

User Documentation

The user documentation is work in progress. In the meantime, please refer to the video tutorial and to the EMF Compare User Guide, in particular, the user interface documentation and documentation of how to compare models with EGit.

Developers' Information

Useful Links

Building Papyrus Compare

Clone the source code repository and run the following command to build the nightly stream or the integration stream.

# Nightly stream
cd plugins/compare/
mvn clean install -Dtarget.stream=nightly
# Integration stream
cd plugins/compare/
mvn clean install

Back to the top