Community
Participate
Working Groups
build I20040810 While running the tests, I noticed that the tests plugin was getting triggered by the theme registry reader. It was trying to instantiate org.eclipse.ui.tests.themes.TestColorFactory. From the stack, it looks like this will cause any plugins that have a color factory to be started eagerly. Would it be possible to defer this until the color value is requested? Thread [main] (Suspended (breakpoint at line 124 in TestPlugin)) TestPlugin.start(BundleContext) line: 124 PluginActivator.start(BundleContext) line: 49 BundleContextImpl$1.run() line: 958 AccessController.doPrivileged(PrivilegedExceptionAction) line: not available [native method] BundleContextImpl.startActivator(BundleActivator) line: 954 BundleContextImpl.start() line: 937 BundleHost.startWorker(boolean) line: 421 BundleHost(AbstractBundle).start() line: 293 EclipseClassLoader.findLocalClass(String) line: 110 BundleLoader.findLocalClass(String) line: 371 BundleLoader.findClass(String) line: 402 EclipseClassLoader(AbstractClassLoader).loadClass(String, boolean) line: 93 EclipseClassLoader(ClassLoader).loadClass(String) line: 235 BundleLoader.loadClass(String) line: 307 BundleHost.loadClass(String, boolean) line: 336 BundleHost(AbstractBundle).loadClass(String) line: 1313 ConfigurationElement.createExecutableExtension(Bundle, String, Object, IConfigurationElement, String) line: 131 ConfigurationElement.createExecutableExtension(Bundle, String, String, Object, IConfigurationElement, String) line: 124 ConfigurationElement.createExecutableExtension(String) line: 113 ThemeRegistryReader.checkColorFactory(IConfigurationElement) line: 442 ThemeRegistryReader.getColorValue(IConfigurationElement) line: 228 ThemeRegistryReader.readColor(IConfigurationElement) line: 186 ThemeRegistryReader.readElement(IConfigurationElement) line: 285 ThemeRegistryReader(RegistryReader).readElements(IConfigurationElement[]) line: 151 ThemeRegistryReader(RegistryReader).readExtension(IExtension) line: 161 ThemeRegistryReader(RegistryReader).readRegistry(IExtensionRegistry, String, String) line: 177 ThemeRegistryReader.readThemes(IExtensionRegistry, ThemeRegistry) line: 484 WorkbenchPlugin.getThemeRegistry() line: 502 Workbench.initializeFonts() line: 914 Workbench.init(Display) line: 814 Workbench.runUI() line: 1383 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 263 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 144 IDEApplication.run(Object) line: 102 PlatformActivator$1.run(Object) line: 335 EclipseStarter.run(Object) line: 273 EclipseStarter.run(String[], Runnable) line: 129 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 Method.invoke(Object, Object[]) line: 324 Main.basicRun(String[]) line: 183 Main.run(String[]) line: 644 Main.main(String[]) line: 628
Hrm... not without some massive changes to themes and jface. The themes merely push colors/fonts into the jface registries. We'd need to set up communication between the registries and the themes engine so that the themes engine would fufill the color request. Ie: rewrite much of the framework. :) There is a warning in the themes extension point documentation regarding this issue. I suggest we leave things the way they are. The cost of fixing this doesn't seem to mesh well with the frequency in which color factories are actually needed.