List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL
String CANCEL_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_LABEL.
Click Source Link
From source file:com.google.gdt.eclipse.login.ui.LoginBrowser.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.google.gdt.eclipse.suite.preferences.ui.ErrorsWarningsPage.java
License:Open Source License
@Override public boolean performOk() { updateWorkingCopyFromCombos();/*from w w w .ja va 2 s . com*/ if (!GdtProblemSeverities.getInstance().equals(problemSeveritiesWorkingCopy)) { MessageDialog dialog = new MessageDialog(getShell(), "Errors/Warnings Settings Changed", null, "The Google Error/Warning settings have changed. A full rebuild " + "of all GWT/App Engine projects is required for changes to " + "take effect. Do the full build now?", MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 2); // Cancel // is // default int result = dialog.open(); if (result == 2) { // Cancel return false; } else { updateWorkspaceSeveritySettingsFromWorkingCopy(); if (result == 0) { // Yes BuilderUtilities.scheduleRebuildAll(GWTNature.NATURE_ID); } } } return true; }
From source file:com.google.gdt.eclipse.suite.wizards.CreateAppIdDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { // create Create and Cancel buttons createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); createButton(parent, IDialogConstants.CLIENT_ID, "Create", false); createBtn = getButton(IDialogConstants.CLIENT_ID); createBtn.addSelectionListener(new SelectionAdapter() { @Override/*from w w w . j a v a 2 s .c o m*/ public void widgetSelected(SelectionEvent e) { okPressed(); } }); createBtn.setEnabled(false); }
From source file:com.google.gwt.eclipse.core.preferences.ui.GwtPreferencePage.java
License:Open Source License
@Override protected Control createContents(Composite parent) { noDefaultAndApplyButton();// www. j a v a 2 s. c o m sdkSet = GWTPreferences.getSdks(); return new SdkTable<GWTRuntime>(parent, SWT.NONE, sdkSet, null, this) { @Override protected IStatus doAddSdk() { AddSdkDialog<GWTRuntime> addGaeSdkDialog = new AddGwtSdkDialog(getShell(), sdkSet, GWTPlugin.PLUGIN_ID, "Add Google Web Toolkit SDK", GWTRuntime.getFactory()); if (addGaeSdkDialog.open() == Window.OK) { GWTRuntime newSdk = addGaeSdkDialog.getSdk(); if (newSdk != null) { sdkSet.add(newSdk); } return Status.OK_STATUS; } return Status.CANCEL_STATUS; } @Override protected IStatus doDownloadSdk() { MessageDialog dialog = new MessageDialog(GWTPlugin.getActiveWorkbenchShell(), "Google Eclipse Plugin", null, "Would you like to open the Google Web Toolkit download page in your " + "web browser?\n\nFrom there, you can " + "download the latest GWT SDK and extract it to the" + " location of your choice. Add it to Eclipse" + " with the \"Add...\" button.", MessageDialog.QUESTION, new String[] { "Open Browser", IDialogConstants.CANCEL_LABEL }, 0); if (dialog.open() == Window.OK) { if (BrowserUtilities.launchBrowserAndHandleExceptions(GWTPlugin.SDK_DOWNLOAD_URL) == null) { return Status.CANCEL_STATUS; } } else { return Status.CANCEL_STATUS; } return Status.OK_STATUS; } }; }
From source file:com.heroku.eclipse.ui.git.HerokuCredentialsProvider.java
License:Open Source License
/** * Opens a dialog for a single non-user, non-password type item. * @param shell the shell to use/*from w w w .j a v a2 s . c om*/ * @param uri the uri of the get request * @param item the item to handle * @return <code>true</code> if the request was successful and values were supplied; * <code>false</code> if the user canceled the request and did not supply all requested values. */ private boolean getSingleSpecial(Shell shell, URIish uri, CredentialItem item) { if (item instanceof CredentialItem.InformationalMessage) { MessageDialog.openInformation(shell, UIText.EGitCredentialsProvider_information, item.getPromptText()); return true; } else if (item instanceof CredentialItem.YesNoType) { CredentialItem.YesNoType v = (CredentialItem.YesNoType) item; String[] labels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; int[] resultIDs = new int[] { IDialogConstants.YES_ID, IDialogConstants.NO_ID, IDialogConstants.CANCEL_ID }; MessageDialog dialog = new MessageDialog(shell, UIText.EGitCredentialsProvider_question, null, item.getPromptText(), MessageDialog.QUESTION_WITH_CANCEL, labels, 0); dialog.setBlockOnOpen(true); int r = dialog.open(); if (r < 0) { return false; } switch (resultIDs[r]) { case IDialogConstants.YES_ID: { v.setValue(true); return true; } case IDialogConstants.NO_ID: { v.setValue(false); return true; } default: // abort return false; } } else { // generically handles all other types of items return getMultiSpecial(shell, uri, item); } }
From source file:com.htmlhifive.tools.jslint.dialog.ConfirmLicenseDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true).setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); initialDataBinding();/*from w w w . j a va2 s .c om*/ textLicenseText.setText(license); }
From source file:com.htmlhifive.tools.jslint.dialog.CreateEngineDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); initialDataBinding();//w ww . j a va2 s. c o m setMessage(Messages.DL0027.getText(), IMessageProvider.INFORMATION); }
From source file:com.htmlhifive.tools.jslint.dialog.CreateOptionFileDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true).setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.iauto.mist.spec.m2t.uml2html.dialog.ModelURIChooseDialog.java
License:Open Source License
/** * Creates a new clean dialog.//w w w. j av a 2 s .c o m * * @param window * the window to create it in * @param selection * the currently selected projects (may be empty) */ public ModelURIChooseDialog(IWorkbenchWindow window, List<Model> mdlList, List<Model> selection) { super(window.getShell(), "Select Model URI", null, getQuestion(), NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); this.window = window; Collections.sort(mdlList, new Comparator<Model>() { public int compare(Model arg0, Model arg1) { return arg0.getName().compareTo(arg1.getName()); } }); this.original = mdlList; this.selection = selection.toArray(new Model[selection.size()]); if (this.selection == null) { this.selection = new Object[0]; } }
From source file:com.iauto.mist.spec.m2t.uml2html.dialog.StateMachineChooseDialog.java
License:Open Source License
/** * Creates a new clean dialog./*from ww w .ja v a2 s . c o m*/ * * @param window * the window to create it in * @param selection * the currently selected projects (may be empty) */ public StateMachineChooseDialog(IWorkbenchWindow window, List<StateMachine> smList, List<StateMachine> selection) { super(window.getShell(), "Select", null, getQuestion(), NONE, new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0); this.window = window; Collections.sort(smList, new Comparator<StateMachine>() { public int compare(StateMachine arg0, StateMachine arg1) { return arg0.getName().compareTo(arg1.getName()); } }); this.original = smList; this.selection = selection.toArray(new StateMachine[selection.size()]); if (this.selection == null) { this.selection = new Object[0]; } }