@Override public boolean isHandled() { return command.isHandled(); }
@Override public boolean isHandled() { final Command baseCommand = command.getCommand(); return baseCommand.isHandled(); }
@Override public Map getAttributeValuesByName() { final Map attributeValues = new HashMap(); // avoid using Boolean.valueOf to allow compilation against JCL // Foundation (bug 80053) attributeValues.put(ILegacyAttributeNames.ENABLED, command.isEnabled() ? Boolean.TRUE : Boolean.FALSE); attributeValues.put(ILegacyAttributeNames.HANDLED, command.isHandled() ? Boolean.TRUE : Boolean.FALSE); return attributeValues; }
private void replaceWith(IHandler newHandler) { if (command.isHandled()) { handler= command.getHandler(); command.setHandler(newHandler); } } }
private void replaceWith(IHandler newHandler) { if (command.isHandled()) { handler= command.getHandler(); command.setHandler(newHandler); } } }
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(P2_INSTALL_COMMAND_HANDLER); if (command.isHandled()) { String linkedName = PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label; if(stubs.length == 0) {
@Override protected void handleDoubleClick(DoubleClickEvent anEvent) { ICommandService commandService = getViewSite().getService(ICommandService.class); Command openProjectCommand = commandService.getCommand(IWorkbenchCommandConstants.PROJECT_OPEN_PROJECT); if (openProjectCommand != null && openProjectCommand.isHandled() && openProjectCommand.isEnabled()) { IStructuredSelection selection = (IStructuredSelection) anEvent .getSelection(); Object element = selection.getFirstElement(); if (element instanceof IProject && !((IProject) element).isOpen()) { try { openProjectCommand.executeWithChecks(new ExecutionEvent()); } catch (CommandException ex) { IStatus status = WorkbenchNavigatorPlugin.createErrorStatus("'Open Project' failed", ex); //$NON-NLS-1$ WorkbenchNavigatorPlugin.getDefault().getLog().log(status); } return; } } super.handleDoubleClick(anEvent); }
private void handleInstallPluginConverter() { ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(P2_INSTALL_COMMAND_HANDLER); if (command.isHandled()) { IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); try { handlerService.executeCommand(P2_INSTALL_COMMAND_HANDLER, null); } catch (ExecutionException ex) { handleCommandException(); } catch (NotDefinedException ex) { handleCommandException(); } catch (NotEnabledException ex) { handleCommandException(); } catch (NotHandledException ex) { handleCommandException(); } } }
public IStatus runInUIThread(IProgressMonitor monitor) { ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER); if (command.isHandled()) { IHandlerService handlerService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); try { handlerService.executeCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER, null); } catch (ExecutionException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotDefinedException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotEnabledException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotHandledException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } } return Status.OK_STATUS; } };
@Override public IStatus runInUIThread(IProgressMonitor monitor) { ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER); if (command.isHandled()) { IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); try { handlerService.executeCommand(ApiErrorsWarningsConfigurationBlock.P2_INSTALL_COMMAND_HANDLER, null); } catch (ExecutionException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotDefinedException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotEnabledException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } catch (NotHandledException ex) { ApiErrorsWarningsConfigurationBlock.handleCommandException(); } } return Status.OK_STATUS; } };
ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); final Command command = commandService.getCommand(P2_INSTALL_COMMAND_HANDLER); if (command.isHandled()) { String linkedName = PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_link_label; if (stubs.length == 0) {
if (baseCommand.isHandled()) { firePropertyChange(IAction.HANDLED, Boolean.FALSE, Boolean.TRUE);