7

"Long live the Unix Pipes".

Since I am working with Eclipse IDE, I would like to perform search within search results. Is that possible? How can I do that?

Ex:

Search for references of User (class). 
  > Search for validation in this result. 
    > Finally, search for specific pattern.
rdllopes
  • 4,897
  • 4
  • 19
  • 36

3 Answers3

7

This is possible in Eclipse, well as far as the version I am using which is Eclipse Juno 4.2.2; I've used this extensively for impact analysis.

For example:

  1. Search using "File Search" with criteria "employee" enter image description here
  2. The results will appear in the Tab "Search", assuming you are in the tree view (by default), click the root folder enter image description here
  3. Again, use the "File Search" this time using the 2nd criteria, for example "default" and making sure to click the Selected resources radio button enter image description here

Effectively, this searches the keyword "default" from the previous search results produced by searching "employee".

Carlos Jaime C. De Leon
  • 2,476
  • 2
  • 37
  • 53
1

Is it really required?. If you are searching any key in the search results then why don't you use it as search key in previous search itself?.

Eclipse search supports regular expression so you can use multiple search words likes key1 or key2 or key1 and key2 etc to narrow the search results.

Refer this Eclipse File Search Dialog - Regular Expression for Group Unions and Negation


However

You can search in search results with the help of some plugins check here. Take a look at Insta search and glance(Suites for your need) plugin.

Search result can also be exported with the help of this plugin

Community
  • 1
  • 1
Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68
  • "Its not required. Its redundant" - I don't think so. Unless, search for reference is redundant since Eclipse already provides search for Regexp. – rdllopes May 14 '14 at 11:48
  • 1
    Hmm Its person based opinion. Any way corrected my post. – Chandrayya G K May 14 '14 at 11:51
  • I don't like the idea to use a big regexp to find references (for example, "user" word is used in lot of different files in javadocs, so I have to specify the "import session"): (?s)\A.*?import mycompany.domain.entity.User.*word2. But, anyway: your solution works pretty well. – rdllopes May 14 '14 at 12:21
  • Thank you!. So then you used glance plugin? Note that it works if all search results are in expanded state. Expand search results before searching. – Chandrayya G K May 14 '14 at 12:34
  • Both plugins and regexp... I think the other plugin, Instasearch, works better for my case because is more natural search using Lucene capabilities. – rdllopes May 15 '14 at 07:46
-2

You cannot. And I am 99% sure of this. But, just for your info, you can do reference search by pressing Cntrl + G on class name, or method name.

vipin.huddar
  • 91
  • 1
  • 1
  • 6
  • Actually Ctrl + Shift + G. (if you are right about Eclipse so that is sad). (I should not do that but thank you anyway). – rdllopes May 14 '14 at 10:01