[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [orion-dev] plugin with extension point
|
On Thu, Jan 26, 2012 at 2:13 PM, Boris Bokowski <bokowski@xxxxxxxxx> wrote:
> Hi John,
>
> Maybe it's obvious to everyone, but then again maybe not: normally, Orion
> plugins are not extensible themselves and don't have 'extension points' -
> this is normally done by the page itself. If you are trying to nest plugins,
> it would probably lead to iframes in the outer plugin's iframe. It's
> probably doable, and Simon's pointers should help, but it hasn't been done
> yet.
Maybe I am asking the wrong question. I did not imagine nested
plugins. Rather I want two plugins to communicate through the
registry.
I want to create a plugin that offers a service with API calls
(setBreakpoint) and offers events (breakpointWasSet). The API call
part seems to match the service providing bit of Orion plugins. But
how to I get the callback points for the events?
I thought I could use:
var debuggerEventHandlers =
serviceregistry.getService("chrome.debugger.eventHandlers");
Then another Orion plugin would get my service:
var debuggerOpener = serviceRegistry.getService('chrome.debugger.opener');
provide the handlers:
provider.registerServiceProvider("chrome.debugger.eventHandlers",
impl, props);
Then open the debugger:
var promiseDebugger = debuggerOpener(debugThisURL);
promiseDebugger.then(function(debugger) {
debugger.setBreakpoint(12);
..
});
But as you can see this relies on "serviceRegistry".
>
> If you are just trying to add a new page that is extensible, or would like
> to add an extension point to an existing Orion page, that should be
> relatively straightforward.
Ok, thanks, that makes the other replies much clearer ;-).
>
> Boris
>
> On Jan 26, 2012 8:06 PM, "John J Barton" <johnjbarton@xxxxxxxxxxxxxxx>
> wrote:
>>
>> Hi. I want to create a plugin that has extension points. I think I need to
>> issue something like:
>>
>>
>> var service = registry.getService("chrome.event.handler");
>>
>> Then I imply an API by calling stuff on the service; users of my plugin
>> then will issue
>>
>> provider.registerServiceProvider("chrome.event.handler", serviceImpl,
>> serviceProps);
>>
>> to plugin to my plugin. Hopefully serviceImpl matches the calls I make on
>> 'service'.
>>
>> Am I on the right track?
>>
>> How do I get the "registry" object in my plugin?
>>
>> jjb
>>
>> _______________________________________________
>> orion-dev mailing list
>> orion-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/orion-dev
>>
>
> _______________________________________________
> orion-dev mailing list
> orion-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/orion-dev
>