Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRAP and org.eclipse.ui.services-Extension-Point
https://www.eclipse.org/forums/index.php/mv/msg/42233/137269/#msg_137269
I'm on the way to port an RCP-Framework to work with RAP and have been
hitting a problem and I'm not sure if my understanding of the
IWorkbench#getService() and it's extension point is wrong.
Looking at the code it looks like WorkbenchServiceRegistry.getRegistry()
is the problem because it uses a static-Variable to remember the created
registry hence it not recreated for every RAP-workbench but is a global
Singleton :-)
So is this done by intenion?
Tom]]>Thomas Schindl2009-06-22T10:58:02-00:00Re: RAP and org.eclipse.ui.services-Extension-Point
https://www.eclipse.org/forums/index.php/mv/msg/42233/137306/#msg_137306
> Hi,
>
> I'm on the way to port an RCP-Framework to work with RAP and have been
> hitting a problem and I'm not sure if my understanding of the
> IWorkbench#getService() and it's extension point is wrong.
>
> Looking at the code it looks like WorkbenchServiceRegistry.getRegistry()
> is the problem because it uses a static-Variable to remember the created
> registry hence it not recreated for every RAP-workbench but is a global
> Singleton :-)
This was done by intention (ignoring possible multi-threading
issues) under the assumption that the service extensions do not
change at runtime.
What problems does that cause in your case?
>
> So is this done by intenion?
>
> Tom]]>RĂ¼diger Herrmann2009-06-22T13:05:15-00:00Re: RAP and org.eclipse.ui.services-Extension-Point
https://www.eclipse.org/forums/index.php/mv/msg/42233/137329/#msg_137329
I think I now found the problem. The factory contributed was caching the
Service-Instance itself and because the WorkbenchServiceRegistry cached
the Factory it returned the same instance all the time instead of a new
instance / workbench.
Because I've not written the original code I'm not sure why this has
been done because it is not necessary to cache the instance in the
factory anyways glad to I have found the problem.
Tom
RĂ¼diger Herrmann schrieb:
> Tom Schindl wrote:
>> Hi,
>>
>> I'm on the way to port an RCP-Framework to work with RAP and have been
>> hitting a problem and I'm not sure if my understanding of the
>> IWorkbench#getService() and it's extension point is wrong.
>>
>> Looking at the code it looks like WorkbenchServiceRegistry.getRegistry()
>> is the problem because it uses a static-Variable to remember the created
>> registry hence it not recreated for every RAP-workbench but is a global
>> Singleton :-)
> This was done by intention (ignoring possible multi-threading issues)
> under the assumption that the service extensions do not change at runtime.
> What problems does that cause in your case?
>
>>
>> So is this done by intenion?
>>
>> Tom]]>Thomas Schindl2009-06-22T13:43:32-00:00