protected static boolean validateEdit(Shell shell, IStatus status) { if (status != null && status.getSeverity() == IStatus.ERROR) { // inform user String message = Messages.editorValidateEditFailureMessage; ErrorDialog.openError(shell, Messages.errorDialogTitle, message, status); // do not execute command return false; } return true; } }
protected void showError(CoreException e, Shell shell, String title, String message) { IStatus status= e.getStatus(); if (status != null) { ErrorDialog.openError(shell, message, title, status); } else { MessageDialog.openError(shell, title, message); } }
@Override public void run() { ErrorDialog .openError( messageShell, getProblemsTitle(), NLS .bind( IDEWorkbenchMessages.CopyFilesAndFoldersOperation_infoNotFound, fileName), null); } });
@Override public void run() { ErrorDialog.openError(messageShell, getProblemsTitle(), null, status); } });
public void run() { ErrorDialog.openError(getShell(), title, msg, fstatus); } }
protected void showError(CoreException e, Shell shell, String title, String message) { IStatus status= e.getStatus(); if (status != null) { ErrorDialog.openError(shell, message, title, status); } else { MessageDialog.openError(shell, title, message); } }
public void run() { String dialogTitle = "Exception:"; ErrorDialog.openError(getShell(), dialogTitle, null, status); } });
/** * Show an error dialog on the given exception. * * @param exception the exception to show in the dialog */ protected void errorDialog(CoreException exception) { ErrorDialog.openError(getShell(), null, null, exception.getStatus()); }
protected void presentStatusIfNeccessary() { IStatus status = null; // if (renameModuleOperation != null) { // status = renameModuleOperation.getStatus(); // } if (status == null || status.isOK()) return; ErrorDialog.openError(shell, null, null, status, IStatus.ERROR); } }
public void run() { IStatus stat = status; if (stat == null) { stat = new Status(IStatus.ERROR, SQLEditorPlugin.PLUGIN_ID, 0, error.getMessage() == null ? "" : error //$NON-NLS-1$ .getMessage(), error); } String title = Messages.common_error; ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, msg, stat); } }
public void run() { IStatus stat = status; if (stat == null) { stat = new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, error.getMessage() == null ? "" : error //$NON-NLS-1$ .getMessage(), error); } String title = Messages.common_error; ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), title, msg, stat); } }
private int openErrorDialog(IStatus status) { String message= CallHierarchyMessages.OpenCallHierarchyAction_messages_title; String dialogTitle= getErrorDialogTitle(); return ErrorDialog.openError(getShell(), dialogTitle, message, status); }
private static boolean checkInSync(IResource[] resources, Shell parent, String title) { IStatus status= Resources.checkInSync(resources); if (status.isOK()) return true; ErrorDialog.openError(parent, title, JavaUIMessages.ElementValidator_cannotPerform, status); return false; }
private static boolean checkInSync(IResource[] resources, Shell parent, String title) { IStatus status= Resources.checkInSync(resources); if (status.isOK()) return true; ErrorDialog.openError(parent, title, JavaUIMessages.ElementValidator_cannotPerform, status); return false; }
/** * Opens an error dialog using the editor's shell. * @param message error message to display * @param exception exception to display in details section */ public void showError(final String message, final CoreException exception) { Display display = getSite().getShell().getDisplay(); display.asyncExec(() -> ErrorDialog.openError(getSite().getShell(), PDEUIMessages.TargetEditor_4, message, exception.getStatus())); }
public boolean performAction() { try { NewSearchUI.runQueryInBackground(newQuery()); } catch (CoreException e) { ErrorDialog.openError(getShell(), SearchMessages.TextSearchPage_replace_searchproblems_title, SearchMessages.TextSearchPage_replace_searchproblems_message, e.getStatus()); return false; } return true; }
protected void perform(CoreException e, Shell shell, String title, String message) { IStatus status= e.getStatus(); JDIDebugUIPlugin.log(e); if (status != null) { ErrorDialog.openError(shell, title, message, status); } else { displayMessageDialog(e.getMessage(), shell, title, message); } }
@Override public void run() { IWorkspace workspace = ResourcesPlugin.getWorkspace(); IWorkspaceDescription description = workspace.getDescription(); description.setAutoBuilding(!description.isAutoBuilding()); try { workspace.setDescription(description); } catch (CoreException e) { ErrorDialog.openError(window.getShell(), null, null, e.getStatus()); } } }
@Override public void handleException(Throwable exception) { if (exception instanceof PartInitException) { PartInitException pie = (PartInitException) exception; ErrorDialog.openError(getSite().getShell(), SearchMessages.DefaultSearchViewPage_show_match, SearchMessages.DefaultSearchViewPage_error_no_editor, pie.getStatus()); } }
private boolean performValidateEdit(ICompilationUnit unit) { IStatus status= Resources.makeCommittable(unit.getResource(), JavaPlugin.getActiveWorkbenchShell()); if (!status.isOK()) { String label= CorrectionMessages.CUCorrectionProposal_error_title; String message= CorrectionMessages.CUCorrectionProposal_error_message; ErrorDialog.openError(JavaPlugin.getActiveWorkbenchShell(), label, message, status); return false; } return true; }