Bug 564678

Summary: Search: second search only in workspace
Product: [Eclipse Project] Platform Reporter: arne anka <eclipse-bugs>
Component: SearchAssignee: Platform-Search-Inbox <platform-search-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: rolf.theunissen
Version: 4.15   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
search 1: all scopes available
none
search 2: nothing changed, but suddenly only scopes worksapce/working set none

Description arne anka CLA 2020-06-26 04:54:41 EDT
Created attachment 283418 [details]
search 1: all scopes available

- Select package in Package Explorer
- open Search -> File
- enter search term
- select Scope -> "(*) Selected resources"

after search
- open Search -> File
- now suddenly only Scope -> "() Workspace" is available

Nothing changed 
- there's still the selection in Package Explorer
- there's still an active editor of a project (in fact, all editorsd are from one single project)

I expect the Search dialog to always allow me to select from all scopes and I don't see any viable reason why that should not be the case:
- as far as I can tell, it is impossible to never have a selected resource (which means a project to search in)
- in case there are editors from more than one project active it is very sinmple to ask what project should be used (or simply search in all projects)
Comment 1 arne anka CLA 2020-06-26 04:55:36 EDT
Created attachment 283419 [details]
search 2: nothing changed, but suddenly only scopes worksapce/working set
Comment 2 Rolf Theunissen CLA 2020-06-26 06:10:33 EDT
What is changed is the focus in the IDE. When you first do the search, the Package Explorer is the active part in the workbench. When the search returns the search view is the active part in the workbench.

The search dialog takes the active selection from the active part in the workspace.

That said, the behavior can be confusing, maybe the active selection in the Package Explorer or Project Explorer should be taken always or should be available as an option.