Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 399831
Collapse All | Expand All

(-)a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/KeyBindingService.java (-2 / +10 lines)
Lines 326-331 public final class KeyBindingService implements INestableKeyBindingService { Link Here
326
326
327
        unregisterAction(action);
327
        unregisterAction(action);
328
328
329
		IWorkbenchPartSite partSite = workbenchPartSite;
330
		if (parent != null) {
331
			KeyBindingService currentParent = parent;
332
			while (currentParent != null) {
333
				partSite = currentParent.workbenchPartSite;
334
				currentParent = currentParent.parent;
335
			}
336
		}
337
329
		String commandId = action.getActionDefinitionId();
338
		String commandId = action.getActionDefinitionId();
330
		if (commandId != null) {
339
		if (commandId != null) {
331
			for (IAction registeredAction : actionToProxy.keySet()) {
340
			for (IAction registeredAction : actionToProxy.keySet()) {
Lines 340-347 public final class KeyBindingService implements INestableKeyBindingService { Link Here
340
			IHandlerService hs = (IHandlerService) workbenchPartSite
349
			IHandlerService hs = (IHandlerService) workbenchPartSite
341
					.getService(IHandlerService.class);
350
					.getService(IHandlerService.class);
342
			actionToProxy.put(action, hs.activateHandler(commandId, new ActionHandler(action),
351
			actionToProxy.put(action, hs.activateHandler(commandId, new ActionHandler(action),
343
					new LegacyHandlerSubmissionExpression(null, workbenchPartSite.getShell(),
352
					new LegacyHandlerSubmissionExpression(null, partSite.getShell(), partSite)));
344
							workbenchPartSite)));
345
353
346
		}
354
		}
347
    }
355
    }
(-)a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/LegacyHandlerService.java (+3 lines)
Lines 244-249 public class LegacyHandlerService implements IHandlerService { Link Here
244
		if (handlerActivations == null) {
244
		if (handlerActivations == null) {
245
			handlerActivations = new ArrayList();
245
			handlerActivations = new ArrayList();
246
		} else {
246
		} else {
247
			if (handlerActivations.contains(eActivation)) {
248
				return;
249
			}
247
			handlerActivations = new ArrayList(handlerActivations);
250
			handlerActivations = new ArrayList(handlerActivations);
248
		}
251
		}
249
		handlerActivations.add(eActivation);
252
		handlerActivations.add(eActivation);

Return to bug 399831