Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » getService() without the UI?!
getService() without the UI?! [message #334572] Wed, 18 February 2009 10:40 Go to next message
Eclipse UserFriend
Hello,

currently I'm using PlatformUI.getWorkbench().getService() a lot, using
the extensionpoint "org.eclipse.ui.services".

In general it’s working fine. But it suffers a bit from its bondage to the
UI. Why is something so general like a servicelocator bound to the UI
anyway? Every Plugin I create that uses this servicelocator has to have
"org.eclipse.ui" as a dependency. Even if it is a model plugin (EMF) thats
only dependencie to the UI would be the servicelocator.

Would'nt it be nice to have a UI-less servicelocator?
Aspecially since currently it is not possible to use services as long the
workbench has not been started. Likewise when opening a login dialog
within Application.start() and the connection to a database is controlled
by a ConnectionService... :)

Jan Kohnert
Re: getService() without the UI?! [message #334575 is a reply to message #334572] Wed, 18 February 2009 11:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

If you want to do things at the lower level I'd suggest to use OSGi
Declarative Services.

If you need an example how to e.g. expose a EMF-Model as a Declarative
Service you can take a look the example application [1] I'm writing for
my EclipseCon [2] talk.

Tom

[1] http://github.com/tomsontom/emf-databinding-example/tree/mas ter
[2]Mixing Eclipse Technologies to create Enterprise Ready
Database-RCP-Frontends - http://www.eclipsecon.org/2009/sessions?id=446



Jan Kohnert schrieb:
> Hello,
>
> currently I'm using PlatformUI.getWorkbench().getService() a lot, using
> the extensionpoint "org.eclipse.ui.services".
>
> In general it�s working fine. But it suffers a bit from its bondage to
> the UI. Why is something so general like a servicelocator bound to the
> UI anyway? Every Plugin I create that uses this servicelocator has to
> have "org.eclipse.ui" as a dependency. Even if it is a model plugin
> (EMF) thats only dependencie to the UI would be the servicelocator.
>
> Would'nt it be nice to have a UI-less servicelocator?
> Aspecially since currently it is not possible to use services as long
> the workbench has not been started. Likewise when opening a login dialog
> within Application.start() and the connection to a database is
> controlled by a ConnectionService... :)
>
> Jan Kohnert
>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Re: getService() without the UI?! [message #334578 is a reply to message #334572] Wed, 18 February 2009 13:34 Go to previous messageGo to next message
Eclipse UserFriend
Jan

I use the Apache Commons Discover component that leverages the Java SPI
specification fairly successfully.

Karl

Jan Kohnert wrote:
> Hello,
>
> currently I'm using PlatformUI.getWorkbench().getService() a lot, using
> the extensionpoint "org.eclipse.ui.services".
>
> In general it�s working fine. But it suffers a bit from its bondage to
> the UI. Why is something so general like a servicelocator bound to the
> UI anyway? Every Plugin I create that uses this servicelocator has to
> have "org.eclipse.ui" as a dependency. Even if it is a model plugin
> (EMF) thats only dependencie to the UI would be the servicelocator.
>
> Would'nt it be nice to have a UI-less servicelocator?
> Aspecially since currently it is not possible to use services as long
> the workbench has not been started. Likewise when opening a login dialog
> within Application.start() and the connection to a database is
> controlled by a ConnectionService... :)
>
> Jan Kohnert
>
>
>
Re: getService() without the UI?! [message #334589 is a reply to message #334575] Thu, 19 February 2009 05:18 Go to previous messageGo to next message
Eclipse UserFriend
Tom,

which of your chared plugins contains the declarative service example?

Thanks,
Jan

Tom Schindl wrote:

> Hi,

> If you want to do things at the lower level I'd suggest to use OSGi
> Declarative Services.

> If you need an example how to e.g. expose a EMF-Model as a Declarative
> Service you can take a look the example application [1] I'm writing for
> my EclipseCon [2] talk.

> Tom

> [1] http://github.com/tomsontom/emf-databinding-example/tree/mas ter
> [2]Mixing Eclipse Technologies to create Enterprise Ready
> Database-RCP-Frontends - http://www.eclipsecon.org/2009/sessions?id=446



> Jan Kohnert schrieb:
>> Hello,
>>
>> currently I'm using PlatformUI.getWorkbench().getService() a lot, using
>> the extensionpoint "org.eclipse.ui.services".
>>
>> In general itï¿œs working fine. But it suffers a bit from its bondage to
>> the UI. Why is something so general like a servicelocator bound to the
>> UI anyway? Every Plugin I create that uses this servicelocator has to
>> have "org.eclipse.ui" as a dependency. Even if it is a model plugin
>> (EMF) thats only dependencie to the UI would be the servicelocator.
>>
>> Would'nt it be nice to have a UI-less servicelocator?
>> Aspecially since currently it is not possible to use services as long
>> the workbench has not been started. Likewise when opening a login dialog
>> within Application.start() and the connection to a database is
>> controlled by a ConnectionService... :)
>>
>> Jan Kohnert
>>
>>
>>
Re: getService() without the UI?! [message #334590 is a reply to message #334589] Thu, 19 February 2009 05:58 Go to previous message
Eclipse UserFriend
Hi,

* org.eclipse.emf.example.library.service.xmi.test1 declares a service
* org.eclipse.emf.example.library.service.teneo.derby.test1 declares a
service
* org.eclipse.emf.examples.library.databinding consumes them
(See the Activator)

Tom

Jan Kohnert schrieb:
>
>
> Tom,
>
> which of your chared plugins contains the declarative service example?
>
> Thanks,
> Jan
>
> Tom Schindl wrote:
>
>> Hi,
>
>> If you want to do things at the lower level I'd suggest to use OSGi
>> Declarative Services.
>
>> If you need an example how to e.g. expose a EMF-Model as a Declarative
>> Service you can take a look the example application [1] I'm writing for
>> my EclipseCon [2] talk.
>
>> Tom
>
>> [1] http://github.com/tomsontom/emf-databinding-example/tree/mas ter
>> [2]Mixing Eclipse Technologies to create Enterprise Ready
>> Database-RCP-Frontends - http://www.eclipsecon.org/2009/sessions?id=446
>
>
>
>> Jan Kohnert schrieb:
>>> Hello,
>>>
>>> currently I'm using PlatformUI.getWorkbench().getService() a lot, using
>>> the extensionpoint "org.eclipse.ui.services".
>>>
>>> In general itï¿œs working fine. But it suffers a bit from its bondage to
>>> the UI. Why is something so general like a servicelocator bound to the
>>> UI anyway? Every Plugin I create that uses this servicelocator has to
>>> have "org.eclipse.ui" as a dependency. Even if it is a model plugin
>>> (EMF) thats only dependencie to the UI would be the servicelocator.
>>>
>>> Would'nt it be nice to have a UI-less servicelocator?
>>> Aspecially since currently it is not possible to use services as long
>>> the workbench has not been started. Likewise when opening a login dialog
>>> within Application.start() and the connection to a database is
>>> controlled by a ConnectionService... :)
>>>
>>> Jan Kohnert
>>>
>>>
>>>
>
>
>


--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Creating a NonExistingFileEditorInput with content?
Next Topic:Load my plugin at startup in particular order
Goto Forum:
  


Current Time: Tue Apr 15 01:08:51 EDT 2025

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

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

Back to the top