Skip to main content

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

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

Back to the top