/** Deactivate the key bindings for an embedded editor. */ public void deactivate() { if (keyBindingService == null) { return; } INestableKeyBindingService service = (INestableKeyBindingService) parent.getKeyBindingService(); service.activateKeyBindingService(null); }
/** Returns a CompositeEditorKeybinding for an embedded editor. */ public IKeyBindingService getKeyBindingService() { if (keyBindingService == null) { INestableKeyBindingService service = (INestableKeyBindingService) parent.getKeyBindingService(); keyBindingService = service.getKeyBindingService(this); } return keyBindingService; }
/** Activate the key bindings for an embedded editor. */ public void activate() { if (keyBindingService == null) { return; } INestableKeyBindingService service = (INestableKeyBindingService) parent.getKeyBindingService(); service.activateKeyBindingService(this); // The workbench only calls updateActiveKeyBindingService() when a workbench part // becomes active. We have to explicitly call it since for the // workbench the active part has not changed. // TODO: find an alternative in Eclipse 3.0 for the following call: // ((Workbench) getWorkbenchWindow().getWorkbench()).updateActiveKeyBindingService(); // TODO: I've tried the following lines but they seem to be unnecessary since the key bindings // are working. // IWorkbench workbench = getWorkbenchWindow().getWorkbench(); // WorkbenchCommandSupport support = (WorkbenchCommandSupport) // workbench.getCommandSupport(); // support.processHandlerSubmissions(true, workbench.getDisplay().getActiveShell()); }
/** * @see org.eclipse.ui.IWorkbenchPartSite#getKeyBindingService() * @return * @deprecated */ @Deprecated public IKeyBindingService getKeyBindingService() { // TODO Auto-generated method stub return parentViewSite.getKeyBindingService(); }