How can I make Eclipse file search not include svn directories?

When I do a file search on eclipse it includes the .svn directories by default. I tried excluding them from the build path but they still appear on file search results.


Solution 1:

Spaceman is right. With Helios, choose Project -> Properties -> Resource -> Resource Filters and then add an exclude filter for type "Folder" with name .svn.

Solution 2:

If you install the subclipse plugin then it automatically excludes the .svn directories (plus provides some other cool stuff in the IDE).

http://subclipse.tigris.org/

If it does not work, simply restart Eclipse (sometimes it's needed on a fresh checkout)

Solution 3:

Following up on Mark Ingram's excellent answer, simply installing the plugin won't get you there -- You'll still need to Share your project in order for the automatic Search filtering to take hold. After you set up the SVN repository location from within the Subeclipse view you may Share your project by doing the following:

  1. From within Package Explorer, right-click the project name
  2. Select the Team context menu option and then Share Project....
  3. Step trough the wizard to tie your project to its location in the svn repository
  4. Once you complete that and the workspace rebuilds you are all set to enjoy filtered search.

Solution 4:

Excluding the .svn folders by making them derived stops then appearing in the search results, see here.

You have to do it manually for each folder, if you have a lot of .svn folders then it's not ideal.