Saturday, April 21, 2012
Diff in NetBeans
Once we select Diff from Tools menu, netbeans throws up a Open file dialog, using which we select the file we are going to diff against current file (Or file in current tab). Once we have selected other file we are taken to a graphical view where we get to see the difference between both of them highlighted in red/green and blue colors. And this display helps us to quickly navigate to the areas where the files differ.
Also we are shown buttons using which we can insert data from one file to other where there is difference. Above crop of a screenshot shows part of a diff window where red and blue regions show differing code. I have used this diff to check and compare not even code but text, sql files as well as shell scripts.