dependency injection hooks [message #92920] |
Tue, 24 July 2007 16:49  |
Eclipse User |
|
|
|
i'm searching for a way to inject dependencies into objects that are
created by the framework. e.g. implementations of IActionDelegate,
IViewPart, etc..
the idea is that all services that are used by an action, and of course
all services that are used by this service... are automatically injected
so that i don't have to wire the objects by hand and to avoid dependencies
to specific implementations of the service and thereby to simplify testing
(by mocking).
i would like to use google guice as injection framework.
if it would be possible to register an own version of
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI and use the
guice injector in the createExecutableExtension method to create the
instance (instead of classInstance.newInstance()), this would maybe do the
job.
i also looked at the org.eclipse.osgi.baseadaptor.hooks.ClassLoadingHook
and load an adapted proxy of RegistryStrategyOSGI but for my taste it is a
bit to close to the core =)
any idea where to plug-in?
cheers daniel
|
|
|
|
Powered by
FUDForum. Page generated in 0.04437 seconds