/** * Returns the shell in which to show any dialogs * @return The shell for parenting dialogs; never <code>null</code>. */ Shell getShell() { return shellProvider.getShell(); }
private Shell getShell() { return shellProvider.getShell(); } }
/** * Returns the shell for this action. This shell is used for the modal * progress and error dialogs. * * @return the shell */ Shell getShell() { return shellProvider.getShell(); }
/** * Returns parent shell, under which this window's shell is created. * * @return the parent shell, or <code>null</code> if there is no parent * shell */ protected Shell getParentShell() { Shell parent = parentShell.getShell(); int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL; if ((getShellStyle() & modal) != 0) { // If this is a modal shell with no parent, pick a shell using defaultModalParent. if (parent == null) { parent = defaultModalParent.getShell(); } } return parent; }
/** * Returns parent shell, under which this window's shell is created. * * @return the parent shell, or <code>null</code> if there is no parent * shell */ protected Shell getParentShell() { Shell parent = parentShell.getShell(); int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL; if ((getShellStyle() & modal) != 0) { // If this is a modal shell with no parent, pick a shell using defaultModalParent. if (parent == null) { parent = defaultModalParent.getShell(); } } return parent; }
/** * Returns parent shell, under which this window's shell is created. * * @return the parent shell, or <code>null</code> if there is no parent * shell */ protected Shell getParentShell() { Shell parent = parentShell.getShell(); int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL; if ((getShellStyle() & modal) != 0) { // If this is a modal shell with no parent, pick a shell using defaultModalParent. if (parent == null) { // RAP [if] Session scoped defaultModalParent // parent = defaultModalParent.getShell(); parent = getDefaultModalParent().getShell(); } } return parent; }
@Override public void done(final IJobChangeEvent event) { ((InternalSaveable) model).setBackgroundSaveJob(null); shellProvider.getShell().getDisplay().asyncExec( () -> { notifySaveAction(parts); model.enableUI(parts); }); } });
/** * Opens an error dialog to display the given message. * <p> * Note that this method must be called from UI thread. * </p> * * @param message * the message */ void displayError(String message) { MessageDialog.openError(this.shellProvider.getShell(), getErrorsTitle(), message); }
@Override public void widgetSelected(SelectionEvent e) { MavenDiscovery.launchWizard(workbench.getModalDialogShellProvider().getShell()); } });
/** * Return a shell appropriate for parenting dialogs of this handler. * @return a Shell */ protected Shell getShell() { return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(); } }
/** * Returns a shell that is appropriate to use as the parent * for a modal dialog. */ public static Shell getDefaultParentShell() { return PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(); }
/** * Creates a warning message dialog. The message area will contain the scrollable * text box that will show the list of the projects supplied. * * @param warningMessage * the warning message to be shown on the dialog. * @param namesOfNotImportedProjects * the list of the project names that did not get imported. */ public NotImportedProjectsWarningDialog(String warningMessage, List<String> namesOfNotImportedProjects) { super(PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), PDEUIMessages.ImportWizard_title, null, warningMessage, MessageDialog.WARNING, new String[] {IDialogConstants.OK_LABEL}, 0); fNamesOfNotImportedProjects = namesOfNotImportedProjects; }
/** * Opens an error dialog to display the given message. * <p> * Note that this method must be called from UI thread. * </p> * * @param message * the message */ void displayError(String message) { if (message == null) { message = IDEWorkbenchMessages.WorkbenchAction_internalError; } MessageDialog.openError(shellProvider.getShell(), getProblemsTitle(), message); }
private void handleStatus(final IStatus status) { if(status.isOK()) { return; } if(shellProvider instanceof WizardPage) { shellProvider.getShell().getDisplay().asyncExec(new Runnable() { public void run() { // Display the error in the wizard header int messageType = IMessageProvider.INFORMATION; if(status.matches(IStatus.ERROR)) { messageType = IMessageProvider.ERROR; } else if(status.matches(IStatus.WARNING)) { messageType = IMessageProvider.WARNING; } ((WizardPage) shellProvider).setMessage(status.getMessage(), messageType); StatusManager.getManager().handle(status); } }); } else { StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.BLOCK | StatusManager.LOG); } }
public static void handleCommandException() { MessageDialog.openError( PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); }
return MessageDialog.openQuestion(shellProvider.getShell(), title, msg);
public static void handleCommandException() { MessageDialog.openError(PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); }
PlatformUI.PLUGIN_ID, 0, title, targetExc)); StatusUtil.handleStatus(title, targetExc, StatusManager.SHOW, shellProvider.getShell());
@Override public void run() { final ProgressMonitorDialog progressMonitorDialog = new ProgressMonitorDialog(this.shellProvider.getShell()); try { final UpdateRunner updateRunner = builder.append(MessageFormat.format("\t{0,number,########0} Packages\n", workspace.getPackages().size())); builder.append(MessageFormat.format("\t{0,number,########0} Types\n", workspace.getTypes().size())); MessageDialog.openInformation(this.shellProvider.getShell(), PROJECT_DEPENDENCIES, builder.toString()); } catch (final InvocationTargetException e) { this.logger.log(Level.ERROR, ERROR_MESSAGE, e.getCause()); final Status status = new Status(IStatus.ERROR, PROJECT_DEPENDENCIES, IStatus.ERROR, ERROR_MESSAGE, e.getCause()); DependenciesPlugin.getDefault().getLog().log(status); ErrorDialog.openError(this.shellProvider.getShell(), PROJECT_DEPENDENCIES, ERROR_MESSAGE, status); } catch (final RuntimeException e) { this.logger.log(Level.ERROR, ERROR_MESSAGE, e); final Status status = new Status(IStatus.ERROR, PROJECT_DEPENDENCIES, IStatus.ERROR, ERROR_MESSAGE, e); DependenciesPlugin.getDefault().getLog().log(status); ErrorDialog.openError(this.shellProvider.getShell(), PROJECT_DEPENDENCIES, ERROR_MESSAGE, status); } catch (final InterruptedException e) {