How to exclude certain folders from Eclipse Search.

One of the time-saving setting you can add to your eclipse preferences is to limit your file searches to your source code, and exclude 3rd-party folders. Such folders may include .git, .svn, cache or templates_c folder from smarty. There are a few different ways to accomplish this.

1. On the Eclipse File Explorer, right click on the folder that you want to exclude and choose "Properties". On the "Resource" screen, mark a folder Derived. Derived folder is excluded from search by default.

2. On the Eclipse File Explorer, (1) select the project -> Properties -> Resource Filters. (2) Click Add, (3) choose "Exclude All" filter type, (3) choose applies to "Folders" and check mark "All Children (recursive)", and (4) give name (or pattern) of the folder to exclude.

One of the side-effect of this method is that the folder(s) are hidden from the Project Explorer. If you have a dependency, you may have trouble compiling the source. For PHP, this is probably a non-issue.