score:254
Here is what works for me (I'm using Helios - maybe this way was not available when this question was originally asked?)
- Go to Project -> Properties -> Resource Filters.
- Click Add.
- Choose Filter type: Exclude all
- Choose Applies to: Folders; check All children (recursive).
- In the Attributes, choose Name, Matches,
.svn
(for example).
(Actually, I'm using .*
to filter out .svn, .hg etc. in one go.)
After okay'ing the project properties dialog, these directories won't come up in search any more. In fact, Eclipse is so kind as to automatically update existing search results windows and remove all matches which are now filtered out.
score:0
Excluding a folder or file from being searched in Eclipse
1 Right-click on the file/folder.
3 Click on the "Properties" option.
4 Select the "Resource" option.
5 Place a check next to the "Derived" attribute.
Hope is help.
score:1
The best quick and dirty way in Eclipse Juno:
- Right click on the folder.
- Go to Properties.
- Go to C/C++ Build.
- Check "Exclude resource from build".
- Click in OK button.
- Right click on the project.
- Go to Index.
- Click Rebuild.
- Relax!
score:3
- Right click on your project
- Select
Properties
- Select
Resource
->Resource filters
- Click
Add filter
- Choose the following settings:
- Exclude all
- Files and folders
- All children (recursive)
- Change
Name
forProject Relative Path
- Fill input text with
(bin$|bin/.*|build/.*|build$)
(replacebin
andbuild
by the names of the folders you want to exclude) - Tick
Regular expression
Hit OK and then Apply.
Disclaimer
This builds on @atzz's answer, which helped me figure this out. However while it did answer the question of how to exclude certain files, it didn't answer the question of how to exclude certain folders.
score:85
I could imagine that marking resources derived might cause problems in other areas. Instead, create a working set with the folders you want to include in the search:
- Open Search dialog (Ctrl + H)
- Change search scope to Working Set
- Click Choose ...
- Click New to create a new Working Set with the what you want searched (or Add All and then remove the ones you want filtered
score:297
The quick and dirty way:
Right click on a folder, go to properties, and mark a folder as derived. Derived entities are excluded from searching by default. The problem with this approach is that Eclipse "forgets" that the folder is derived if you delete it (either from within Eclipse or externally, followed by refreshing the project tree). Like so often with Eclipse, this is a long-standing bug (10 years in this case) which still applies to the current version (4.6 Neon at the time of writing).
The safe way:
Create a working set including only those entities you want searched and search only within that working set. See Dave Ray's answer for details on this procedure.
Source: stackoverflow.com
Related Query
- Exclude folders from Eclipse search
- How can I exclude some folders from my Eclipse project?
- Exclude target folder from search results in Eclipse
- Exclude a folder name from Eclipse file search
- Eclipse - exclude files from resource search by name
- Exclude folders from eclipse - Open resources
- How to exclude specific folders or files from validation in Eclipse?
- How to exclude a Javascript file from Javascript Validation in Eclipse
- How to exclude .svn directories from search in Eclipse?
- Is there way to expand all folders in Eclipse project view and search results?
- Exclude directories & subdirectories from validation in Eclipse
- Why is Eclipse trying to copy my .svn folders from src to bin, and how can I make it stop?
- Completely exclude certain directories from Eclipse CDT project
- How to exclude files from Eclipse indexing (Static Code Analysis)?
- eclipse c++ exclude multiple files from build at once?
- which eclipse files to exclude from subversion repo
- exclude files from jar or war in eclipse
- Exclude JUnit from Eclipse exported JAR
- Only show warnings from some folders in eclipse
- Android exclude file from build in eclipse
- Eclipse exclude php files from validation but not build
- Eclipse - Exclude root directory from git repository?
- Why does m2eclipse exclude resources from Eclipse build path?
- How Exclude some files from Eclipse Java EE Web Application project Deployment Assembly
- How to exclude a source file from being build in eclipse (C++)?
- Need to exclude a dependency from eclipse using a gradle build file
- Does git exclude eclipse project files from a new repo by default?
- Exclude files from Eclipse Indexing that are included in the build
- How to exclude .class files from file search in Eclipse?
- In Eclipse PyDev is there a way to exclude arbitrary file-types from the Pydev Package explorer?
More Query from same tag
- How to bundle Webkit into Eclipse?
- Fail to start MobileFirst development server
- Window Builder in Eclipse (JAVA) Won't Load
- GitHub for Windows push/pull, results in Eclipse infinite refresh loop
- Is there some commit reminder for Subversion/etc for Eclipse?
- Ecilpse Oxygen.3a Java IDE cannot add window GUI via window builder error opening wizard
- Eclipse Debugger: Threads vs "Daemon" Threads
- How to make selenium RC tests run in multiple browsers (using java & eclipse & selenium grid)
- Multiple sql statments (execute all) with eclipse data tools
- Customize treeview items in package explorer in eclipse
- Eclipse and Scala-IDE source files encoding bug?
- Why my Swing based GUI application is not responding?
- Programmes won't run on Ubuntu 12.04 and Windows XP
- How to force a refresh on the Project Explorer view?
- checkstyle doesn't work on linux eclipse luna
- Can I call an ant script from another ant script? What have I to do?
- Expression Language skip identifier check in tomcat 7
- how to add jpanel to jpanel in java
- Java import org.eclipse.core.runtime.jobs.Job; does not sleep
- How to read input text ? Java
- Two instances of eclipse opening each time
- Replace a word with another in Eclipse
- Cannot add API properly in eclipse
- How to import a non-Zend PHP project into Zend Studio without copying files?
- Failed to load the JNI shared Library (JDK)
- How to add classes folder in web-inf in eclipse
- how to replace my local copy with Remote copy?
- Ant build file cannot find mysql program
- What does this Android Runtime logCat error mean?
- Eclipse always wants code to be in com\folder instead of com.folder