A "Compare Directories" plugin is now released. It allows the recursive comparison of the contents of two folders, assuming both folders contains files with the same name (like WinDiff does, if you know it, but in a more IntelliJ IDEA-like way).
I give here a few tips about to use it and some of the major features the plugin includes.
First you have 3 ways to start comparing two folders:
- you can select the two folders in the IDEA project tree; the contextual menu of any of these folders in the IDEA project tree view contains a "Compare directories" item at the very bottom of the menu. Just select it and you'll see!
- you can select one folder in the IDEA project tree; its contextual menu contains a "Compare directory with..." item at the very bottom of the menu. If you select it, a dialog box opens allowing you to choose the second folder to be compared (which can be outside your IDEA project).
- if no IDEA project node is selected, you can select "Compare Directories..." in the "Search" menu bar. A dialog box then opens allowing you to choose the two folders to be compared.
Then files with the same names in the selected folders are recursively compared. They can be either identical, different, different by blanks only (when compared files are not binary), left only or right only. The result is printed out in a tree view showing the compared folder structure, with icons showing for every tree node if the files are identical, different, different by blanks only (when compared files are not binary), left-only or right-only. Every comparison tree node has its own contextual menu, allowing the files of that node to be compared using the usual IDEA file compare window, or the left-side file or the right-side file to be opened in the IDEA editor.
Note that one of the folders or both folders can actually be ZIP files. ZIP files are then handled as compressed folders.
The comparison tree view can be filtered to show or hide identical, different, different-by-blanks-only, left-only or right-only nodes, using the buttons in the button bar of the "Compare Directories" panel. The button bar also allows interrupting or rerunning the whole comparison.
Comparison tree nodes can also be included/excluded like in the standard IDEA "Find" panel (see contextual menu of the comparison tree nodes or the "Insert"/"Delete" keys when such a node is selected). Nodes can also be "recomputed" in an isolated way to take file changes into account (using the appropriate contextual menu item).
Last feature: a left-only node and a right-only node in the same folder can be merged and the related files compared even if they have a different file name (select both nodes of the same folder, and a "merge" item appears in the node contextual menu if one is left-only and the other is right-only). Of course, a merged node can then be "un-merged" if wanted ("split" operation in the contextual menu of the merged node).
All comments and feedback are welcome.