Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse e4 application feasibility
Eclipse e4 application feasibility [message #1022069] Thu, 21 March 2013 04:30 Go to next message
ALex W is currently offline ALex W
Messages: 27
Registered: July 2012
Junior Member
Hello,

I'm thinking about designing an application using Eclipse E4. I was wondering if Eclipse e4 is a good choice (it seems to me) :

The application will be configurable to electronical devices. Only one at a time. To make it simple, there is one controller interface, and several possible controller implementation. I would like to offer the possibility to the user to switch the implementation (including or not the aplpication restart...). Is that possible and how ?

I've already done some tests and I plan to use Eclipse E4 with OSGI Declarative services. Right now I would like to be able to chose at runtime (from my application code), what component/bundle will be started at application launch.

One main point is the flexibility. Users will be allowed to develop plugin and install them in the application.

Thanks

Re: Eclipse e4 application feasibility [message #1022078 is a reply to message #1022069] Thu, 21 March 2013 04:45 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 418
Registered: July 2009
Senior Member
Hi Alex,

Sounds totally feasible.

Best regards,

Wim


> Hello,
>
> I'm thinking about designing an application using Eclipse E4. I was
wondering if Eclipse e4 is a good choice (it seems to me) :
>
> The application will be configurable to electronical devices. Only one at a
time. To make it simple, there is one controller interface, and several
possible controller implementation. I would like to offer the possibility to
the user to switch the implementation (including or not the aplpication
restart...). Is that possible and how ?
>
> I've already done some tests and I plan to use Eclipse E4 with OSGI
Declarative services. Right now I would like to be able to chose at runtime
(from my application code), what component/bundle will be started at
application launch.
>
> One main point is the flexibility. Users will be allowed to develop plugin
and install them in the application.
>
> Thanks
Re: Eclipse e4 application feasibility [message #1022111 is a reply to message #1022078] Thu, 21 March 2013 05:43 Go to previous messageGo to next message
Sopot Cela is currently offline Sopot Cela
Messages: 596
Registered: December 2010
Senior Member

E4 is a really good friend of OSGi's declarative services.
Re: Eclipse e4 application feasibility [message #1022118 is a reply to message #1022111] Thu, 21 March 2013 05:56 Go to previous messageGo to next message
ALex W is currently offline ALex W
Messages: 27
Registered: July 2012
Junior Member
Thanks for the replies.
I'm currently looking online, but I can't find any mechanism to specify at runtime, which plugins should be started. Any clues ?

I guess it could be done by reading a configuration file registering every plugins ID and the use their activator to start it ? Or call a method inside the plugin if the lazy-activation is enabled ? Then OSGI DS would be automatically registered.
Re: Re: Eclipse e4 application feasibility [message #1022202 is a reply to message #1022118] Thu, 21 March 2013 09:28 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 418
Registered: July 2009
Senior Member
You can use DS and specify that a service can only start if a specific
required service is available.

So in your control code you can register a service which triggers the
activation of the real service.

e.g. what we do: If the user is logged in, we erect a LoginService which
triggers the activation of other services. If we take the LoginService down
then the dependent service shut down too.

I have a DS example on my github.

https://github.com/wimjongman/dynamic-services-demo


> Thanks for the replies.
> I'm currently looking online, but I can't find any mechanism to specify at
runtime, which plugins should be started. Any clues ?
>
> I guess it could be done by reading a configuration file registering every
plugins ID and the use their activator to start it ? Or call a method inside
the plugin if the lazy-activation is enabled ? Then OSGI DS would be
automatically registered.
Re: Re: Eclipse e4 application feasibility [message #1022268 is a reply to message #1022202] Thu, 21 March 2013 11:21 Go to previous message
Wim Jongman is currently offline Wim Jongman
Messages: 418
Registered: July 2009
Senior Member
To run the code just create a new osgi run configuration, include the 5
projects and equinox ds then add required plugins and specify

-Dosgi.console.enable.builtin=true

to get the good old osgi console back

a gui will popup

look in the console and start and stop the store and user bundles. You will
see that the gui changes. To keep it on top go to the control class and
specify SWT.ON_TOP

It is a bit shitty but enough to understand the service dynamics


> You can use DS and specify that a service can only start if a specific
> required service is available.
>
> So in your control code you can register a service which triggers the
> activation of the real service.
>
> e.g. what we do: If the user is logged in, we erect a LoginService which
> triggers the activation of other services. If we take the LoginService down
> then the dependent service shut down too.
>
> I have a DS example on my github.
>
> https://github.com/wimjongman/dynamic-services-demo
>
>
>> Thanks for the replies.
>> I'm currently looking online, but I can't find any mechanism to specify at
> runtime, which plugins should be started. Any clues ?
>>
>> I guess it could be done by reading a configuration file registering every
> plugins ID and the use their activator to start it ? Or call a method
inside
> the plugin if the lazy-activation is enabled ? Then OSGI DS would be
> automatically registered.
Previous Topic:How are menus / toolbars related to a perspective
Next Topic:Perspective switch broken in Kepler M6
Goto Forum:
  


Current Time: Wed Jul 23 16:18:58 EDT 2014

Powered by FUDForum. Page generated in 0.01665 seconds