Is there a way to reset the error badges in Netbeans?
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 {} \;