13

Anyone know how to ignore the build folder when doing a 'Find in Projects' on NetBeans (v6.9.1).

Currently the Search results pane shows all results from src folders but also those from the build folder so if your project contains a lot of JSP files for example, many results are duplicated...

skaffman
  • 398,947
  • 96
  • 818
  • 769
YetMoreStuff
  • 930
  • 1
  • 9
  • 16

2 Answers2

32

I think I've figured out how to ignore the build folder of projects when doing a 'Find in Projects' in NetBeans 6.9.1:

  1. Go to Tools->Options-Miscellaneous.
  2. Click the Files tab.
  3. In Files Ignored by the IDE, edit the Ignored Files Pattern regular expression and include the build folder. For example, on my system I simply added build thus:

    ^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn|build)$|~$|^\.(?!htaccess$).*$
    
  4. Click OK to save the options and close the dialog.

(Nerd Note: Took me exactly 1 year to the day to figure this out!)

CoderDennis
  • 13,642
  • 9
  • 69
  • 105
YetMoreStuff
  • 930
  • 1
  • 9
  • 16
  • I think you have missed out one back slash after 'vssver.?.....it should be: ^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn|build)$|~$|^\.(?!htaccess$).*$ – Vin.X Feb 20 '14 at 21:51
  • @Vin.X That is the default value for this setting. YetMoreStuff merely added `build|` near the middle. I found adding `node_modules` as well greatly sped up the Open File dialog. – David Harkness May 30 '14 at 01:27
2

You may be able to get similar behavior with a multiple node selection search.

  • From the 'Files' Window (Found in the Window/Files Menu), expand all of your projects and select all of them with a Ctrl+A (PC) or Command+A (Mac).

  • Then with Control(PC) or Command(Mac) key held down, click the folders that you don't want to search.

  • Finally, use Ctrl+F(PC) or Command+F(Mac) to open a search, enter the text you're looking for, and then choose 'Selection ( # nodes)' under the Scope where the '#' symbol is the number of folders you just selected.

It is a little more manual than applying a filter, but you should be able to better control your results.

Matt Plank
  • 333
  • 6
  • 12