List of usage examples for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID
int CANCEL_ID
To view the source code for org.eclipse.jface.dialogs IDialogConstants CANCEL_ID.
Click Source Link
From source file:com.google.dart.tools.search.internal.ui.util.ExtendedDialogWindow.java
License:Open Source License
/** * Add buttons to the dialog's button bar. Subclasses may override. * /*w ww. j a v a 2 s . c om*/ * @param parent the button bar composite */ @Override protected void createButtonsForButtonBar(Composite parent) { fCancelButton = createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.google.dart.tools.search2.internal.ui.SearchHistorySelectionDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OPEN_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.google.dart.tools.ui.feedback.FeedbackDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, FeedbackMessages.FeedbackDialog_OK_Button_Text, true);/*from w ww .ja v a2 s .co m*/ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); updateEnablement(); }
From source file:com.google.dart.tools.ui.feedback.FeedbackDialog2.java
License:Open Source License
/** * Create contents of the button bar./*from w w w. j a va2 s . com*/ * * @param parent */ @Override protected void createButtonsForButtonBar(Composite parent) { okButton = createButton(parent, IDialogConstants.OK_ID, "Send Feedback", true); cancelButton = createButton(parent, IDialogConstants.CANCEL_ID, "Cancel", false); updateEnablement(); }
From source file:com.google.dart.tools.ui.internal.dialogs.MultiElementListSelectionDialog.java
License:Open Source License
@Override protected void createButtonsForButtonBar(Composite parent) { fBackButton = createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); fNextButton = createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, true); fFinishButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:com.google.dart.tools.ui.internal.dialogs.SourceActionDialog.java
License:Open Source License
@Override protected void buttonPressed(int buttonId) { switch (buttonId) { case IDialogConstants.OK_ID: { okPressed();//from w w w . ja v a2 s . c om break; } case IDialogConstants.CANCEL_ID: { cancelPressed(); break; } } }
From source file:com.google.dart.tools.ui.internal.refactoring.actions.RefactoringStarter.java
License:Open Source License
public boolean activate(RefactoringWizard wizard, Shell parent, String dialogTitle, int saveMode) { RefactoringSaveHelper saveHelper = new RefactoringSaveHelper(saveMode); if (!canActivate(saveHelper, parent)) { return false; }//from www .j av a 2 s .c o m try { RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard); int result = op.run(parent, dialogTitle); fStatus = op.getInitialConditionCheckingStatus(); if (result == IDialogConstants.CANCEL_ID || result == RefactoringWizardOpenOperation.INITIAL_CONDITION_CHECKING_FAILED) { saveHelper.triggerIncrementalBuild(); return false; } else { return true; } } catch (InterruptedException e) { return false; // User action got cancelled } }
From source file:com.google.gapid.views.ActivityPickerDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { Button ok = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); ok.setEnabled(false);/*from www. j a v a2 s . c o m*/ tree.getTree().addListener(SWT.Selection, e -> ok.setEnabled(selected != null)); }
From source file:com.google.gapid.views.SettingsDialog.java
License:Apache License
@Override protected void createButtonsForButtonBar(Composite parent) { createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); }
From source file:com.google.gdt.eclipse.appsmarketplace.ui.ListOnMarketplaceDialog.java
License:Open Source License
@Override protected void okPressed() { if (listingInProgress == false) { listingInProgress = true;//from ww w. j a v a2 s .c o m if (listingType == ListingType.UPDATE) { String message = new String("This will overwrite you existing application listing \"" + DataStorage.getAppListings().get(listingCombo.getSelectionIndex()).name + "\" on Google Apps Marketplace.\n\nDo you want to continue ?"); final MessageDialog messageDialog = new MessageDialog(Display.getDefault().getActiveShell(), "Update Application Listing on Google Apps Marketplace", null, message, MessageDialog.QUESTION, new String[] { "OK", "Cancel" }, 1); if (messageDialog.open() != Window.OK) { super.okPressed(); return; } } deploymentStatus = deployAppsMarketplaceListing(); String messageTitle = new String(); String messageText = new String(); if (deploymentStatus) { try { AppsMarketplaceProjectProperties.setAppListingAlreadyListed(project, true); String consumerKey = DataStorage.getListedAppListing().consumerKey; String consumerSecret = DataStorage.getListedAppListing().consumerSecret; AppsMarketplaceProjectProperties.setAppListingConsumerKey(project, consumerKey); AppsMarketplaceProjectProperties.setAppListingConsumerSecret(project, consumerSecret); } catch (BackingStoreException e) { // Consume exception AppsMarketplacePluginLog.logError(e); } messageTitle = "Successfully created private listing on Google Apps Marketplace"; messageText = "Successfully listed application \'" + appNameText.getText() + "\'" + " on Google Apps Marketplace." + " Click <a href=\"#\">here</a> to view details."; } else { messageTitle = "Failed to created listing on Google Apps Marketplace"; messageText = "Failed to list application \'" + appNameText.getText() + "\'" + " on Google Apps Marketplace." + " Click <a href=\"#\">here</a> to manually create listing."; } this.setMessage(""); this.setTitle(messageTitle); disposeDialogArea(); Composite container = (Composite) this.getDialogArea(); createDescribeLinkArea(container, 1); describeLink.setText(messageText); container.layout(true); getButton(IDialogConstants.CANCEL_ID).setVisible(false); deployButton.setText(FINISH_TEXT); describeLink.addSelectionListener(new DescribeListener()); getShell().redraw(); } else { if (deploymentStatus) { try { String consumerKey = AppsMarketplaceProjectProperties.getAppListingConsumerKey(project); String consumerSecret = AppsMarketplaceProjectProperties.getAppListingConsumerSecret(project); // Set the consumerKey and consumerSecret in web.xml. // Operation may fail. appsMarketplaceProject.setOAuthParams(consumerKey, consumerSecret, true); } catch (CoreException e) { // Consume exception AppsMarketplacePluginLog.logError(e); } } super.okPressed(); } }