Eclipse - Ignore Entire Directories

Justin Noel picture Justin Noel · Jun 9, 2009 · Viewed 13.8k times · Source

I use Aptana Studio (based on Eclipse). I'm trying to get Eclipse to completely ignore an entire directory inside a project. I mean COMPLETELY. I don't want it to display in the project folder. I don't want Eclipse to even be aware it exists.

Unfortunately, all my efforts to add it as a filter don't work. See http://forums.aptana.com/viewtopic.php?f=14&t=8340#p33714 . I think the filter only prevents the folder from being displayed in the project display. It doesn't keep Eclipse from actually looking at all the files in that folder for code assist, etc.

My problem is that directory has thousands of text files. So, each time Eclipse opens or refreshes this project, it analyzes all those files.

How can I prevent this?

Answer

Gleb Varenov picture Gleb Varenov · Jun 12, 2011

Not sure about this aptana thing, but there is a convenient way to do it in native eclipse:

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

If your project tree is not refreshed immediately, press F5 to enforce it.