/** * Constructs a new instance of <code>ExecutionException</code> using an * instance of the new <code>ExecutionException</code>. * * @param e * The exception from which this exception should be created; * must not be <code>null</code>. * @since 3.1 */ public ExecutionException(final org.eclipse.core.commands.ExecutionException e) { super(e.getMessage(), e); } }
@Override public void dispose() { try { HandlerUtil.updateRadioState(this.projectPresetionCommand, Boolean.FALSE.toString()); } catch (ExecutionException ex) { WorkbenchNavigatorPlugin.log(ex.getMessage(), new Status(IStatus.ERROR, WorkbenchNavigatorPlugin.PLUGIN_ID, ex.getMessage(), ex)); } ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); }
public void widgetSelected(SelectionEvent selectionEvent) { try { action.execute(event); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); } }
public NestedProjectsContentProvider() { ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); this.projectPresetionCommand = commandService.getCommand(ProjectPresentationHandler.COMMAND_ID); try { HandlerUtil.updateRadioState(this.projectPresetionCommand, Boolean.TRUE.toString()); } catch (ExecutionException ex) { WorkbenchNavigatorPlugin.log(ex.getMessage(), new Status(IStatus.ERROR, WorkbenchNavigatorPlugin.PLUGIN_ID, ex.getMessage(), ex)); } ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); }
public void run() { try { mergeHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
@Override public void run() { try { markAsMergedHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
@Override public void run() { try { mergeHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
public void run() { try { markAsMergedHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
@Override public void run() { try { mergeHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } } };
public void run() { try { overwriteHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
@Override public void run() { try { overwriteHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
@Override public void run() { try { markAsMergedHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }
public void run(IAction action) { if (!shouldRunAction()) return; ExecutionEvent event = createExecutionEvent(); try { this.handler.execute(event); } catch (ExecutionException e) { Activator.handleError(e.getMessage(), e, true); } }
protected void performFinish(final IProgressMonitor monitor) throws CoreException { monitor.beginTask("", 10); //$NON-NLS-1$ storeDefaultSettings(); try { FacetProjectCreationOperation operation = new FacetProjectCreationOperation(model); this.fproj = operation.createProject(new SubProgressMonitor(monitor, 2)); super.performFinish(new SubProgressMonitor(monitor, 8)); final Set fixed = this.template.getFixedProjectFacets(); this.fproj.setFixedProjectFacets(fixed); try { getFacetProjectNotificationOperation().execute(new NullProgressMonitor(), null); } catch (ExecutionException e) { String msg = e.getMessage(); if( msg == null ) msg = ""; //$NON-NLS-1$ final IStatus st = new Status( IStatus.ERROR, WSTWebUIPlugin.PLUGIN_ID, 0, msg, e ); throw new CoreException( st ); } } finally { monitor.done(); } }
private void addCustomizeItem(final Menu menu) { final MenuItem customizeMenuItem = new MenuItem(menu, SWT.Activate); customizeMenuItem.setText(WorkbenchMessages.PerspectiveBar_customize); final IWorkbenchWindow workbenchWindow = window.getContext().get(IWorkbenchWindow.class); customizeMenuItem.addSelectionListener(widgetSelectedAdapter(event -> { if (perspSwitcherToolbar.isDisposed()) { return; } IHandlerService handlerService = workbenchWindow.getService(IHandlerService.class); IStatus status = Status.OK_STATUS; try { handlerService.executeCommand(IWorkbenchCommandConstants.WINDOW_CUSTOMIZE_PERSPECTIVE, null); } catch (ExecutionException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotDefinedException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotEnabledException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotHandledException e) { } if (!status.isOK()) { StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.LOG); } })); }
private void addResetItem(final Menu menu) { final MenuItem resetMenuItem = new MenuItem(menu, SWT.Activate); resetMenuItem.setText(WorkbenchMessages.PerspectiveBar_reset); final IWorkbenchWindow workbenchWindow = window.getContext().get(IWorkbenchWindow.class); workbenchWindow.getWorkbench().getHelpSystem().setHelp(resetMenuItem, IWorkbenchHelpContextIds.RESET_PERSPECTIVE_ACTION); resetMenuItem.addSelectionListener(widgetSelectedAdapter(event -> { if (perspSwitcherToolbar.isDisposed()) return; IHandlerService handlerService = workbenchWindow.getService(IHandlerService.class); IStatus status = Status.OK_STATUS; try { handlerService.executeCommand(IWorkbenchCommandConstants.WINDOW_RESET_PERSPECTIVE, null); } catch (ExecutionException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotDefinedException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotEnabledException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } catch (NotHandledException e) { } if (!status.isOK()) StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.LOG); })); }
/** * Run command with specified id * * @param service * @param id * @param event */ public static void executeCommand(IHandlerService service, String id, Event event) { try { service.executeCommand(id, event); } catch (ExecutionException e) { Activator.handleError(e.getMessage(), e, false); } catch (NotDefinedException e) { Activator.handleError(e.getMessage(), e, false); } catch (NotEnabledException e) { Activator.handleError(e.getMessage(), e, false); } catch (NotHandledException e) { Activator.handleError(e.getMessage(), e, false); } }
@Override public void setEnabled(Object evaluationContext) { if (evaluationContext instanceof IEvaluationContext) { IEvaluationContext ctx = (IEvaluationContext) evaluationContext; Object selection = getSelection(ctx); if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; if (sel.getFirstElement() instanceof RepositoryTreeNode) { RepositoryTreeNode node = (RepositoryTreeNode) sel.getFirstElement(); try { setBaseEnabled(getRemoteConfig(node) != null); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); setBaseEnabled(false); } return; } } } setBaseEnabled(false); }
@Override public void setEnabled(Object evaluationContext) { if (evaluationContext instanceof IEvaluationContext) { IEvaluationContext ctx = (IEvaluationContext) evaluationContext; Object selection = getSelection(ctx); if (selection instanceof IStructuredSelection) { IStructuredSelection sel = (IStructuredSelection) selection; if (sel.getFirstElement() instanceof RepositoryTreeNode) { RepositoryTreeNode node = (RepositoryTreeNode) sel.getFirstElement(); try { setBaseEnabled(getRemoteConfig(node) != null); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); setBaseEnabled(false); } return; } } } setBaseEnabled(false); }
public final Object execute(ExecutionEvent event) throws ExecutionException { if (!shouldRunAction()) return null; ICommandService srv = (ICommandService) getServiceLocator() .getService(ICommandService.class); Command command = srv.getCommand(commandId); try { return command.executeWithChecks(event); } catch (ExecutionException e) { Activator.handleError(e.getMessage(), e, true); } catch (NotDefinedException e) { Activator.handleError(e.getMessage(), e, true); } catch (NotEnabledException e) { Activator.handleError(e.getMessage(), e, true); } catch (NotHandledException e) { Activator.handleError(e.getMessage(), e, true); } return null; }