ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
ErrorDialog dialog = new ErrorDialog(parentShell, title, message, status, displayMask); return dialog.open();
private void handleFinishedDropMove(DragSourceEvent event) { MultiStatus status= new MultiStatus( JavaPlugin.getPluginId(), IJavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_resource, null); List resources= convertSelection(); for (Iterator iter= resources.iterator(); iter.hasNext();) { IResource resource= (IResource) iter.next(); try { resource.delete(true, null); } catch (CoreException e) { status.add(e.getStatus()); } } if (status.getChildren().length > 0) { Shell parent= SWTUtil.getShell(event.widget); ErrorDialog error= new ErrorDialog(parent, JavaUIMessages.ResourceTransferDragAdapter_moving_resource, JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files, status, IStatus.ERROR); error.open(); } } }
private void handleFinishedDropMove(DragSourceEvent event) { MultiStatus status= new MultiStatus( JavaPlugin.getPluginId(), IJavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_resource, null); List<IResource> resources= convertSelection(); for (Iterator<IResource> iter= resources.iterator(); iter.hasNext();) { IResource resource= iter.next(); try { resource.delete(true, null); } catch (CoreException e) { status.add(e.getStatus()); } } int childrenCount= status.getChildren().length; if (childrenCount > 0) { Shell parent= SWTUtil.getShell(event.widget); ErrorDialog error= new ErrorDialog(parent, JavaUIMessages.ResourceTransferDragAdapter_moving_resource, childrenCount == 1 ? JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_singular : Messages.format( JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_plural, String.valueOf(childrenCount)), status, IStatus.ERROR); error.open(); } } }
private void handleFinishedDropMove(DragSourceEvent event) { MultiStatus status= new MultiStatus( JavaPlugin.getPluginId(), IJavaStatusConstants.INTERNAL_ERROR, JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_resource, null); List<IResource> resources= convertSelection(); for (Iterator<IResource> iter= resources.iterator(); iter.hasNext();) { IResource resource= iter.next(); try { resource.delete(true, null); } catch (CoreException e) { status.add(e.getStatus()); } } int childrenCount= status.getChildren().length; if (childrenCount > 0) { Shell parent= SWTUtil.getShell(event.widget); ErrorDialog error= new ErrorDialog(parent, JavaUIMessages.ResourceTransferDragAdapter_moving_resource, childrenCount == 1 ? JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_singular : Messages.format( JavaUIMessages.ResourceTransferDragAdapter_cannot_delete_files_plural, String.valueOf(childrenCount)), status, IStatus.ERROR); error.open(); } } }
/** * @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; } }
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(); }
private void handle(Change change, IStatus status) { if (change instanceof CompositeChange) { Change undo= ((CompositeChange)change).getUndoUntilException(); if (undo != null) { RefactoringUIPlugin.log(status); final ErrorDialog dialog= new RefactorErrorDialog(fParent, RefactoringUIMessages.ChangeExceptionHandler_refactoring, Messages.format(RefactoringUIMessages.ChangeExceptionHandler_unexpected_exception, 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, RefactoringUIMessages.ChangeExceptionHandler_refactoring, Messages.format(RefactoringUIMessages.ChangeExceptionHandler_unexpected_exception, fName), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); dialog.open(); }
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, change.getName(), 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, change.getName(), Messages.format(RefactoringMessages.ChangeExceptionHandler_dialog_message, fName), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); dialog.open(); }
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, change.getName(), 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, change.getName(), Messages.format(RefactoringMessages.ChangeExceptionHandler_dialog_message, fName), status, IStatus.OK | IStatus.INFO | IStatus.WARNING | IStatus.ERROR); dialog.open(); }