Skip to content

Take Diagram Elements

Starting with LemonTree 2.5, you have the option of manipulating the result of merging diagrams directly in the diagram viewer of LemonTree.

This page will demonstrate this functionality.

Scenario

We're trying to merge three versions of an extremely minimalistic activity diagram.

Base

The Base Version looks like this:

Base Version

Version A has moved the action:

Version A

Whereas Version B has renamed the action:

Version B

Initial Merge Result

Merging these models will lead to an initial merge result which looks like this:

Initial Merge Result

Manipulations

However, you can now manipulate the merge result in different ways - directly in the respective diagram views, or in the merge preview itself.

Taking All Changes From One Branch

When selecting the action in the diagram viewer for Version A, a red arrow appears in the top left of the element:

Arrow

Clicking on this arrow shows the following menu:

Arrow Open

which lets you take either the Element, the Diagram Representation, or both, from the respective branch.

The availability of both the arrow control itself, as well a the controls shown in the screenshot above, depends on the differences of the selected element between A and B. If an element hasn't changed, the arrow control will not appear at all. Likewise, if only the Diagram Representation of the element has changed, the Element option will not be offered.

If we choose the "Both" option in branch A, both the element and its diagram representation in the merge result will be identical to how they are in branch A:

Both A

While the initial merge version included both the rename and the move of the action, this version no longer contains the rename. 

Combining The Changes From Both Branches

You are not limited to taking the changes from one branch this way.

For example, by taking the diagram representation from Branch A (where only the element changed) and the element from Branch B (where only the diagram representation has changed), you can recreate the element as it was in the base version:

Combining