1

how can i filter all the java comments in winmerge?

/**
 * javadoc comment
**/

// line comment

These are the lines I would like to filter out?

awsome
  • 2,143
  • 2
  • 23
  • 41

1 Answers1

0

Maybe this can help: (Winmerge 2.14.0.0 Unicode)

  1. From Edit menu, goto Options.

  2. In the opened window, go to on the categories on the left, select Compare then General.

  3. On the right, you'll see a fieldset named Comments. Click the checkbox left to Filter Comments.

  4. Click OK

For more details here is what the Winmerge documentation says about this option:

3.8. Filter Comments
Disabled (default): WinMerge compares comments in code, along with other content.

Enabled: This option optimizes comparisons by detecting comments in certain programming language file types (such as C++ and Java), and ignoring them.

The recognized file types and their comment markers are defined in the file, IgnoreSectionMarkers.ini, at the top of the WinMerge installation directory.

On the other hand, you can filter out the comments only files:

  1. File > Open...

  2. From the opened window, set the Filter: field as you want. Look below: Set filter field from Select Files or Folders window - Winmerge 2.14.0.0 Unicode

Community
  • 1
  • 1
Stephan
  • 41,764
  • 65
  • 238
  • 329
  • it does help when i compare two files.. But when I try to compare 2 folders, the files which have only comment differences still show differences.. is there some other way to fix it.. – awsome Jun 12 '13 at 08:54
  • You can select those files and click `Hide items` – Stephan Jun 12 '13 at 09:15
  • 2
    I have almost 100 files in a folder and want winmerge to highlight the items that have changes. And I dont want the comment changes to be considered by winnmerge. So they should not be highlighted at all. Hiding them would not be possible until i look into all of them, which actually just makes the above solution of no use for me... – awsome Jun 12 '13 at 09:21
  • Can you use the `Filter` option in the *Select Files to Compare* window? Otherwise, I don't have any more solution. – Stephan Jun 12 '13 at 09:23
  • don't really get it.. what do you mean? – awsome Jun 12 '13 at 09:29