[RSS]

Enable whitespace for diff in NetBeans

by Hubert A. Klein Ikkink; first published in blog

I was working on a project and changed some files. NetBeans showed me several files had been modified compared to the latest versions from the versioning control system. But when I wanted to see the differences using the diff viewer in NetBeans I saw no changes. I turned out the only change had been in whitespace and by default NetBeans doesn't show the whitespace differences. The following figure doesn't show any change, but the change is there:

netbeans-diff1.png

We can disable this so we can see all the changes to a file, even whitespace differences. We need to go to "Tools | Options | Miscellaneous | DIff". Now we can uncheck the checkbox "Ignore Whitespaces":

netbeans-diff2.png

The diff viewer will now show the extra spaces added to line 12:

netbeans-diff3.png

Attachments

netbeans-diff1.png Info on netbeans-diff1.png 44592 bytes
netbeans-diff2.png Info on netbeans-diff2.png 48023 bytes
netbeans-diff3.png Info on netbeans-diff3.png 45539 bytes