tags:

views:

33

answers:

1

It is so weird that everytime I want to search for a particular keyword in java files, my eclipse will look through all the java files and all the library rar. As a result, the search running time is very long since there are a lot of .rar files in my project.

I aware that this problem never happen to the same java project before, just because I did some changes in class path.

Any one got similar experience. Please advise me, thanks.

A: 

If you do a File search, you can specify the scope of your search.

alt text

Choosing "enclosing project" can help minimizing the number of files searched, limiting it to your files.

As mentioned in the comments, two extra steps can be required to ensure the set of files actually searched remains small:

  • specify '*.java' (which you can do in a 'File Search'),
  • make sure also that "Consider derived resources" is not selected.
VonC
thanks. I tried but Eclipse still go through all the jar files apart from java files. As I described before. This problem happens coz I cleaned the old project and import it again. Then the class path is somehow not properly set up.
aladine
@aladine: if you specify '`*.java`' (which you can do in a 'File Search'), it shouldn't go to any of those extra files. Make sure also that "Consider derived resources" is *not* selected.
VonC