searching in eclipse

40,950

Solution 1

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.

Solution 2

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

Solution 3

When you are searching "Java Resources" with "File Search" with "Selected resources" checkbox checked - you will not get any results.

To search recursively a chosen folder for any files:

  1. Select folder (it has to be folder)

enter image description here

  1. Select FileSearch with "Selected resources" checked.

enter image description here

Good luck

Solution 4

Use the Remote Search Feature. Here you can browse for local folders. Some stupid name...

Solution 5

If default eclipse search is not sufficient for your needs, eclipse instasearch plugin is a very useful plugin for search needs inside eclipse.

It is based on lucene. This is also available in eclipse marketplace. It has extensive feature set.

  • Instantly shows search results
  • Shows a preview using relevant lines
  • Periodically updates the index
  • Matches partial words (e.g. case in CamelCase)
  • Opens and highlights matches in files
  • Searches JAR source attachments
  • Supports filtering by extension/project/working set
Share:
40,950
Maysam Torabi
Author by

Maysam Torabi

• I would like to create great software, for science and commerce • I am a person who can come up with many ideas and likes to design and create products. When working on a project, I can always create ways to extend the project to better end. I like to create new tools and products to reach perfection with special meticulosity. Unfortunately I cannot cut corners. • I like engaging with user experience, testing and analyzing software, ensuring the client having the perfect experience engaging the system. • I am very keen on new ideas and like to research latest trends regularly.

Updated on March 26, 2020

Comments

  • Maysam Torabi
    Maysam Torabi about 4 years

    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