📅 2015-Feb-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ eclipse, exclude, include, project ⬩ 📚 Archive
You may sometimes need to selectively include or exclude certain files or directories in an Eclipse project. For example, I had a
data subdirectory in my Eclipse project with thousands of files. Eclipse would spend lots of time needlessly indexing these files. This can be prevented by just excluding that directory from the project.
Right-click on the project and choose Properties. Choose Resource -> Resource Filters.
In the Resource Filters dialog, click Add and choose which files and directories to either Include Only or Exclude All. Only provide the file or directory name, not a relative path or absolute path!
Refresh the project to update these settings. The excluded files or directories should disappear from the project.
If you are curious, Eclipse puts this setting in the
.project file for your project. For example, excluding a subdirectory named
zoomba in a project, resulted in Eclipse adding this XML snippet to the
<filteredResources> <filter> <id>1433235573506</id> <name></name> <type>30</type> <matcher> <id>org.eclipse.ui.ide.multiFilter</id> <arguments>1.0-name-matches-false-false-zoomba</arguments> </matcher> </filter> </filteredResources>
Tried with: Eclipse Luna 4.4.2 and Ubuntu 14.04