Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Orion Plugin for Flux

1) There is work underway to allow filesystems to publish events that a client can listen for instead of polling. See this bug for a brief description: https://bugs.eclipse.org/bugs/show_bug.cgi?id=437277.

2) For collab editing, it sounds like you want a long-lived channel that would be able to dump text deltas into the editor at any time. This will probably need new API. As you noted, the Editor Context object was designed to become unusable after the lifetime of a single service call, in order to preserve the typical communication pattern we have in Orion (= Orion always begins the conversation with the plugin).

There are 2 ways
I can think of doing this:

i) Relax Orion's communication pattern, for example by allowing plugins to publish events whenever they want.
ii) Provide a dedicated extension point for real-time editing. For example the extension might simply provide a method

startSession(editorContext, filename)

…which Orion invokes when the editing session begins. The extension's implementation of startSession() could simply return a Deferred right away, but leave it unfulfilled. This would keep the Editor Context active for the duration of the editing session, and it could be used at any time to blast text changes into the editor.

Regards,
Mark



On Thu, Jun 12, 2014 at 1:55 PM, Alex Boyko <aboyko@xxxxxxxxxxxxx> wrote:
Hi all,

I’m working on an Orion plugin that would integrate Flux into Orion. One of the Flux features is collaborative, live editing (Google-docs like) based on message exchange between distributed editors (Orion editor and Eclipse editor in my case). Same goes for file system artifacts such as files, folders and projects. They are being changed collaboratively in a similar fashion based on message exchange between flux server and its subscribers such as Orion and Eclipse. See more details on Flux here: http://projects.eclipse.org/proposals/flight

I have used the following orion extension points to integrate Flux:
  • orion.core.file
  • orion.edit.model
  • orion.edit.validator
  • orion.edit.contentAssist

Mounted Flux file system based on Flux contents using the “orion.core.file” extension. Generally, I had no problems sending necessary messages out from Orion for file system artifacts being created/deleted/changed/fetched. It is unclear how to react to changes in Flux files system made in Eclipse for example. A new file has been created in Eclipse, I do receive a message on the Orion side that a file has been created, however, it’s unclear how to inject it into Orion UI (the navigator) at this point. Orion page refresh obviously helps since it reloads the contents of the workspace, but would be really nice if we could just inject this change into the Orion’s UI somehow. Is there any way to inject filesystem changes happening at random times into the Orion’s UI? Is there any kind of event listening system I could hook into?

Tried to use orion.edit.model and orion.edit.validator to implement collaborative editing. I have tried to use Editor Context (reference to Orion’s editor object) object to sync changes made in Eclipse into Orion editor, but Editor Context object life span is too short. For example I get a reference to Editor Context from #computeProblems(…) function (called via orion.edit.validator extension) and store/cache it. Now, when I get a message that something has been typed in the editor for the same resource in Eclipse (e.g. character ’s’ has been typed at position 0) I’m trying to update the text in the Orion editor for this change. I call setText(…) on my stored/cached Editor Context object, but this call fails. It fails because Editor Context object only lives until the deferred returned in #computeProblems(…) is resolved/rejected.
Is there a way to keep the Editor Context after the service request has been fulfilled? Anything else you might suggest to make collaborative editing work for me?
This is the general problem I’m having with Orion. Orion will call us when it needs us, but we can’t do anything with Orion when we need it :-)
Thanks in advance.

Cheers,
Alex

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top