Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360482 - Orion does not render content from a remote location
Summary: Orion does not render content from a remote location
Status: RESOLVED INVALID
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 16:06 EDT by Pradyut Sarma CLA
Modified: 2011-10-11 00:25 EDT (History)
1 user (show)

See Also:


Attachments
content.json (204 bytes, application/octet-stream)
2011-10-10 16:07 EDT, Pradyut Sarma CLA
no flags Details
content.html (1.06 KB, text/html)
2011-10-10 16:07 EDT, Pradyut Sarma CLA
no flags Details
crash results (45.31 KB, image/png)
2011-10-10 16:08 EDT, Pradyut Sarma CLA
no flags Details
State of the Navigator just before the crash (51.36 KB, image/png)
2011-10-10 16:09 EDT, Pradyut Sarma CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pradyut Sarma CLA 2011-10-10 16:06:28 EDT
Hi,

Hi,

I have created a orion plugin (content.html attached with the ticket) which contributes some content to the Navigator via the extension point "orion.core.file". The content consists of a folder called "Depots" which basically contains some java files not present in the orion workspace but streamed from the location specified within the content.json (attached here) file. 

On clicking of this file, it is expected that the client fires a GET request to the specified location, gets a response of type "text/plain" and renders it within the orion editor. The location currently points to a servlet which returns the source in the java file. The plan is to use a similar mechanism to render other custom artifacts, which also include java artifacts.

But on actually clicking the file, the editor crashes. The snapshot is also attached with the ticket along with the JS console with the error. Am I missing something here?

Is the Orion editor equipped to render content within the orion workspace only?

Thanks and Regards,
Pradyut.
Comment 1 Pradyut Sarma CLA 2011-10-10 16:07:01 EDT
Created attachment 204903 [details]
content.json
Comment 2 Pradyut Sarma CLA 2011-10-10 16:07:22 EDT
Created attachment 204904 [details]
content.html
Comment 3 Pradyut Sarma CLA 2011-10-10 16:08:16 EDT
Created attachment 204905 [details]
crash results
Comment 4 Pradyut Sarma CLA 2011-10-10 16:09:01 EDT
Created attachment 204906 [details]
State of the Navigator just before the crash
Comment 5 Simon Kaegi CLA 2011-10-10 23:57:59 EDT
Hi Pradyut,

This is not a bug in the editor. The problem is that you've provided an incomplete implementation of "orion.core.file" service. In particular you're missing an implementation for read.

The Orion client does not do XHRs itself to GET the content - that's the responsibility of the service implementation in the plugin. The reason that is the case is that because of the browsers single origin policy we would be restricting the location of content one server or else relying on something like CORS. Another problem is that we would be making an assumption on the implementation that is not universal. For example, I'm working on an implementation that uses the HTML5 FileSystem for offline.

I'd suggest taking a look at plugins/filePlugin/webdavImpl.js in orion.client.core to fill in a more complete implementation.
Comment 6 Pradyut Sarma CLA 2011-10-11 00:25:17 EDT
Hey Simon,

Thanks for the tip. I will check this out immediately.

Thanks and Regards,
Pradyut.

(In reply to comment #5)
> Hi Pradyut,
> 
> This is not a bug in the editor. The problem is that you've provided an
> incomplete implementation of "orion.core.file" service. In particular you're
> missing an implementation for read.
> 
> The Orion client does not do XHRs itself to GET the content - that's the
> responsibility of the service implementation in the plugin. The reason that is
> the case is that because of the browsers single origin policy we would be
> restricting the location of content one server or else relying on something
> like CORS. Another problem is that we would be making an assumption on the
> implementation that is not universal. For example, I'm working on an
> implementation that uses the HTML5 FileSystem for offline.
> 
> I'd suggest taking a look at plugins/filePlugin/webdavImpl.js in
> orion.client.core to fill in a more complete implementation.