Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Fwd: How to correctly set up another LifeCycleHandler

Again, thanks!

We've managed to create a working example. There is only one problem I don't understand:
I've we have to list it in the application model, then this addon is a "hard" dependency. But what
is if we e. g. provide a couple of plugins for different backends (where each want to setup his service
in the context). Each plugin is optional and there could only be one plugin "used" at a time. But I'm
unable to add each plugin as a separate addon to the application model.

So, how are those things handled correctly?

What we try to achieve:
There is one plugin holding a service interface, let's say "ContactService".
Then there are a couple of backend plugins that implement that service, e. g. MySqlContactService, SQLiteContactService.
Now we wont to be able to let those plugins automatically add their service to the Eclipse context if this plugin is installed
and activated (with a preceding check if another plugin already was load).

This way the application could easily switch between backends (and we can use dependency injection in the gui as the
currently chosen backend is automatically added to the context.

Greetings and thanks for your great help!
Ben


2013/5/9 Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>
Addons have to be listed in the model, they're run in order (just like our CommandServiceAddon

PW
--
Paul Webster
Hi floor.  Make me a sammich! - GIR

_______________________________________________
e4-dev mailing list
e4-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/e4-dev



Back to the top