protected void okPressed() {
    // CODINGSPECTATOR: This method gets invoked when the user presses OK. So, record the time of
    // the occurrence of this event.
    fWizard.addNavigationHistoryItem(
        new NavigationHistoryItem(fCurrentPage.getName(), IDialogConstants.OK_LABEL));

    IWizardPage current = fCurrentPage;
    saveInitialSize();
    if (fWizard.performFinish()) {
      saveSize();
      super.okPressed();
      return;
    }
    if (fCurrentPage == current) return;
    Assert.isTrue(IErrorWizardPage.PAGE_NAME.equals(fCurrentPage.getName()));
    if (fHasAdditionalPages) {
      // Show error page as a normal page
      showCurrentPage();
    } else if (showErrorDialog((ErrorWizardPage) fCurrentPage)) {
      // Show error page as a dialog
      if (fWizard.performFinish()) {
        super.okPressed();
        return;
      }
    }
  }
 @Override
 protected void okPressed() {
   if (currentExpressionEditor != null) {
     currentExpressionEditor.okPressed();
   }
   super.okPressed();
 }
  /*
   * (non-Javadoc)
   *
   * @see org.eclipse.jface.dialogs.Dialog#okPressed()
   */
  protected void okPressed() {
    String result = getNameCheckResult();
    if (result != null) {
      MessageBox mb = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_WARNING);
      mb.setText(
          Messages.getString("HyperlinkEditorDialog.HyperlinkName.Title.Warning")); // $NON-NLS-1$
      mb.setMessage(result);
      mb.open();
      fTxtHyperlinkLabel.setFocus();
      return;
    }

    if (fsBaseURL == null) {
      MessageBox mb = new MessageBox(Display.getDefault().getActiveShell(), SWT.ICON_WARNING);
      mb.setText(
          Messages.getString("HyperlinkEditorDialog.HyperlinkName.Title.Warning")); // $NON-NLS-1$
      mb.setMessage(Messages.getString("HyperlinkEditorDialog.BaseURL.Message")); // $NON-NLS-1$
      mb.open();
      fTxtHyperlinkLabel.setFocus();
      return;
    }
    fURLValue.getLabel().getCaption().setValue(fTxtHyperlinkLabel.getText().trim());
    fURLValue.setBaseUrl(fsBaseURL);
    fURLValue.setBaseParameterName(fTxtBaseParm.getText());
    fURLValue.setSeriesParameterName(fTxtSeriesParm.getText());
    fURLValue.setValueParameterName(fTxtValueParm.getText());
    super.okPressed();
  }
Beispiel #4
0
 /* (non-Javadoc)
  * @see org.eclipse.jface.dialogs.Dialog#okPressed()
  */
 protected void okPressed() {
   String text = getValue();
   try {
     DebugUIPlugin.getDefault()
         .getPreferenceStore()
         .setValue(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH, Integer.parseInt(text));
   } catch (NumberFormatException e) {
     DebugUIPlugin.log(e);
   }
   super.okPressed();
 }
 @Override
 protected void okPressed() {
   if (okButton.isEnabled()) {
     super.okPressed();
   }
 }