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

Bug 366700

Summary: [plugins] Relative paths returned from plug-ins make it impossible to handle plug-ins from multiple locations
Product: [ECD] Orion Reporter: Malgorzata Janczarska <malgorzata.tomczyk>
Component: ClientAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: simon_kaegi, Szymon.Brandys
Version: 0.3   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Malgorzata Janczarska CLA 2011-12-14 09:32:04 EST
Installing two fileClientPlugin.html from different servers will not be handled well. The same problem has recently implemented taskPlugin.html.
File client uses Location to determine which filePlugin should it use based on "pattern" property of the plug-in, but since we use relative paths "pattern" is always "/". If we have plug-ins from different hosts there is not way to match them with only one of the patterns.
Comment 1 Simon Kaegi CLA 2011-12-14 13:30:31 EST
When the fileclient plugin registers it's pattern it makes it parent relative so this should be handled already. You might try the same trick in the taskplugin.
Comment 2 Malgorzata Janczarska CLA 2011-12-15 04:28:20 EST
(In reply to comment #1)
> When the fileclient plugin registers it's pattern it makes it parent relative so
> this should be handled already. You might try the same trick in the taskplugin.
I think I was wrong about the original problem. Both taskplugin and fileplugin pattern is OK, the problem is that all Locations in json representations are not relative to Orion, but to the plug-in. I made a simple experiment and added two file plugins to my Orion: one local and the other one from a different server. I can display workspace from the remote plug-in using full path, but I can't go any further:
* creating new project in the workspace from remote plug-in will create a new project using local plug-in in my other workspace
* going into any project in this workspace will redirect me to the project in the workspace from local plug-in (if, accidently project with the same relative address exists) or just display 404

Generally Orion uses the paths from jsonObjects to make operations and if they are relative they are matched with the local plug-in instead of the remote one.
Comment 3 Simon Kaegi CLA 2013-01-30 10:16:39 EST
We handle this situation for the Orion file system plugins (since M1) however we might not for some other plugins. In general we can only return relative paths if we know the hosting page is co-located otherwise a plugin should always use absolute URLs.
I'm closing this bug however we should open specific bugs for each case where we find that we for example cannot use plugins hosted on orionhub.org from orion.eclipse.org