Index: Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java,v retrieving revision 1.53 diff -u -r1.53 KeyBindingService.java --- Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java 5 May 2004 00:42:20 -0000 1.53 +++ Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java 21 Jun 2004 17:05:22 -0000 @@ -472,8 +472,8 @@ // Create the new submission IHandler handler = new ActionHandler(action); HandlerSubmission handlerSubmission = new HandlerSubmission(null, - null, workbenchPartSite, commandId, handler, - Priority.MEDIUM); + workbenchPartSite.getShell(), workbenchPartSite, commandId, + handler, Priority.MEDIUM); handlerSubmissionsByCommandId.put(commandId, handlerSubmission); // Either submit the new handler myself, or simply re-activate. Index: Eclipse UI/org/eclipse/ui/internal/commands/ws/WorkbenchCommandSupport.java =================================================================== RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/ws/WorkbenchCommandSupport.java,v retrieving revision 1.44 diff -u -r1.44 WorkbenchCommandSupport.java --- Eclipse UI/org/eclipse/ui/internal/commands/ws/WorkbenchCommandSupport.java 17 Jun 2004 02:11:13 -0000 1.44 +++ Eclipse UI/org/eclipse/ui/internal/commands/ws/WorkbenchCommandSupport.java 21 Jun 2004 17:05:22 -0000 @@ -419,6 +419,8 @@ final Map contextTree = contextSupport .createFilteredContextTreeFor(contextSupport .getContextManager().getEnabledContextIds()); + final boolean dialogOpen = contextTree + .containsKey(IWorkbenchContextSupport.CONTEXT_ID_DIALOG); for (Iterator iterator = handlerSubmissionsByCommandId.entrySet() .iterator(); iterator.hasNext();) { @@ -449,7 +451,8 @@ } if ((activeShell2 != null) && (activeShell2 != activeShell) - && (activeShell2 != wbWinShell)) continue; + && ((activeShell2 != wbWinShell) || dialogOpen)) + continue; if (bestHandlerSubmission == null) { bestHandlerSubmission = handlerSubmission; @@ -466,8 +469,7 @@ if ((bestHandlerSubmission.getHandler() instanceof HandlerProxy) && (currentMatch <= MATCH_PARTIAL) - && (contextTree - .containsKey(IWorkbenchContextSupport.CONTEXT_ID_DIALOG))) { + && (dialogOpen)) { /* * TODO This is a workaround for the fact that there * is no API to specify the shell for handlers @@ -494,9 +496,7 @@ } } else if ((handlerSubmission.getHandler() instanceof HandlerProxy) - && (bestMatch <= MATCH_PARTIAL) - && (contextTree - .containsKey(IWorkbenchContextSupport.CONTEXT_ID_DIALOG))) { + && (bestMatch <= MATCH_PARTIAL) && (dialogOpen)) { /* * TODO This is a workaround for the fact that there * is no API to specify the shell for handlers