Project: JDT
Bug 306736 [Workbench] Contributed sourceProvider can cause troubles on start
Reported: 2010-03-22 12:06:53 | Status: verified fixed

I20100316-0859. In Workbench.init() we read the source providers of the 'org.eclipse.ui.services' extension point and there all extensions are immediately loaded (createExecutableExtension) no matter whether the contributing bundle is already started. Unfortunately this happens before the workbench itself is correctly initialized (workbench colors in this particular case). This can cause troubles for upstream bundles that expect the workbench colors and/or fonts to be present when they get loaded. It would be good if the workbench could initialize as much as possible before calling code that starts other bundles. We should either - Protect the code to not load those extensions. We do similar things e.g. when loading the handler service (see org.eclipse.ui.internal.handlers.HandlerProxy.isOkToLoad(). The hard part here is to make sure that the extension which aren't loaded still work somehow, e.g. by adding a proxy. - Initialize default services after colors and fonts (this might be the simplest fix but would need extensive testing).

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/PreferenceConstants.java