Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366779

Summary: scope search from editor
Product: [ECD] Orion Reporter: Susan McCourt <susan>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, john.arthorne, libingw
Version: 0.3   
Target Milestone: 0.4 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Susan McCourt CLA 2011-12-15 00:18:01 EST
Now that I've gotten used to a scoped search, I'm always surprised when it's not scoped when I type into the search box on the editor page.  I think the most common thing would be to scope it from the top level folder (project).  I think it's less common that you would be working in a file and want to do a root search from that file.
Comment 1 libing wang CLA 2011-12-15 09:49:10 EST
Yes.
More generically, we may want this kind of scope to be valid on any page that has a "clue"/bread crumb where we are.
We should also make the scope consistent for file name search. John, I think server supports location on name search but please correct me if otherwise.

Also, as we are talking about search in the editor now, I would like opinions on "CTRL+H". It gives a quick overlay of result  and you can switch to different files but I am always lost after several clicks. I have to navigate multiple times back to my original file. Not sure if we should just open another tab for the result page.
Comment 2 Felipe Heidrich CLA 2011-12-15 12:40:19 EST
search in the editor:
ctrl J - incremental
ctrl F - find
ctrl H - file search

I particularly don't like the UI for ctrl+H, it is not consistent with the Ctrl F and Ctrl J.
The file search in the editor page is not consistent with the file search in the navigator page (in the navigator page there is no Ctlr H, dialog, and overlay list).

Note also that Ctrl+H hides the browser show history shortcut.

I also have a hard time to remember how to get the list of shortcuts:
ctrl+shift+l -> editor
shift+? -> navigator
other pages?
It would be nice to make that consistent across our pages
(should I open a separate bug ?)
Comment 3 Felipe Heidrich CLA 2011-12-15 12:42:25 EST
(In reply to comment #2)
> I also have a hard time to remember how to get the list of shortcuts:
> ctrl+shift+l -> editor
> shift+? -> navigator
> other pages?
> It would be nice to make that consistent across our pages
> (should I open a separate bug ?)

done Bug 366845.
Comment 4 Susan McCourt CLA 2012-02-06 18:57:56 EST
it would be great to fix this for 0.4.
I still think scoping to the project is the best idea, but if that proves difficult, scoping to the parent folder at least puts us in a search results page that will then let us move upward.
Comment 5 libing wang CLA 2012-02-07 11:02:23 EST
(In reply to comment #4)
> it would be great to fix this for 0.4.
> I still think scoping to the project is the best idea, but if that proves
> difficult, scoping to the parent folder at least puts us in a search results
> page that will then let us move upward.

I will try to make it for RC1 on project level.
Ideally search should be scoped where ever there is a breadcrumb. And when the bread crumb is generate, the create should "flag" which segment is the search scope. Otherwise the tail segment will always the scope.
Comment 6 Susan McCourt CLA 2012-02-07 11:14:12 EST
(In reply to comment #5)
> I will try to make it for RC1 on project level.
> Ideally search should be scoped where ever there is a breadcrumb. And when the
> bread crumb is generate, the create should "flag" which segment is the search
> scope. Otherwise the tail segment will always the scope.

agree.  I've got that covered in bug 349531.
Ideally what happens (in 0.5) is a page uses API like

setPageTarget(itemMetadata, breadcrumb href function, etc....)

and then what happens is:
- correct breadcrumb is generated
- "related pages" menu is generated
- search is scoped
- etc...
Comment 7 libing wang CLA 2012-02-07 11:31:30 EST
(In reply to comment #6)
> (In reply to comment #5)
> > I will try to make it for RC1 on project level.
> > Ideally search should be scoped where ever there is a breadcrumb. And when the
> > bread crumb is generate, the create should "flag" which segment is the search
> > scope. Otherwise the tail segment will always the scope.
> 
> agree.  I've got that covered in bug 349531.
> Ideally what happens (in 0.5) is a page uses API like
> 
> setPageTarget(itemMetadata, breadcrumb href function, etc....)
> 
> and then what happens is:
> - correct breadcrumb is generated
> - "related pages" menu is generated
> - search is scoped
> - etc...

Cool.
Comment 8 libing wang CLA 2012-02-07 13:43:25 EST
Fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=54aef56093354ece9b7a6830122a5ba6f08aa90d.

Scoping to the parent folder is actually better because you get faster response at first shot. Once in the search page you can just scope up by another click on the bread crumb.

I also change the default hint "Search root" to "Search".
If you are in a page with bread crumb(navigator, git log, editor and search for now)and file system root is presented, the hint will show "Search {file serverce name}". E.g. "Search Orion Projects".

For all the other pages we should also hint"Search {file serverce name}" but we will fix that in common code in 0.5. I will open a bug on that.
Comment 9 libing wang CLA 2012-02-07 13:49:42 EST
(In reply to comment #8)

> For all the other pages we should also hint"Search {file serverce name}" but we
> will fix that in common code in 0.5. I will open a bug on that.

Opened Bug 370872.