Richard Catlin | 1 Nov 2010 22:17
Picon
Gravatar

Re: Eclipse ViewPart and OSGI Declarative Services problem

I have a ViewPart which depends on an OSGI Declarative Service.

I have it configured properly so that the service is injected into the ViewPart via a bind method.  I can debug and see that this is working.

The problem I am having is that a new instance of the ViewPart is being instantiated for viewing and that the instance that was injected is not being used.

Any help is appreciated.

Thanks.
Richard Catlin

<div><p>I have a ViewPart which depends on an OSGI Declarative Service.<br><br>I have it configured properly so that the service is injected into the ViewPart via a bind method.&nbsp; I can debug and see that this is working.<br><br>The problem I am having is that a new instance of the ViewPart is being instantiated for viewing and that the instance that was injected is not being used.<br><br>Any help is appreciated.<br><br>Thanks.<br>Richard Catlin<br></p></div>
Thomas Watson | 1 Nov 2010 22:36
Picon
Favicon

Equinox tagged for next Indigo integration build.

The map file has been updated for the following Bug changes:
+ Bug 327482. OSGI app binaries do not inherit Java 2 security (FIXED)
+ Bug 328508. Add support to Require-Bundle for arbitrary matching attributes and mandatory directive (FIXED)

The following projects have changed:
org.eclipse.equinox.log
org.eclipse.equinox.registry
org.eclipse.equinox.http.registry
org.eclipse.osgi.tests
org.eclipse.equinox.jsp.jasper
org.eclipse.osgi

Tom

<div>
<p>The map file has been updated for the following Bug changes:<br>
+ Bug 327482. OSGI app binaries do not inherit Java 2 security (FIXED)<br>
+ Bug 328508. Add support to Require-Bundle for arbitrary matching attributes and mandatory directive (FIXED)<br><br>
The following projects have changed:<br>
org.eclipse.equinox.log<br>
org.eclipse.equinox.registry<br>
org.eclipse.equinox.http.registry<br>
org.eclipse.osgi.tests<br>
org.eclipse.equinox.jsp.jasper<br>
org.eclipse.osgi<br><br>
Tom<br><br></p>
</div>
portal on behalf of emo | 2 Nov 2010 04:59
Favicon
Gravatar

IP CQs waiting on your team

equinox-dev,
IPZilla records show that one or more of the projects on which you are
developer are in need of attention.  The following CQs have been in the
'awaiting_project' status for over 3 weeks  and need your team to take
action.

  rt.equinox:

    4541 OSGi Service Platform Core Companion Code -- checkintocvs, nonepl,
sourceandbinary, unmodified, 4 weeks ago
    https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4541

    4540 OSGi Service Platform Compendium Companion Code -- checkintocvs,
nonepl, sourceandbinary, unmodified, 4 weeks ago
    https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4540

If you have any questions, please do not hesitate to contact your project
lead, PMC member, or the EMO <emo@...>

Paul Webster | 2 Nov 2010 12:00
Picon
Picon
Favicon

Re: Eclipse ViewPart and OSGI Declarative Services problem

On Mon, Nov 1, 2010 at 5:17 PM, Richard Catlin
<richard.m.catlin <at> gmail.com> wrote:
> I have a ViewPart which depends on an OSGI Declarative Service.
>
> I have it configured properly so that the service is injected into the
> ViewPart via a bind method.  I can debug and see that this is working.
>
> The problem I am having is that a new instance of the ViewPart is being
> instantiated for viewing and that the instance that was injected is not
> being used.

When a view is instantiated (for example, when it is shown for the
first time in the session) it is created by
org.eclipse.ui.internal.registry.ViewDescriptor.createView(), basicly
calling org.eclipse.core.runtime.IConfigurationElement.createExecutableExtension(String)

AFAIK there's no hook from there that allow anything to be injected
into it, at least not in 3.x

PW

--

-- 
Paul Webster
Hi floor.  Make me a sammich! - GIR
_______________________________________________
equinox-dev mailing list
equinox-dev <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Neil Bartlett | 2 Nov 2010 12:11
Picon
Gravatar

Re: Eclipse ViewPart and OSGI Declarative Services problem

Hi Richard,

This is a rather challenging area, because the lifecycles of services
and extensions are completely unrelated. As you've noticed, creating a
component with DS does not mean it will be used by the extension
registry. Indeed it cannot be, because the extension registry is more
like a factory where new instances are created each time they are
needed.

I created a small framework to help with this kind of thing:
http://github.com/njbartlett/extensions2services. Please be sure to
read the manual (in PDF), because it helps to describe the background
of the problem, even if you decide not to adopt my solution.

Other possible solutions, which all use or include a
dependency-injection approach, are as follows:

1) Eclipse Riena -- however Riena does a lot of other stuff that I
don't really understand
2) Peaberry is based on Guice
3) Eclipse 4.0 ("e4") uses dependency injection everywhere, but this
is not much use to you if you are using 3.x.

Regards,
Neil

On Mon, Nov 1, 2010 at 9:17 PM, Richard Catlin
<richard.m.catlin <at> gmail.com> wrote:
> I have a ViewPart which depends on an OSGI Declarative Service.
>
> I have it configured properly so that the service is injected into the
> ViewPart via a bind method.  I can debug and see that this is working.
>
> The problem I am having is that a new instance of the ViewPart is being
> instantiated for viewing and that the instance that was injected is not
> being used.
>
> Any help is appreciated.
>
> Thanks.
> Richard Catlin
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev <at> eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
>
_______________________________________________
equinox-dev mailing list
equinox-dev <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
O'Flynn, Dennis | 2 Nov 2010 13:34
Picon
Favicon

Re: Eclipse ViewPart and OSGI Declarative Servicesproblem

Another dependency-injection approach is Spring.  Martin Libbert provided a way to bridge extension
points w/ spring beans.  See his blog at:
* http://martinlippert.blogspot.com/2008/05/dependency-injection-for-extensions.html



-----Original Message-----
From: equinox-dev-bounces <at> eclipse.org [mailto:equinox-dev-bounces <at> eclipse.org] On Behalf Of Neil Bartlett
Sent: Tuesday, November 02, 2010 7:11 AM
To: Equinox development mailing list
Subject: Re: [equinox-dev] Eclipse ViewPart and OSGI Declarative Servicesproblem

Hi Richard,

This is a rather challenging area, because the lifecycles of services
and extensions are completely unrelated. As you've noticed, creating a
component with DS does not mean it will be used by the extension
registry. Indeed it cannot be, because the extension registry is more
like a factory where new instances are created each time they are
needed.

I created a small framework to help with this kind of thing:
http://github.com/njbartlett/extensions2services. Please be sure to
read the manual (in PDF), because it helps to describe the background
of the problem, even if you decide not to adopt my solution.

Other possible solutions, which all use or include a
dependency-injection approach, are as follows:

1) Eclipse Riena -- however Riena does a lot of other stuff that I
don't really understand
2) Peaberry is based on Guice
3) Eclipse 4.0 ("e4") uses dependency injection everywhere, but this
is not much use to you if you are using 3.x.

Regards,
Neil


On Mon, Nov 1, 2010 at 9:17 PM, Richard Catlin
<richard.m.catlin <at> gmail.com> wrote:
> I have a ViewPart which depends on an OSGI Declarative Service.
>
> I have it configured properly so that the service is injected into the
> ViewPart via a bind method.  I can debug and see that this is working.
>
> The problem I am having is that a new instance of the ViewPart is being
> instantiated for viewing and that the instance that was injected is not
> being used.
>
> Any help is appreciated.
>
> Thanks.
> Richard Catlin
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev <at> eclipse.org
> https://dev.eclipse.org/mailman/listinfo/equinox-dev

>
>
_______________________________________________
equinox-dev mailing list
equinox-dev <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev <at> eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Thomas Watson | 2 Nov 2010 20:57
Picon
Favicon

equinox.launcher-inbox@... - Start of spam while moving bugs from framework inbox

Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox->Framework component in bugzilla. Right now we have ~100 launcher bugs open in the framework's inbox. We have decided to create a component for and inbox specifically for the launcher (Equinox->Launcher and equinox.launcher-inbox-j9T/66MeVpFAfugRpC6u6w@public.gmane.org). Now I am about to move ~100 bugs from the framework inbox to the launcher inbox.

This is a warning that anyone listening to the equinox.framework-inbox <at> eclipse.org inbox will be flooded with spam while we move the bugs over. I am going to move the bugs over and I will send another note out when I am done.

Tom

<div>
<p>Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox-&gt;Framework component in bugzilla.  Right now we have ~100 launcher bugs open in the framework's inbox.  We have decided to create a component for and inbox specifically for the launcher (Equinox-&gt;Launcher and equinox.launcher-inbox@...).  Now I am about to move ~100 bugs from the framework inbox to the launcher inbox.<br><br>
This is a warning that anyone listening to the equinox.framework-inbox <at> eclipse.org inbox will be flooded with spam while we move the bugs over.  I am going to move the bugs over and  I will send another note out when I am done.<br><br>
Tom<br><br></p>
</div>
Thomas Watson | 2 Nov 2010 21:06
Picon
Favicon

equinox.launcher-inbox@... - Start of spam while moving bugs from framework inbox

I have finished moving all the launcher bugs that I could find that were assigned to the equinox.framework-inbox-j9T/66MeVpGbup2nOX2J7Q@public.gmane.org Still need to move the rest (of which are likely to be assigned to Andrew).

Tom



Thomas Watson---11/02/2010 03:00:48 PM---Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox->Framework component in bugzilla.


From:

Thomas Watson/Austin/IBM <at> IBMUS

To:

equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org

Date:

11/02/2010 03:00 PM

Subject:

[equinox-dev] New equinox.launcher-inbox-j9T/66MeVpFAfugRpC6u6w@public.gmane.org - Start of spam while moving bugs from framework inbox



Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox->Framework component in bugzilla. Right now we have ~100 launcher bugs open in the framework's inbox. We have decided to create a component for and inbox specifically for the launcher (Equinox->Launcher and equinox.launcher-inbox <at> eclipse.org). Now I am about to move ~100 bugs from the framework inbox to the launcher inbox.

This is a warning that anyone listening to the equinox.framework-inbox <at> eclipse.org inbox will be flooded with spam while we move the bugs over. I am going to move the bugs over and I will send another note out when I am done.

Tom
_______________________________________________
equinox-dev mailing list
equinox-dev-j9T/66MeVpFAfugRpC6u6w@public.gmane.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev


<div>
<p>I have finished moving all the launcher bugs that I could find that were assigned to the equinox.framework-inbox@...  Still need to move the rest (of which are likely to be assigned to Andrew).<br><br>
Tom<br><br><br><br>Thomas Watson---11/02/2010 03:00:48 PM---Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox-&gt;Framework component in bugzilla.<br><br></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="1%">
<br>From:</td>
<td width="100%">
<br>Thomas Watson/Austin/IBM <at> IBMUS</td>
</tr>
<tr valign="top">
<td width="1%">
<br>To:</td>
<td width="100%">
<br>equinox-dev@...</td>
</tr>
<tr valign="top">
<td width="1%">
<br>Date:</td>
<td width="100%">
<br>11/02/2010 03:00 PM</td>
</tr>
<tr valign="top">
<td width="1%">
<br>Subject:</td>
<td width="100%">
<br>[equinox-dev] New equinox.launcher-inbox@... - Start of spam while moving bugs from framework inbox</td>
</tr>
</table>
<br><br><br>Up to now the launcher bugs have been included in the equinox.framework-inbox and the Equinox-&gt;Framework component in bugzilla. Right now we have ~100 launcher bugs open in the framework's inbox. We have decided to create a component for and inbox specifically for the launcher (Equinox-&gt;Launcher and equinox.launcher-inbox <at> eclipse.org). Now I am about to move ~100 bugs from the framework inbox to the launcher inbox.<br><br>
This is a warning that anyone listening to the equinox.framework-inbox <at> eclipse.org inbox will be flooded with spam while we move the bugs over. I am going to move the bugs over and I will send another note out when I am done.<br><br>
Tom<br>_______________________________________________<br>
equinox-dev mailing list<br>
equinox-dev@...<br><a href="https://dev.eclipse.org/mailman/listinfo/equinox-dev">https://dev.eclipse.org/mailman/listinfo/equinox-dev</a><br><br><br>
</div>
Martin Lippert | 2 Nov 2010 21:09
Picon
Favicon
Gravatar

Re: Eclipse ViewPart and OSGI Declarative Servicesproblem

Hi!

> Another dependency-injection approach is Spring.  Martin Libbert provided a way to bridge extension
points w/ spring beans.  See his blog at:
> * http://martinlippert.blogspot.com/2008/05/dependency-injection-for-extensions.html

The bridge that I built some time ago is now located at:

http://github.com/martinlippert/spring-extension-factory

Cheers,
-Martin

>
>
> -----Original Message-----
> From: equinox-dev-bounces@...
[mailto:equinox-dev-bounces@...] On Behalf Of Neil Bartlett
> Sent: Tuesday, November 02, 2010 7:11 AM
> To: Equinox development mailing list
> Subject: Re: [equinox-dev] Eclipse ViewPart and OSGI Declarative Servicesproblem
>
> Hi Richard,
>
> This is a rather challenging area, because the lifecycles of services
> and extensions are completely unrelated. As you've noticed, creating a
> component with DS does not mean it will be used by the extension
> registry. Indeed it cannot be, because the extension registry is more
> like a factory where new instances are created each time they are
> needed.
>
> I created a small framework to help with this kind of thing:
> http://github.com/njbartlett/extensions2services. Please be sure to
> read the manual (in PDF), because it helps to describe the background
> of the problem, even if you decide not to adopt my solution.
>
> Other possible solutions, which all use or include a
> dependency-injection approach, are as follows:
>
> 1) Eclipse Riena -- however Riena does a lot of other stuff that I
> don't really understand
> 2) Peaberry is based on Guice
> 3) Eclipse 4.0 ("e4") uses dependency injection everywhere, but this
> is not much use to you if you are using 3.x.
>
> Regards,
> Neil
>
>
> On Mon, Nov 1, 2010 at 9:17 PM, Richard Catlin
> <richard.m.catlin@...>  wrote:
>> I have a ViewPart which depends on an OSGI Declarative Service.
>>
>> I have it configured properly so that the service is injected into the
>> ViewPart via a bind method.  I can debug and see that this is working.
>>
>> The problem I am having is that a new instance of the ViewPart is being
>> instantiated for viewing and that the instance that was injected is not
>> being used.
>>
>> Any help is appreciated.
>>
>> Thanks.
>> Richard Catlin
>>
>> _______________________________________________
>> equinox-dev mailing list
>> equinox-dev@...
>> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>>
>>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@...
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
Richard Catlin | 2 Nov 2010 23:27
Picon
Gravatar

Re: Eclipse 3.7M2a problem Do I need to do configuration to get dropins folder to work?

I am using Eclipse eclipse-SDK-3.7M2a-macosx-cocoa-x86_64 for the Mac.  


When Eclipse is running, I put a plugin in the "dropins" folder.  The running OSGI system does not scan that directory, which I thought it was supposed to by default.

Do I need to do some configuration?

Richard
<div>
<p>I am using Eclipse&nbsp;eclipse-SDK-3.7M2a-macosx-cocoa-x86_64 for the Mac. &nbsp;</p>
<div><br></div>
<div>When Eclipse is running, I put a plugin in the "dropins" folder. &nbsp;The running OSGI system does not scan that directory, which I thought it was supposed to by default.</div>
<div><br></div>
<div>Do I need to do some configuration?</div>
<div><br></div>
<div>Richard</div>
</div>

Gmane