Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP and org.eclipse.ui.services-Extension-Point
RAP and org.eclipse.ui.services-Extension-Point [message #137269] Mon, 22 June 2009 10:58 Go to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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 :-)

So is this done by intenion?

Tom
Re: RAP and org.eclipse.ui.services-Extension-Point [message #137306 is a reply to message #137269] Mon, 22 June 2009 13:05 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
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
Re: RAP and org.eclipse.ui.services-Extension-Point [message #137329 is a reply to message #137306] Mon, 22 June 2009 13:43 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

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
Previous Topic:How to use the plugin mechanism with RAP?
Next Topic:Org.eclipse.ui.editorss is not available, and how to set curvy tab?
Goto Forum:
  


Current Time: Tue Apr 23 14:02:56 GMT 2024

Powered by FUDForum. Page generated in 0.02787 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top