Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to reset the error badges in Netbeans?

Tags:

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.

like image 659
Daniel Rikowski Avatar asked Aug 06 '10 07:08

Daniel Rikowski


People also ask

How do I fix build failed error in Netbeans?

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.

How do I show warnings in Netbeans?

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.


2 Answers

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.

like image 164
Daniel Rikowski Avatar answered Sep 20 '22 01:09

Daniel Rikowski


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 {} \;
like image 32
inanutshellus Avatar answered Sep 20 '22 01:09

inanutshellus