How can I exclude some folders from my Eclipse project?

I'm adding an eclipse project to our existing code-base, and I'd like to know if there is a way to exclude some directories from being picked up by eclipse at all? The reason is that we have a huge "third-party" directory in our repository that cannot be present in the project for the pair-programming plugin we are using to be able to sync efficiently.

Any clues?


There is a straight way to do it:

  1. Right-click a project folder in Project Explorer tree and go to "Properties".
  2. Resource -> Resource Filters.
  3. Add as many exclusion filters for files/folders as you like.

P.S. If your project tree is not updated automatically you may have to press F5 while having input focus in Project Explorer window.


Filters will hide resources from view, but they're still in the project. If you create a project in another location you can create linked resources to the folders you want to include in your project.

For reference I posted another answer that describes how to use linked resources in more detail.


Yes, you may place a custom filter on your project. In your project explorer view, there should be a white, downwards pointing arrow near the top of the panel by the Package Explorer tab. Click it, and go to Filters. From there, you can specify certain folder patterns you do not want detected by checking the box next to Name Filter Patterns. In this case, I would put the name of the 3rd party library.