58

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.

Sid M
  • 4,354
  • 4
  • 30
  • 50
ryantm
  • 8,217
  • 6
  • 45
  • 57
  • Related: [Exclude folders from Eclipse search](http://stackoverflow.com/questions/443169/eclipse-exclude-folders-from-search) – blahdiblah Sep 27 '12 at 21:37

9 Answers9

106

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

Sid M
  • 4,354
  • 4
  • 30
  • 50
Brad Whitaker
  • 1,174
  • 1
  • 8
  • 4
  • 29
    Also ensure that you have checked the recursive box – Mike Schall Sep 15 '10 at 16:28
  • 3
    this works for the general case, filtering any arbitrary set from search results (which is what I was really after when Google plopped me here) – rymo Aug 18 '11 at 23:14
  • 1
    This is the real answer, as the plugins aren't automatically filtering anymore (see Mark's comment on his own answer) – Osman Dec 21 '12 at 18:14
  • 1
    It seems that you must configure 'Resource Filters' for every project individually. However, on that page, there is a 'Restore Defaults' button. Can anyone explain how I set these 'defaults'? That would appear to fix the problem for all projects - or at least all new projects... – Alex Worden Oct 02 '13 at 21:33
  • Eclipse Juno: Project Properties>Resource>Resource Filters>Add: Then Select: `Exclude all + Files and folders + All children(recursive) + SVN meta-information filter combo`. OK. – Fredrick Gauss Jun 10 '15 at 07:15
8

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.
Sid M
  • 4,354
  • 4
  • 30
  • 50
8

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)

Sid M
  • 4,354
  • 4
  • 30
  • 50
Mark Ingram
  • 71,849
  • 51
  • 176
  • 230
  • 2
    Yes, the latest version seems to have "issues". I'm unsure why, my .svn directories are no longer hidden either. – Mark Ingram Jul 27 '09 at 09:34
  • My SVN directories are hidden in the project explorer but still are included in the file search. – flu Jan 30 '13 at 13:12
3

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.

Community
  • 1
  • 1
spaceman
  • 41
  • 1
  • 5
2

If you are gonig down the plugin route, I tend to prefer subversive over subclipse.

serg10
  • 31,923
  • 16
  • 73
  • 94
0

Eclipse import would also contain file of type .java.svn-base, so its better to give as in below image

[[1]: https://i.stack.imgur.com/szDxP.png][1]

V.R.Manivannan
  • 21
  • 2
  • 10
0

Ah - OK. I don't use SubVersion per se, but would this be of any use? It claims it can do what you want...

ColinYounger
  • 6,735
  • 5
  • 31
  • 33
-1

You can off course also select ALL the file name patterns to include in the file search dialog

-3

Click on the drop-down triangle in the top-right corner of the Navigator and choose "Filters..".

By default Eclipse only offers you ".class" and ".".

If you choose ".*" you'll hide .svn files. Obviously all other .something files will also be hidden.