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

Bug 419178

Summary: Multiple file systems: Add ability to switch to file systems in the search page.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: grant_gayed, mamacdon, simon_kaegi
Version: 4.0Flags: mamacdon: review+
simon_kaegi: review+
Target Milestone: 4.0 RC3   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 419153, 419154    
Bug Blocks:    
Attachments:
Description Flags
Fix patch none

Description libing wang CLA 2013-10-10 15:23:41 EDT
In bug Bug 419154, I've fixed the issue by:
1. In the pagelinksPlugin.js, use {location} as the urlTemplate parameter for search.html
2. Added additional boolean "useRootLocation" property so that when the search page link is expanded, it always uses the root of the location. This will allow the search.html always use the current file system root instead of a narrower scope.

But as all the page links are generated at page loading, we need to update the search link (or further, any other page links that are similar to search page). Otherwise the search page link will be stale.
Comment 1 libing wang CLA 2013-10-15 13:58:28 EDT
Created attachment 236498 [details]
Fix patch
Comment 2 libing wang CLA 2013-10-15 14:09:13 EDT
Currently, both search and shell page need "Location" param in the URITemplate when page links are generated.
The Shell page needs the "Location" to calculate the project folder on the current location, so we need to update the page link when the page target is changed in the edit page.
Similar thing for search page. We need the "Location" to calculate the root of the file system. It is a little overkill for search page as in theory we only need to do it when file system changes. But it does not really hurt because the search page knows it has to always use root location.

I will remove the "scope search" from the related link menu when the fix is approved.
But if a user really wants a "faster" scope search, he can always use the file commands on a selected folder.
Comment 3 Mark Macdonald CLA 2013-10-16 17:10:46 EDT
The patch regenerates orion.page.link contributions when the page's resource changes. I'm ok with this as a temporary solution for 4.0.
Comment 4 libing wang CLA 2013-10-18 11:26:15 EDT
After Simon's review on the first proposed fix, we decided to add ability to switch the file systems inside the search page.
The second proposed fix is in remote branch bug419178.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=02011d7bacd5bd725e54c9ef9ab6fbcea2129850
Comment 5 libing wang CLA 2013-10-18 11:29:42 EDT
I've also remove the useRootLocation param in the search page.
To verify that you have to reload the plugins.
Comment 6 Mark Macdonald CLA 2013-10-18 13:55:36 EDT
OK
Comment 7 libing wang CLA 2013-10-18 14:17:19 EDT
Talked to Simon on same time. He +ed.
Pushed the fix into master.