Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

searching in eclipse

Tags:

search

eclipse

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

like image 381
Maysam Torabi Avatar asked Jun 04 '10 08:06

Maysam Torabi


People also ask

How do I search for a word in eclipse?

Ctrl + Alt + G can be used to find selected text across a workspace in eclipse. Show activity on this post. Press Ctrl + H to bring up the search that includes options to search via project, directory, etc.

How do I search for a class in eclipse?

To get there, we go to the menu under Navigate > Open Type in Hierarchy or we use the shortcut: Ctrl + Shift + H on a PC or Cmd + Shift + H on a Mac. This dialog is similar to the Open Type dialog. Except for this time when we click on a class, then we get the Type Hierarchy view.


2 Answers

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.

like image 80
Julian Avatar answered Oct 03 '22 21:10

Julian


  • 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.)

like image 38
aioobe Avatar answered Oct 03 '22 19:10

aioobe