Community
Participate
Working Groups
InjectorImpl.findExtendedSupplier uses its defaultSupplier to inject values into the ExtendedObjectSupplier. It is possible that defaultSupplier is NULL, in which case no injection happens. This is unnesessary, since a valid PrimaryObjectSupplier gets passed to findExtendedSupplier, which can be used for the injection in this case.
Created attachment 233549 [details] Patch based on R4_3_maintenance Attached is a patch which uses the defaultSupplier, if it has been set and the passed-in objectSupplier if not. The patch is directed at the R_4_3_maintenance branch.
Forum Discussion: http://www.eclipse.org/forums/index.php/mv/msg/490174/1070130/#msg_1070130
Remark: The defaultSupplier is set to be the application context during the startup of the E4Workbench. So, if an ExtendedSupplier is to be used before the creation of the application context (i.e. during @PostContextCreate in the LifeCyclemanager) it will not get processed by DI.
Created attachment 233585 [details] Patch based on R4_3_maintenance (eclipse.platform.ui) Alternative Solution setting the defaultSupplier earlier during the startup of the e4 workbench
to fix this problem in 4.3.x only patch 2 can be considered although patch 1 is interesting in itself but needs more care what would be changed to the DI system.
(In reply to comment #4) > Created attachment 233585 [details] > Patch based on R4_3_maintenance (eclipse.platform.ui) I'd move this up even higher, to just after the appContext.set(IApplicationContext.class, applicationContext); PW
Created attachment 233618 [details] patch setting the defaultSupplier earlier during the creation of the E4 workbench patch modified according to Pauls suggestion
I pushed the second patch to gerrit for review. https://git.eclipse.org/r/14766
I've released patch2 as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=758c1cbfcf8ce44ea27d48ff0c9ff4d3fa479238 Thanks Christoph. Setting the defaultSupplier in the E4Application was introduced by bug 389863. It explains why we don't use the primaryObjectSupplier anymore. PW
In 4.4.0.I20130806-2000 PW