@Override public void messageStatus(IStatus status, String title) { ErrorDialog.openError(this.shell, title, null, status); }
ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
createMessageArea(composite); createSupportArea(parent); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; composite.setLayout(layout);
public void run() { dialog.open(); } });
@Override protected Control createMessageArea (Composite parent) { Control result= super.createMessageArea(parent); new Label(parent, SWT.NONE); // filler Label label= new Label(parent, SWT.NONE); label.setText(RefactoringMessages.ChangeExceptionHandler_message); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); applyDialogFont(result); return result; } }
/** * @see IStatusHandler#handleStatus(IStatus, Object) */ public Object handleStatus(IStatus status, Object source) throws CoreException { IJavaThread thread= (IJavaThread) source; final ErrorDialog dialog= new ErrorDialog(JDIDebugUIPlugin.getActiveWorkbenchShell(), DebugUIMessages.SuspendTimeoutHandler_suspend, MessageFormat.format(DebugUIMessages.SuspendTimeoutHandler_timeout_occurred, new String[] {thread.getName()}), status, IStatus.WARNING | IStatus.ERROR | IStatus.INFO); // Display display= JDIDebugUIPlugin.getStandardDisplay(); display.syncExec(new Runnable() { public void run() { dialog.open(); } }); return null; } }
public void run() { ErrorDialog dialog = new ErrorDialog(getShell(), TeamUIMessages.ModelMergeOperation_0, TeamUIMessages.ModelMergeOperation_1, status, IStatus.ERROR | IStatus.WARNING | IStatus.INFO) { protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.YES_ID, IDialogConstants.YES_LABEL, false); createButton(parent, IDialogConstants.NO_ID, IDialogConstants.NO_LABEL, true); createDetailsButton(parent); } /* (non-Javadoc) * @see org.eclipse.jface.dialogs.ErrorDialog#buttonPressed(int) */ protected void buttonPressed(int id) { if (id == IDialogConstants.YES_ID) super.buttonPressed(IDialogConstants.OK_ID); else if (id == IDialogConstants.NO_ID) super.buttonPressed(IDialogConstants.CANCEL_ID); super.buttonPressed(id); } }; int code = dialog.open(); result[0] = code == 0; } };
protected Control createMessageArea (Composite parent) { Control result= super.createMessageArea(parent); new Label(parent, SWT.NONE); // filler Label label= new Label(parent, SWT.NONE); label.setText(RefactoringMessages.ChangeExceptionHandler_message); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); applyDialogFont(result); return result; } }
/** * Open a dialog window. * * @param shell a shell * @param message a message * @param status a status */ public static void openError(Shell shell, String message, IStatus status) { ErrorDialog.openError(shell, Messages.errorDialogTitle, message, status); }
ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
int code = dialog.open(); result[0] = code == 0; };
createMessageArea(composite); createSupportArea(parent); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; composite.setLayout(layout);
@Override protected Control createMessageArea (Composite parent) { Control result= super.createMessageArea(parent); new Label(parent, SWT.NONE); // filler Label label= new Label(parent, SWT.NONE); label.setText(RefactoringMessages.ChangeExceptionHandler_message); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); applyDialogFont(result); return result; } }
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; } }
ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
int code = dialog.open(); result[0] = code == 0; };
createMessageArea(composite); createSupportArea(parent); GridLayout layout = new GridLayout(); layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); layout.numColumns = 2; composite.setLayout(layout);
protected Control createMessageArea (Composite parent) { Control result= super.createMessageArea(parent); new Label(parent, SWT.NONE); // filler Label label= new Label(parent, SWT.NONE); label.setText(RefactoringUIMessages.ChangeExceptionHandler_button_explanation); label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); applyDialogFont(result); return result; } }
private void reportStatus(Display display, IStatus status) { String title = (status.getSeverity() >= IStatus.ERROR) ? "Error" : "Warning"; ErrorDialog.openError(null, title, null, status); }
private void handle(Change change, IStatus status) { if (change instanceof CompositeChange) { Change undo= ((CompositeChange)change).getUndoUntilException(); if (undo != null) { JavaPlugin.log(status); final ErrorDialog dialog= new RefactorErrorDialog(fParent, RefactoringMessages.ChangeExceptionHandler_dialog_title, Messages.format(RefactoringMessages.ChangeExceptionHandler_dialog_message, fName), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); int result= dialog.open(); if (result == IDialogConstants.OK_ID) { performUndo(undo); } return; } } ErrorDialog dialog= new ErrorDialog(fParent, RefactoringMessages.ChangeExceptionHandler_dialog_title, Messages.format(RefactoringMessages.ChangeExceptionHandler_dialog_message, fName), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); dialog.open(); }