Bug 236475 - Set scope to resulting resource of last search
Summary: Set scope to resulting resource of last search
Status: ASSIGNED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-10 13:40 EDT by Christopher Barber CLA
Modified: 2019-09-06 16:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Barber CLA 2008-06-10 13:40:52 EDT
It would be useful when searching large projects if there was a way to narrow or refine search results by restricting a search to only look at files that were returned by a previous search.
Comment 1 Martin Aeschlimann CLA 2008-06-11 03:30:59 EDT
You can select all resources from the result view and do a new search with scope 'Selected Resources'.

Selecting all resources is easiest when the result is shown as list.

Would that work for you?
Comment 2 Christopher Barber CLA 2008-06-11 10:01:50 EDT
Using "Selected Resources" is better than nothing, but it still non-obvious and requires a lot of gestures to accomplish. 

I want to see details of matches in the Search view, so I have to use tree view to do that (at least as of 3.4 RC4), so to narrow my search I have to either manually click on every resource (Ctrl-A doesn't seem to do the right thing) or switch to list view before selecting and then back again, and then bring up the search dialog and click on Selected resources. I would greatly prefer if there was a single command accessible from the Search view to do all of that.

If you don't add a command, you should at least document the currently supported approach in the Workbench help so that users don't have to figure it out for themselves.
Comment 3 Martin Aeschlimann CLA 2008-06-12 04:33:20 EDT
I know this is just a workaround. It's not yet clear to me how the real feature would look like. We also see how widely asked this feature is and would justify extra controls.
Comment 4 Christopher Barber CLA 2008-06-12 10:07:37 EDT
I don't think you necessarily need a new control. 

A new command available from the Search view's menus would probably be sufficient. Call it "Refine Search..." and have it select all resources found by the previous search (and deselect any other resources) and bring up the search dialog with the same state as the previous search but the scope set to "Selected resources". Optionally, you could also add a "Refine..." button on the Search dialog that does the same thing.

Another approach would be to define a new search scope that consists of the resources returned from the last search. You could call it something like "Last search". A refine command would still be a useful shortcut but it would only bring up the search dialog with the scope set to "Last search". Even better would be if the dialog could remember the sets of resources returned by the n previous searches and choose from among them using a drop-down list.

Either of these approaches would be fine with me.

I don't know how many people will go to the trouble of requesting this feature but search refinement is a common activity when working with large projects.

Comment 5 Eclipse Webmaster CLA 2019-09-06 16:06:38 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.