Exclude folders from Eclipse search

Dónal picture Dónal · Jan 14, 2009 · Viewed 85.1k times · Source

Is there a way to exclude certain folders (and all their subfolders) from searching within Eclipse?

Answer

Instantsoup picture Instantsoup · Jan 14, 2009

The quick and dirty way:

Right click on a folder, go to properties, and mark a folder as derived. Derived entities are excluded from searching by default. The problem with this approach is that Eclipse "forgets" that the folder is derived if you delete it (either from within Eclipse or externally, followed by refreshing the project tree). Like so often with Eclipse, this is a long-standing bug (10 years in this case) which still applies to the current version (4.6 Neon at the time of writing).

The safe way:

Create a working set including only those entities you want searched and search only within that working set. See Dave Ray's answer for details on this procedure.