Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Plugin -> editor actions

On 7/6/2011 3:17 PM, Simon Kaegi wrote:

The plugin model does not permit a plugin from directly calling anything in the main window but there is indeed an event mechanism that we can use where the event listener residing in the main page could call a particular function based on the service. What we need is for the editor page to register interest in a service that your plugin provides and in addition listens to the service for events. So, for example if we had something like a "content.updater" service that edit.html was aware of and listened to for events then your plugin could register the service and fire content updated event and we could react to the event and update the content.

Thanks, I started down this path, just assuming that I could reverse the editor-plugin roles. That is I have the editor issue |registerServiceProvider| under name "content.updater" and when it gets called it operates on the edit model.

Then on the plugin side I would lookup the "content.updater" service providers and wrap the provider in an object I can call to fire events at the editor.

Of course I have no idea if this makes sense. I can't figure out how to get a serviceRegistry in the plugin space. Then looking at the code it seems to me that you are using the parent/child relationship between the editor and the plugin. So the messaging isn't symmetric and that makes me think I'm on the wrong track as well.

On the other hand there does seem to be a postMessage running up from the plugin iframes to the editor.  I'll look into that.

jjb

-Simon

(p.s. John have to split now but will be on again in a bit if you want to ping me on IRC or IM)

Inactive hide details for "John J. Barton"
          ---07/06/2011 05:44:01 PM---I have my Firebug to Orion sending
          edit updates to Fireb"John J. Barton" ---07/06/2011 05:44:01 PM---I have my Firebug to Orion sending edit updates to Firebug. Now I am working on Firebug sending edi


From:

"John J. Barton" <johnjbarton@xxxxxxxxxxxxxxx>

To:

Orion developer discussions <orion-dev@xxxxxxxxxxx>

Date:

07/06/2011 05:44 PM

Subject:

[orion-dev] Plugin -> editor actions

Sent by:

orion-dev-bounces@xxxxxxxxxxx





I have my Firebug to Orion sending edit updates to Firebug. Now I am
working on Firebug sending edit updates to Orion. What is the
recommended way for a plugin to send an event to the editor that will
call a function in the edit window?

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




Back to the top