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:


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":


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

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo