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

Bug 387624

Summary: Because of the default File Client it is impossible to provide custom implementation for orion.core.file service
Product: [ECD] Orion Reporter: Anton Smyrnov <as8g10>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: john.arthorne, mblout, simon_kaegi
Version: 1.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Anton Smyrnov CLA 2012-08-20 11:45:27 EDT
When registering orion.core.file service, the "pattern" parameter is used to specify the filepaths that will be used to find the appropriate file service. Because the default File Client implementation specifies pattern as "/" it matches any file and because it is always pushed into the array of orion.core.file implementations in serviceregistry.js as the first element on every page load it will always be used for any file operation (copy, rename, new file, delete etc) available from the top menu in the navigator as the "getServiceIndex" method loops through the array and returns the first service whose pattern matches the file location. Also, it is impossible to remove the default File Client as it is installed on every page load. Therefore, any custom service implementation will never be called making it unusable.
Comment 1 Simon Kaegi CLA 2012-08-20 17:15:45 EDT
The "/" is interpreted relative to the host page embedding it so for example on orionhub.org -- "/files" effectively means any urls under http[s]://orionhub.org/files.

If you want to see a trivial example of another file service go to the plugins page and install /plugins/HTML5LocalFilePlugin.html (This requires Google Chrome)

What you should then see in the main navigator at the top left is a second file system you can navigate into and "create" and "edit" files.
Comment 2 Michael Blout CLA 2013-06-10 23:42:17 EDT
I'm seeing this in V3 MR2 as well - was able to install an example file service, but it is never found by getServiceIndex.
Comment 3 John Arthorne CLA 2015-05-05 14:41:54 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see:

https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html