Bug 171558 - [Metadata] Opening up a simple workspace causes too many plugins to be activated
Summary: [Metadata] Opening up a simple workspace causes too many plugins to be activated
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on: 136397
Blocks:
  Show dependency tree
 
Reported: 2007-01-24 11:15 EST by Pascal Rapicault CLA
Modified: 2007-10-29 10:35 EDT (History)
7 users (show)

See Also:


Attachments
Simple workspace (98.27 KB, application/zip)
2007-01-24 11:23 EST, Pascal Rapicault CLA
no flags Details
Screenshot of activated plug-ins (190.76 KB, image/jpeg)
2007-10-29 09:43 EDT, Tod Creasey CLA
no flags Details
Current startup state (190.76 KB, image/jpeg)
2007-10-29 09:46 EDT, Tod Creasey CLA
no flags Details
Screenshot of activated plug-ins (190.76 KB, image/jpeg)
2007-10-29 10:32 EDT, Tod Creasey CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2007-01-24 11:15:52 EST
With 3.2.2, when I open the simple workspace attached I see too many plug-ins being activated (at least in my opinion) among which I can find PDE UI, JDT Debug UI.
I find that pretty worrying.
Comment 1 Pascal Rapicault CLA 2007-01-24 11:23:25 EST
Created attachment 57439 [details]
Simple workspace
Comment 2 Pascal Rapicault CLA 2007-02-04 22:13:23 EST
Using the core tools, I dig a bit further however being not familiar with UI code I can not comment on what I see. However I do think it needs some close look from the experts.

First here is the stack trace of what caused the activation of the PDE UI plugin:
	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:278)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1245)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:147)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:242)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:238)
	at org.eclipse.ui.internal.registry.EditorDescriptor.getEditorMatchingStrategy(EditorDescriptor.java:618)
	at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:478)
	at org.eclipse.ui.internal.EditorManager.findEditors(EditorManager.java:428)
	at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:391)
	at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:373)
	at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:1914)
	at org.eclipse.ui.NavigationLocation.getEditorPart(NavigationLocation.java:44)
	at org.eclipse.ui.NavigationLocation.getText(NavigationLocation.java:60)
	at org.eclipse.ui.internal.NavigationHistoryEntry.<init>(NavigationHistoryEntry.java:49)
	at org.eclipse.ui.internal.NavigationHistory.createEntry(NavigationHistory.java:563)
	at org.eclipse.ui.internal.NavigationHistory.addEntry(NavigationHistory.java:316)
	at org.eclipse.ui.internal.NavigationHistory.access$9(NavigationHistory.java:300)
	at org.eclipse.ui.internal.NavigationHistory$2.run(NavigationHistory.java:168)



Now here is the stack trace of the org.eclipse.debug.ui activation:
	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:278)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1245)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:147)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:242)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:238)
	at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:120)
	at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:278)
	at org.eclipse.ui.internal.WWinPluginAction.refreshSelection(WWinPluginAction.java:275)
	at org.eclipse.ui.internal.WWinPluginAction.<init>(WWinPluginAction.java:121)
	at org.eclipse.ui.internal.WWinPluginPulldown.<init>(WWinPluginPulldown.java:188)
	at org.eclipse.ui.internal.ActionDescriptor.createAction(ActionDescriptor.java:263)
	at org.eclipse.ui.internal.ActionDescriptor.<init>(ActionDescriptor.java:170)
	at org.eclipse.ui.internal.PluginActionSetBuilder.createActionDescriptor(PluginActionSetBuilder.java:129)
	at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:158)
	at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
	at org.eclipse.ui.internal.registry.RegistryReader.readElementChildren(RegistryReader.java:127)
	at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:141)
	at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
	at org.eclipse.ui.internal.PluginActionSetBuilder.readActionExtensions(PluginActionSetBuilder.java:259)
	at org.eclipse.ui.internal.PluginActionSetBuilder.processActionSets(PluginActionSetBuilder.java:221)
	at org.eclipse.ui.internal.ActionPresentation.setActionSets(ActionPresentation.java:187)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets(WorkbenchWindow.java:2826)
	at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:2636)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2597)
	at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1982)
	at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2873)
	at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2821)
	at org.eclipse.ui.internal.Workbench$20.run(Workbench.java:1697)
	at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1437)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1695)
	at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1666)
	at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1545)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1489)
	at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)



And last but not least the stack trace for org.eclipse.jdt.debug.ui. (I 

	at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:278)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1245)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:147)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.core.internal.runtime.AdapterFactoryProxy.loadFactory(AdapterFactoryProxy.java:114)
	at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:280)
	at org.eclipse.core.internal.runtime.AdapterManager.loadAdapter(AdapterManager.java:300)
	at org.eclipse.debug.internal.ui.actions.RetargetAction.getAdapter(RetargetAction.java:144)
	at org.eclipse.debug.internal.ui.actions.RetargetAction.partActivated(RetargetAction.java:135)
	at org.eclipse.debug.internal.ui.actions.RetargetAction.init(RetargetAction.java:87)
	at org.eclipse.ui.internal.WWinPluginAction.initDelegate(WWinPluginAction.java:189)
	at org.eclipse.ui.internal.PluginAction.createDelegate(PluginAction.java:123)
	at org.eclipse.ui.internal.PluginAction.selectionChanged(PluginAction.java:278)
	at org.eclipse.ui.internal.WWinPluginAction.refreshSelection(WWinPluginAction.java:275)
	at org.eclipse.ui.internal.WWinPluginAction.<init>(WWinPluginAction.java:121)
	at org.eclipse.ui.internal.ActionDescriptor.createAction(ActionDescriptor.java:259)
	at org.eclipse.ui.internal.ActionDescriptor.<init>(ActionDescriptor.java:170)
	at org.eclipse.ui.internal.PluginActionSetBuilder.createActionDescriptor(PluginActionSetBuilder.java:132)
	at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:158)
	at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
	at org.eclipse.ui.internal.registry.RegistryReader.readElementChildren(RegistryReader.java:127)
	at org.eclipse.ui.internal.PluginActionBuilder.readElement(PluginActionBuilder.java:141)
	at org.eclipse.ui.internal.registry.RegistryReader.readElements(RegistryReader.java:138)
	at org.eclipse.ui.internal.PluginActionSetBuilder.readActionExtensions(PluginActionSetBuilder.java:259)
	at org.eclipse.ui.internal.PluginActionSetBuilder.processActionSets(PluginActionSetBuilder.java:221)
	at org.eclipse.ui.internal.ActionPresentation.setActionSets(ActionPresentation.java:187)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets(WorkbenchWindow.java:2826)
	at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:2636)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2597)
	at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1982)
	at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2873)
	at org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2821)
	at org.eclipse.ui.internal.Workbench$20.run(Workbench.java:1697)
	at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1437)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1695)
	at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1666)
	at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1545)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1489)
	at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)
Comment 3 Tod Creasey CLA 2007-02-05 07:53:19 EST
Adding Boris and paul as they own editors and action set respectively
Comment 4 Paul Webster CLA 2007-02-05 08:03:59 EST
ah, the ones that go through PluginAction.selectionChanged(*) are because bundles that are awaiting lazy activation moved from the RESOLVE state to the STARTING state in 3.3.

I have a patch in bug 171833 that should fix this.

PW
Comment 5 Paul Webster CLA 2007-02-05 08:13:25 EST
Ooops, this says 3.2.1 ... this wasn't a problem in 3.2.1, selectionChanged(*) will only load the delegate if the bundle was already active for some reason.

PW
Comment 6 Paul Webster CLA 2007-02-05 08:57:33 EST
OK, in 3.2.0 this is caused by the fix for bug 105936

PW
Comment 7 Paul Webster CLA 2007-02-05 09:00:16 EST
The EditorMatchingStrategy one is probably fine.

PW
Comment 8 Paul Webster CLA 2007-02-05 10:19:40 EST
(In reply to comment #6)
> OK, in 3.2.0 this is caused by the fix for bug 105936
>

Which was a fix for bug 90355 which looks like it was backed out.

PW

Comment 9 Paul Webster CLA 2007-02-06 07:34:51 EST
This was added:
    protected boolean isOkToCreateDelegate() {
    	if (getStyle() == IAction.AS_DROP_DOWN_MENU) {
    		return true;
    	}

it fills in the drop-down menus, but starts all plugins that declaratively add pull-down actions.

Some of the fix for bug 90355 was rolled back, but I don't know if all of it was.  I can remove the 3 lines, but then we should do testing of drop down actions in the SDK to make sure they haven't disappeared again (like bug 105936).

PW
Comment 10 Paul Webster CLA 2007-02-06 07:36:00 EST
Should this be investigated for 3.2.2, or just rolled into 3.3?
PW
Comment 11 Boris Bokowski CLA 2007-02-06 09:00:03 EST
> First here is the stack trace of what caused the activation of the PDE UI
> plugin:

This happened because the PDE editor defines its own editor matching strategy.  Apparently, all plug-ins defining such a matching strategy are loaded when restoring the active edit location from the navigation history.  There might be a workaround for this.
Comment 12 Mike Wilson CLA 2007-02-06 09:41:20 EST
re: for 3.2.2? 
    My reading of this is that we're unsure about the impact of removing those three lines of code. Given how late we are in the 3.2.2 cycle, that means that we should not attempt to fix this for 3.2.2. Let's make sure we understand the implications of the change, and fix for 3.3.

re: editor matching strategy
    Should that be covered by a separate bug?
Comment 13 Boris Bokowski CLA 2007-02-06 21:03:23 EST
> re: editor matching strategy
>     Should that be covered by a separate bug?

Filed bug 173216 for this.
Comment 14 Tod Creasey CLA 2007-10-29 09:43:24 EDT
Created attachment 81448 [details]
Screenshot of activated plug-ins

Here is a screenshot of your workspace using the core tools in build I20071023. I don't see anything here that shouldn't be - please reopen if I got this wrong.
Comment 15 Tod Creasey CLA 2007-10-29 09:46:55 EDT
Created attachment 81449 [details]
Current startup state

Here is a screenshot of the current startup state using your workspace (in I20071023) which doesn't seem  to have an issue currently. I am going to close this as Bug 173216 covers the editor issue and there doesn't seem to be a problem otherwise.
Comment 16 Tod Creasey CLA 2007-10-29 10:32:32 EDT
Created attachment 81462 [details]
Screenshot of activated plug-ins
Comment 17 Tod Creasey CLA 2007-10-29 10:35:44 EDT
Sorry about all of the updates - bugzilla had some issues.

Anyways closing this was as it appears that Bug 173216 not withstanding this problem is no longer an issue.