/** * 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(); }
@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); }
public static void handleCommandException() { MessageDialog.openError( PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); }
public static void handleCommandException() { MessageDialog.openError(PlatformUI.getWorkbench().getModalDialogShellProvider().getShell(), PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_title, PreferenceMessages.ApiProblemSeveritiesConfigurationBlock_checkable_ees_error_dialog_description); }
/** * Create the dialog for the receiver. If no pages are found, an informative * message dialog is presented instead. * * @return PreferenceDialog or <code>null</code> if no applicable pages * are found. * @since 3.1 */ public PreferenceDialog createDialog() { if (getStructuredSelection().isEmpty()) return null; return PropertyDialog .createDialogOn(shellProvider.getShell(), initialPageId, getStructuredSelection()); }
/** * Query for a new project name and destination using the parameters in the * existing project. * * @return Object [] or null if the selection is cancelled * @param project * the project we are going to copy. */ protected Object[] queryDestinationParameters(IProject project) { ProjectLocationSelectionDialog dialog = new ProjectLocationSelectionDialog( shellProvider.getShell(), project); dialog.setTitle(IDEWorkbenchMessages.CopyProjectAction_copyTitle); dialog.open(); return dialog.getResult(); }
private void runNonWorkspaceAction() { boolean performAction = MessageDialog.openConfirm( shellProvider.getShell(), UIText.DeleteResourcesOperationUI_confirmActionTitle, UIText.DeleteResourcesOperationUI_confirmActionMessage); if (!performAction) return; DeletePathsOperation operation = new DeletePathsOperation(paths); try { operation.execute(null); } catch (CoreException e) { Activator.handleError(UIText.DeleteResourcesOperationUI_deleteFailed, e, true); } }
/** * Query for a new project destination using the parameters in the existing * project. * * @return Object[] or null if the selection is cancelled * @param project * the project we are going to move. */ @Override protected Object[] queryDestinationParameters(IProject project) { ProjectLocationMoveDialog dialog = new ProjectLocationMoveDialog(shellProvider.getShell(), project); dialog.setTitle(IDEWorkbenchMessages.MoveProjectAction_moveTitle); dialog.open(); return dialog.getResult(); }
/** * Asks the user to confirm a delete operation, where the selection contains * only projects. Also remembers whether project content should be deleted. * * @param resources * the selected resources * @return <code>true</code> if the user says to go ahead, and * <code>false</code> if the deletion should be abandoned */ private boolean confirmDeleteProjects(List<? extends IResource> resources) { DeleteProjectDialog dialog = new DeleteProjectDialog(shellProvider.getShell(), resources); dialog.setTestingMode(fTestingMode); int code = dialog.open(); deleteContent = dialog.getDeleteContent(); return code == 0; // YES }
private void internalOpenDialog(final CompareEditorInput input) { Runnable runnable = () -> { CompareDialog dialog = new CompareDialog(PlatformUI .getWorkbench().getModalDialogShellProvider() .getShell(), input); dialog.open(); }; syncExec(runnable); }
private void initAction(){ shell = shellProvider.getShell(); setToolTipText(COPY_TOOL_TIP); setId(CopyProjectAction.ID); PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IIDEHelpContextIds.COPY_PROJECT_ACTION); }
@Override public void run() { IResource resource = getElement(getStructuredSelection()); if (resource != null) { DialogTaskProperties dialog = new DialogTaskProperties( shellProvider.getShell()); dialog.setResource(resource); dialog.open(); } }