Netbeans sometimes displays error badges in situations where no actual error occours. (Often on folders, too)
Although Google finds many pages reporting this issue for various Netbeans versions, I could not found a solution to reset the error badges without deleting and re-creating the project with a different name (!).
How can I remove the badges besides recreating the project?
Somewhere Netbeans has to store the information which folder has an error badge. Perhaps it is possible to delete some kind of cache and be done with it.
Solution to my problem: Remove MinGW and ALL of it's components, and also remove the folder x:\MinGW. Then install Cygwin, choose the packages you need, tutorial can be found on https://netbeans.org/community/releases/73/cpp-setup-instructions.html#cygwin or YouTube about which packages you need.
As of NetBeans 7.2, there's a new "Inpect" window (go to Source > Inspect ...) that will show all the hints for a project. You can also install additional inspectors, like FindBugs, and those hints will be included too.
I discovered it myself: The Netbeans errors are cached in the index
sub-directory of the Netbeans user directory. Here are the some .err and .warn files, which contain the error and the warning messages.
That's also the reason why recreating a project with the same name doesn't get rid of the badges: The data is stored outside of the project.
Deleting all *.err and *.warn files in that directory and all sub directories makes Netbeans forget the error badges until they are recreated because of a real compile error.
PS: Be prepared for a rescan of your projects after deleting files from the cache, but it should be quick if no other files have been deleted.
NetBeans has moved the userdir directory
See here for your specific OS: http://wiki.netbeans.org/FaqWhatIsUserdir
Unix-Like Systems (and Mac OS for NB 7.1 and earlier) script:
find ~/.netbeans/7.1/var/cache/index/ -name "*.err" -exec rm {} \;
find ~/.netbeans/7.1/var/cache/index/ -name "*.warn" -exec rm {} \;
Mac OS Systems NB 7.2 and later script:
find ~/Library/Caches/NetBeans/7.2rc1/index/ -name "*.err" -exec rm {} \;
find ~/Library/Caches/NetBeans/7.2rc1/index/ -name "*.warn" -exec rm {} \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With