Community
Participate
Working Groups
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.
Created attachment 204903 [details] content.json
Created attachment 204904 [details] content.html
Created attachment 204905 [details] crash results
Created attachment 204906 [details] State of the Navigator just before the crash
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.
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.