| Summary: | Test failure in PluginsNotLoadedTest when run from AllZRHTests | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | UI | Assignee: | Dani Megert <daniel_megert> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, darin.eclipse, deepakazad, raksha.vasisht |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Markus Keller
Assigning to Dani for now. I'm not sure if it's really worth adding dances to delay the loading of org.eclipse.ui.console when org.eclipse.jdt.debug.ui is loaded. I would just add the console bundle to the AllZRHTests. > Could be caused by the new OpenFromClipboardAction class which directly
> references types from the org.eclipse.ui.console plug-in.
Probably not, o.e.jdt.debug.ui already had references to the same types.
> Probably not, o.e.jdt.debug.ui already had references to the same types.
Yes, but the question is: When are the classes with such references loaded? A required plug-in is only loaded when the first of its classes is loaded.
The cause is indeed the org.eclipse.jdt.internal.debug.ui.actions.OpenFromClipboardAction class that is referenced from /org.eclipse.jdt.debug.ui/plugin.xml:
EquinoxRegistryStrategy#createExecutableExtension(..) line: 184
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:153)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:675)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:378)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:286)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:265)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:106)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:453)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:466)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
at java.lang.Class.getConstructor0(Class.java:2671)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:904)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:259)
at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:122)
at org.eclipse.ui.internal.WWinPluginAction.refreshActionList(WWinPluginAction.java:165)
at org.eclipse.ui.plugin.AbstractUIPlugin$1.run(AbstractUIPlugin.java:486)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3164)
at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:196)
at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:192)
at org.eclipse.jdt.text.tests.performance.EditorTestHelper.runEventQueue(EditorTestHelper.java:188)
at org.eclipse.jdt.text.tests.performance.EditorTestHelper.openInEditor(EditorTestHelper.java:127)
at org.eclipse.jdt.text.tests.MarkOccurrenceTest.openJavaEditor(MarkOccurrenceTest.java:160)
at org.eclipse.jdt.text.tests.MarkOccurrenceTest.setUp(MarkOccurrenceTest.java:100)
Given that the ConsolePlugin doesn't even have a start(..) method, I still think we should just adapt the test. Simple steps in the workbench (open CU and CF editor, open context menu) do not load the Console plug-in, so it's not too much of a deal. The reason for this is that in a new workbench the JDT Debug UI plug-in is not yet loaded and hence the delegate (OpenFromClipboardAction) is not loaded. Fixed in 'AllZRHTests' by adding the console plug-in to the list of loaded plug-ins. Verified in I20100914-0100. |