A diff is a comparison showing differences between the contents of files. This article is specifically about displaying the difference between the a project’s current version of an XJEase library file, and the latest version of that file available from the library that it belongs to.
Upon opening a project in XJDeveloper, if an XJEase library contains an updated version of any file taken previously from the library and used in the project, the Library Files Updated dialog is displayed, prompting that the files can be updated. For each file that has an update available, the dialog displays the filename, the library that the file originates from, the devices that the file is used by in the XJDeveloper project, and the version information (both the current version used in the project, and the version of the latest version available from the library).
A new feature in XJTAG 3.11 is the ability to view the diff between the current version of the file used in the project, and the most recent version available in the library. This feature may be useful to check for any changes to the file in a project that may otherwise go unnoticed. Alternatively, inspecting the file may indicate that the update should be avoided in situations where an update may potentially break an XJDeveloper project.
To view the diff between the current and latest version of a file, from the Library Files Updated dialog click the link to view changes under the Change Log column. This link launches a second dialog to display the change log for that file. Within this dialog, a description of updates between the current version and latest version is listed, and the new diff viewer tool is displayed underneath.
The diff viewer has two viewing mode options, toggleable by the radio buttons. The default option is a side by side view, in which the current version is displayed in the left panel, and the latest version is displayed in the right panel. Modifications are indicated by coloured highlights. A green background indicates a line has been added in the newer version of the file, whereas a red background indicates a line has been removed. Notice that for added lines, the corresponding lines in the left hand panel are empty, indicating they do not exist in the older version of the file (and similarly removed lines are empty in the right hand panel). Modified lines appear in yellow, however a modified line is likely to have only been modified at a subsection of the line. The subsection containing the modified part of the line is highlighted in orange.
The second view mode of the diff viewer is an under/over view, in which only one panel is displayed. Similarly to the side by side view, additions made in the newer version of the file are highlighted in green, and removed lines are marked in red. Since a direct comparison between a line that has been modified cannot be made, modified lines can instead be identified by pairs (or sets) of removed and added lines, where the removed lines highlight the lines as they exist in the current version of the file, and the added lines highlight the lines as they exist in the latest version of the file.
Leave A Comment