Compare Files

Function:

The tool "Compare Files" opens two files in an Eclipse compare editor. The tool can be modeled to compare the two files (read only) or to merge them into one file (edit).

Attribute Type Description
Compare TypeD Selection Valid values are:
  • Simple Compare
  • Compare with Each Other

The Simple Compare type needs two file input parameters, whereas Compare with Each Other works on two selected AWM elements.

Enable Edit Input Parameter Boolean If true, an additional input parameter can be used to request edit support.

This attribute is only available if the compare type Simple Compare is selected.

Parameters for Simple Compare

Parameter No I/O Type Description
1 [M] I File File input parameter pointing to the first file to compare (left side in the compare editor).
2 [M] I File File input parameter pointing to the second file to compare (right side in the compare editor)
3 [O] I Boolean Whether the first file should be opened in edit mode; if edit mode is set to true, the first file must be a workspace file.

Parameter for Compare with Each Other

Parameter No I/O Type Description
1 [M] I File File input parameter pointing to the files to be compared.

If using Compare with Each Other, two AWM elements must be selected at run time and the following modeling is required to support this compare type:

  • The compare action descriptor must be marked as a mass processing action.
  • The input file descriptors require the physical file names specified in the attribute Name Physical. If property references are used they must be resolvable by properties of the selected elements.
  • It is recommended to define an action enable condition with a selection count of "2".

The following rules also apply in this scenario:

  • The upper element of the selection is displayed on the left side of the editor.
  • Edit is not supported.
  • Both elements must be selected in one view.