private static void handleMissingView(final Object id) { ExecutionException e = new ExecutionException("View could not be found: " + id); //$NON-NLS-1$ StatusUtil.handleStatus(e, StatusManager.SHOW); } }
/** * 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); } }
WorkspaceUndoUtil.getUIInfoAdapter(shellProvider.getShell())); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { recordError((CoreException)e.getCause()); } else { IDEWorkbenchPlugin.log(e.getMessage(), e); displayError(e.getMessage());
public void widgetSelected(SelectionEvent e) { Boolean isEnabled = pluginEnabled.getSelection(); //store.setValue(EditBox.PREF_ENABLED, isEnabled ); // no need // decorators are updated when state is toggled within Command Handler EnableEditBox toggleHandler = new EnableEditBox(); try { toggleHandler.execute(null); } catch (ExecutionException ex) { EditBox.logError(this, ex.getLocalizedMessage(), ex); } // toolbar item EditBox.toggleToolBarItemInAllWindows(isEnabled); } });
WorkspaceUndoUtil.getUIInfoAdapter(shellProvider.getShell())); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { return ((CoreException)e.getCause()).getStatus(); return new Status(IStatus.ERROR, IDEWorkbenchPlugin.IDE_WORKBENCH, e.getMessage(),e);
public void run(final IMarker marker) { final IProject proj = marker.getResource().getProject(); try { final IClasspathEntry cpEntry = getClasspathEntryForMarker(marker, cpEntryPath); if (add) { UpdateClasspathAttributeUtil.addDependencyAttribute(null, proj.getName(), cpEntry); } else { UpdateClasspathAttributeUtil.removeDependencyAttribute(null, proj.getName(), cpEntry); } } catch (CoreException ce){ ErrorDialog.openError(null, Resources.errorDialogTitle, Resources.errorDialogMessage, ce.getStatus()); } catch (ExecutionException ee){ ErrorDialog.openError(null, Resources.errorDialogTitle, Resources.errorDialogMessage, new Status(IStatus.ERROR, J2EEUIPlugin.PLUGIN_ID, 0, ee.getLocalizedMessage(), ee)); } } }
private String getCurrentBranch(Repository repository) throws ExecutionException { try { return repository.getBranch(); } catch (IOException e) { throw new ExecutionException(UIText.RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage, 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); }
null, WorkspaceUndoUtil.getUIInfoAdapter(getShell())); } catch (ExecutionException e) { if (e.getCause() instanceof CoreException) { ErrorDialog.openError( getShell(), MarkerMessages.Error, null, ((CoreException)e.getCause()).getStatus()); } else { IDEWorkbenchPlugin.log(e.getMessage(), e);
private String getFullBranch(Repository repository) throws ExecutionException { try { return repository.getFullBranch(); } catch (IOException e) { throw new ExecutionException( UIText.RebaseCurrentRefCommand_ErrorGettingCurrentBranchMessage, e); } } }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
public void widgetSelected(SelectionEvent selectionEvent) { try { action.execute(event); } catch (ExecutionException e) { Activator.logError(e.getMessage(), e); } }
public Object execute(ExecutionEvent event) throws ExecutionException { IJavaElement javaElement= (IJavaElement) event.getObjectParameterForExecution(PARAM_ID_ELEMENT_REF); try { IEditorPart editorPart= JavaUI.openInEditor(javaElement); JavaUI.revealInEditor(editorPart, javaElement); } catch (JavaModelException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } catch (PartInitException ex) { throw new ExecutionException("Error opening java element in editor", ex); //$NON-NLS-1$ } return null; }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, 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); }
private static void incorrectTypeFound(ExecutionEvent event, String name, Class expectedType, Class wrongType) throws ExecutionException { throw new ExecutionException("Incorrect type for " //$NON-NLS-1$ + name + " found while executing " //$NON-NLS-1$ + event.getCommand().getId() + ", expected " + expectedType.getName() //$NON-NLS-1$ + " found " + wrongType.getName()); //$NON-NLS-1$ }
private void handleException(ExecutionException e) throws CoreException { Throwable cause= e.getCause(); if (cause instanceof CoreException) { throw (CoreException)cause; } else { throw new CoreException(new Status( IStatus.ERROR, RefactoringCorePlugin.getPluginId(),IStatus.ERROR, RefactoringCoreMessages.RefactoringCorePlugin_internal_error, e)); } }
@Override public void run() { try { mergeHandler.execute(new ExecutionEvent()); } catch (ExecutionException e) { TeamUIPlugin.log(IStatus.ERROR, e.getMessage(), e); } }