Community
Participate
Working Groups
Around Eclipse 3.3 M6 our editor actions stopped working for multipage editors. I believe the problem is in org.eclipse.ui.actions.ContributedAction. It is expecting locator to be an instance of PartSite when it does not necessarily have to be. It looks like locator can just be an instance of IWorkbenchPartSite. (EditorPartSite is an instance of PartSite, but MultiPageEditorSite is not) **The constructor should be changed from: if (locator instanceof PartSite) { updateSiteAssociations((PartSite) locator, commandId, actionId, element); } **to: if (locator instanceof IWorkbenchPartSite) { updateSiteAssociations((IWorkbenchPartSite) locator, commandId, actionId, element); } **And private void updateSiteAssociations(PartSite site, String commandId, String actionId, IConfigurationElement element) { **should be changed to private void updateSiteAssociations(IWorkbenchPartSite site, String commandId, String actionId, IConfigurationElement element) {
Created attachment 65701 [details] org.eclipse.ui.workbench.patch Here is a patch (based on latest code from head) with the fix.
Released to HEAD for I20070503-0010 PW
Now the "part" listener is incorrect PW
Created attachment 65754 [details] Update the dispose listener If we're a "version" of MultiPageEditorSite, listener for the real editor close, not the inner editor. PW
Fixed in HEAD PW
Amy, could you please verify this using I20070503-1400? It works for me. PW
I just tried it and it looks like if i invoke an action, the action then becomes disabled until i switch focus to another part and then come back.
I probably won't be able to fix that for M7, it'll have to be RC1 (2 weeks). Could you please open another bug? Also, what would be an easily replicatable test case I could try here? The MultiPageEditorPart example has actions like Add task and add bookmark, and they seem to work. Is there something simple I could add to that example that would show the disabled behaviour? (IIRC, it has a text editor and 2 "pages") Thanx, PW
Thanks for fixing this bug so quickly. I've opened bug 185475 to track the new issue. I'll try to come up with some sort of example you can use. I noted this in bug 185475, but I think the issue is with what is the active editor/part.
verified using Eclipse 3.3 I20070508-0800. Thanks!