Our modeling tools provide the API for the project merging (and differencing). The project merging consists of three steps:

  1. Discovering project changes (differences). The ancestor (in a 3-way merge only) and source projects are loaded (if they are not loaded yet) for comparing.
  2. Accepting / rejecting changes. All target changes that do not conflict source changes are applied (source changes conflicting with target changes are rejected). A 2-way merge produces source changes only.
  3. Applying accepted changes. Changes are applied on the ancestor project (target and ancestor projects are the same in a 2-way merge).

There are the API for the standard and advanced project merging. The standard API encapsulates all three steps into a single call, while the advanced merge API allows for accessing the project differences and controlling what changes are accepted or rejected.

The following figure shows the domain model of the merging.

More information is available in javadoc.

 You can find the code examples in

  • <installation_directory>\openapi\examples\merge