tags:

views:

48

answers:

3

how can I search something in all files in a given folder in eclipse also how can I search up, it's seems like only going down the document

sometimes I am working on single files, so there is no project defined. I know about the search in project feature

+1  A: 

If you go to Search>Files... you'll have an advanced search dialogue where you amongst others can specify the scope to search in (all of the workspace, selected resources only etc.). Is this what you're looking for?

And also, if searching through a single file (+), you have the standard search dialogue where you can specify search direction to either forward or backward.

Nailuj
but still there is no where to set a folder to be searched recursively
Maysam
@Maysam: yes, there is. If you select (just mark it with your mouse) e.g. a folder (or a package or whatever), and then go to Search>Files and select the scope "Selected resources", it will only search the folder you have selected.
Nailuj
A: 
  • Search forward in file: Edit -> Incremental Find Next
  • Search backward in file: Edit -> Incremental Find Previous
  • Search in multiple files: Search -> File -> Containing Text.
  • Search files in a specific subdirectory: Select the sub-directory -> Search -> File -> Scope: Selected resources.

I reccomend that you learn the short-cuts for these tasks. (Key-combination is found right beside the menu-item.)

aioobe
but still there is no where to set a folder to be searched recursively
Maysam
See update.....
aioobe
A: 

If you want search in a particular file then just press ctr+F and type whatever you want to search in that current file.

Rupeshit