João Matos
João Matos

Reputation: 6950

Searching for file/class names in Netbeans does not work well

I started using Netbeans (8.2) a few weeks ago and the search utility is driving me insane. Basically, I search for a class/file name in the top-right corner and it returns with no results, when in fact the class/file exists in the project. The same thing if I do cmd+O (go to type). This does not happen every time, but it happens a lot. Is this a bug? If not, can anyone enlighten me what I'm missing? Thank you in advance.

enter image description here

Upvotes: 2

Views: 2911

Answers (3)

MotsManish
MotsManish

Reputation: 485

Netbeans has a limit. If the keyword you are looking for is found 5000 times in some file (mostly say log files), it won't search on other files.

So delete the logs file and you will get to see application files in search results.

Hope that helps.

Upvotes: 0

Andrey Lebedenko
Andrey Lebedenko

Reputation: 1978

Yes, I've faced that nasty bug too. It was reported previously (few times) and then closed, but problem remains even in 8.2. It looks like they messed up with index, or cache, or both. I've ended up writing my own search plugin using independent index db. It is called "Quick File Search" and among other features provides button to rebuild it's index (in settings). Also exposing regexp and allow you to automatically add extensions (if you need it).

Disclaimer: yes, I am the author of that plugin.

Upvotes: 4

liponcio
liponcio

Reputation: 284

In my understanding the search box allows you to search everything that you selected (You can change the selection in the icon).

In a simplistic way, the "go to type" refers to files that are related to the code (class files). If you want to go to other type of files you have to choose the "go to file".

So for example if you have a class called Status.java and a file called status.xhtml.

You could get both files with "go to file" (Alt+Shift+O in Linux). If what you want is only the class then you could use "go to type" (Ctrl+O in Linux)

Before I understood the difference I had some trouble finding files because I only used the go to type which only returned classes.

Upvotes: 0

Related Questions