Search file in only one project in Eclipse
Asked Answered
F

4

10

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.

Ftlb answered 23/8, 2012 at 13:13 Comment(1)
use the file search. There you can select where you want to search and whatFrightfully
P
10

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. 
Putrefaction answered 23/8, 2012 at 13:29 Comment(5)
This is close but in my working set are like 12 projects (is a big Java EE app) so that won't help meFtlb
You can create multiple working sets and each working set can have 1 to n number of projects. So if you only want to search 1 project create working set of only 1 projectPutrefaction
I've never seen or heard anyone having n working sets for n projects. Not to say that this would completely ruin their intended purpose.Pontormo
Ok, this can me misunderstanding, by projects I ment pack of JAR and WAR files which creates Java EE app (in EAR file which is part of the workset too).Ftlb
@MarkoTopolnik Yes. As the name suggests it is a set so it can be group of one or more. In his scenario It is perfectly fine to create a working set for this. Example was just to explain capablities of it. :)Putrefaction
S
1

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

Stormproof answered 23/8, 2012 at 13:23 Comment(0)
O
1

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

Olin answered 16/6, 2015 at 18:10 Comment(0)
B
0

For that you have the Search menu. You could use Search > File or Search > Java for that. In the search dialog, you can restrict the search scope as only the selected project, or as a predefined working set, as long as some additional options.

Burgwell answered 23/8, 2012 at 13:18 Comment(1)
I know about this option but is not so convinient as searching through Ctrl+Shift+H so this is not the solution I am looking for. But maybe there is now way how to narrow the search except the workign setsFtlb

© 2022 - 2024 — McMap. All rights reserved.