Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialog.open()


    {

        MessageDialog dialog = new MessageDialog( ApacheDsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()
            .getShell(), "Error!", null, message, MessageDialog.ERROR, new String[]
            { IDialogConstants.OK_LABEL }, MessageDialog.OK );
        dialog.open();
    }
   
    /**
     * Gets the server configuration.
     *
 
View Full Code Here


    String[] buttonLabels = new String[2];
    buttonLabels[0] = Messages.getString("MultiPageEditor.revertToLastValid"); //$NON-NLS-1$
    buttonLabels[1] = Messages.getString("MultiPageEditor.EditExisting"); //$NON-NLS-1$
    MessageDialog dialog = new MessageDialog(getEditorSite().getShell(), msg, null, msgDetails,
            MessageDialog.WARNING, buttonLabels, 0);
    dialog.open();
    // next line depends on return code for button 1 (which is 1)
    // and CANCEL code both being == 1
    return dialog.getReturnCode() == 0;
  }
View Full Code Here

    String[] buttonLabels = new String[2];
    buttonLabels[0] = Messages.getString("MultiPageEditor.revertToLastValid"); //$NON-NLS-1$
    buttonLabels[1] = Messages.getString("MultiPageEditor.EditExisting"); //$NON-NLS-1$
    MessageDialog dialog = new MessageDialog(getEditorSite().getShell(), msg, null, msgDetails,
            MessageDialog.WARNING, buttonLabels, 0);
    dialog.open();
    // next line depends on return code for button 1 (which is 1)
    // and CANCEL code both being == 1
    return dialog.getReturnCode() == 0;
  }
View Full Code Here

      final File localFile = new File(path);
      if(localFile.exists()) {
        MessageDialog overwriteDialog = new MessageDialog(shell, "Save As", null, path +
            " already exists.\nDo you want to replace it?", MessageDialog.WARNING, new String[] {
            IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1); // 'No' is the default
        if(overwriteDialog.open() != Window.OK) {
          if(progressMonitor != null) {
            progressMonitor.setCanceled(true);
            return;
          }
        }
View Full Code Here

            }
            return composite;
          }

        };
        dialog.open();
      }
    };
    if (Display.getCurrent() != null) {
      runnable.run();
    } else {
View Full Code Here

            }
            return composite;
          }

        };
        dialog.open();
      }
    };
    if (Display.getCurrent() != null) {
      runnable.run();
    } else {
View Full Code Here

          null,
          "There are un-applied changes. Do you want to apply them?",
          MessageDialog.CONFIRM,
          new String[]{"Apply", "Cancel"},
          1);
      int res = confirm.open();
      if(res == 0)
        this.applyChanges();
    }
    return true;
  }
View Full Code Here

          null,
          "There are un-applied changes. Do you want to apply them?",
          MessageDialog.CONFIRM,
          new String[]{"Apply", "Cancel"},
          1);
      int res = confirm.open();
      if(res == 0)
        this.applyChanges();
    }
    return true;
  }
View Full Code Here

          null,
          "There are un-applied changes. Do you want to apply them?",
          MessageDialog.CONFIRM,
          new String[]{"Apply", "Cancel"},
          1);
      int res = confirm.open();
      if(res == 0)
        this.applyChanges();
    }
    return true;
  }
View Full Code Here


  private void promptForRedetectIfNecessary() {
    if (detectionRequested > 0) {
      MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), SSEUIMessages.TaskTagPreferenceTab_22, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().getImage(), SSEUIMessages.TaskTagPreferenceTab_23, MessageDialog.QUESTION, new String[]{SSEUIMessages.TaskTagPreferenceTab_24, SSEUIMessages.TaskTagPreferenceTab_25, SSEUIMessages.TaskTagPreferenceTab_26}, 2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
      int button = dialog.open();
      if (button == 0) {
        Job redetectJob = new Job(SSEUIMessages.TaskTagPreferenceTab_27) { //$NON-NLS-1$
          public Object getAdapter(Class adapter) {
            return null;
          }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.