A change is a difference between the transformation source and transformation target artifacts that, after transformation, results in a pending change for the transformation target. A change is generated during a merge session as a result of either a change in the source UML model or a change in the transformation target artifacts.
For example, if you add an element to an XSD model, a change is generated after the UML-to-XSD transformation runs. Similarly, if you delete a class in an XSD schema that is a target of the transformation, a change is also generated.
After a transformation runs, the Merge the Transformation Output window opens to start a merge session and displays changes in the Target pane at the top of the window. When you select target files that have changes, the differences between generated and existing target content are displayed in the panes at the bottom of the window.
You can perform the following actions in a merge session:
If you manually modified domain artifacts that the transformation generated previously and then reapply a transformation, you can use a merge session to ensure that these artifacts are not overwritten to prevent data loss.
When the software compares the source and target, it identifies the following types of differences between generated and existing target content:
Examples of differences include the addition of a class or entity, the renaming of a class or entity, and the deletion of a package. These differences occur when you perform a single action that results in a single difference.
Differences can also be caused by edits made directly in the domain content, which result in a conflict with the current state of the model source.
A merged target artifact contains the applied differences after a merge.
As you resolve differences between the generated and existing target contents, the merged result reflects the applied differences. To complete merge operation, you must first resolve all the differences by either applying the differences or marking them as merged.
A merge session typically ends when you close the editor by clicking OK, in which case all changed artifacts are saved automatically. Alternatively, you can choose to cancel a merge operation at any time. The merged results of any differences that you have resolved up to that time are not saved, and all source and target artifacts remain in the same state as before the transformation ran.