A Ruleset can also describe the various Contexts in a file and classify them as Important or Unimportant. For example, changes within a source code comment are not as important as changes in the code itself or in a string literal. Furthermore, whitespace changes in C source code are not as important as whitespace changes within a string literal.
When the Detail Level is set to Lines and Characters, DiffMerge classifies all changes as either important or unimportant using the information in the Ruleset. Normally, DiffMerge draws these unimportant changes in a dimmer color. In the following example, compare the coloring of the “CHANGED” and “YOUR/MY” changes in the file panel and in the glance bar. Also, the Change Stats shows that there are 3 changes.
When the Display Mode is set to Show All, the View | Hide Unimportant Differences command causes DiffMerge to draw them as if they were identical (and with a slightly dimmer color for intra-line character changes). In the following example, the 2 comment lines are no longer highlighted. And the word “CHANGED” is dimmed slightly. The glance bar no longer shows a block for the change. The whitespace before “sz” is no longer highlighted. The Change Stats shows that there are 2 important changes and 1 unimportant change (not being shown).
If we set the Display Mode to Show Differences Only, we see only the 3 changes with Gaps between them.
If we now turn on View | Hide Unimportant Differences, the unimportant changes are not drawn at all. Again, the Change Stats indicates that 1 unimportant change is being hidden.