Bug 279741 - Search dialog should remember the previous active search type
Summary: Search dialog should remember the previous active search type
Status: RESOLVED DUPLICATE of bug 33710
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Search-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-10 02:09 EDT by Raksha Vasisht CLA
Modified: 2009-06-11 02:47 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 Raksha Vasisht CLA 2009-06-10 02:09:07 EDT
Build ID:  I20090605-1444

Steps To Reproduce:
When I do a Java search, close the dialog  and then again try to open it , then the dialog remembers the previous search type only if it was a successful one. If no matches were found in the previous search, it opens 'File search' by default. What I would prefer is to remember the previous search in any case, since most of the times I would like to either change some parameter and run the same Java search again. I find it inconvenient to switch between the search types every time I have to run back to back searches.  

More information:
Comment 1 Markus Keller CLA 2009-06-10 07:14:22 EDT
> the dialog remembers the previous search type only if it was a successful one.

That's not the full story. The default Search dialog tab depends on the current *selection*. If there's no result, the selection is empty and the default is File Search.

But even if there's a result, the Search dialog still doesn't open in the same state as the last time, because the selection is usually different.

I think we should
- keep the selection-dependency of the Search command
- when the selection is empty, reopen the last search (initialize dialog with the last selection and other user-configured search parameters)
- add a button to the Search view to reopen the last search

AFAICS, most of the infrastructure for this is already available (e.g. ISearchQuery already stores all the input for a search). The only missing links are
- the mapping from ISearchQuery to ISearchPage, and
- a way to initialize an ISearchPage from an ISearchQuery.

See also bug 33710 (and bug 213119 and bug 169252).
Comment 2 Dani Megert CLA 2009-06-11 02:47:54 EDT
>I think we should
>- keep the selection-dependency of the Search command
Agree.

>- when the selection is empty, reopen the last search (initialize dialog with
>the last selection and other user-configured search parameters)
Disagree. We should keep the current behavior that people got used to over so many years.

>- add a button to the Search view to reopen the last search
Yep, see bug 199990.


*** This bug has been marked as a duplicate of bug 33710 ***