Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search file in only one project in Eclipse

Is there a way how to search a file or class (I mean by Ctrl + Shift + T or R) only in some particular project and not in all workspace?I have Eclipse Indigo.

like image 550
Petr Mensik Avatar asked Aug 23 '12 13:08

Petr Mensik


People also ask

How do I search a single project in Eclipse?

The Eclipse search dialog box allows you to search for files that contain a literal or a character pattern in the entire workspace, a set of projects, a specific project or folders selects in the package explorer view. Clicking on the Search menu and selecting Search or File or Java. Clicking Ctrl + H.

How do I search multiple files in Eclipse?

CTRL + SHIFT + R –> used to search all types of files (Open Resource) CTRL + H –> opens dialog box which provides number of options (Search)


3 Answers

Select the project in project explorer -> Ctrl + H -> File Search Tab -> enter file name in containing text -> Check Selected Resources under Scope.

One more trick -> if you want to search only from *.java files then in File name patterns text box in the same File Search Tab enter *.java or *.props. This will filter out for you

like image 43
Srujan Kumar Gulla Avatar answered Oct 21 '22 05:10

Srujan Kumar Gulla


On Menu of Ctrl + Shift + T or R dialogue Small down arrow on extreme right use option Select Working Set then set the working set and you are done now you can only search files from selected working set.

Ctrl + Shift + T Or R
>Menu
 >Select Working Set
  >New
   >Java
     >Add Or Add All
      >Click on Selected Working set in Select Working set Dialog
        >Select Working set and you are done. 
like image 184
Amit Deshpande Avatar answered Oct 21 '22 04:10

Amit Deshpande


Click on file search select enclosing projects under the subcategory 'scope'. this will enable you to search inside a specific project

like image 37
Gautam Avatar answered Oct 21 '22 04:10

Gautam