Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialog


      return;
    }
    //������ʷ
    if (hasHistoryVersion(plugin)) {
      if (!(this.totalExportFlag)) {
        MessageDialog dialog = new MessageDialog(new Shell(), "ȷ���ļ��滻",
            null, "�ò�����ɾ��SoTower��Ŀ "
                + this.client.getName()
                + " ��ģ����Ŀ "
                + plugin.getBundleDescription()
                    .getSymbolicName() + " �ľɰ汾���Ƿ������", 3,
            new String[] { "��", "��", "ȫ����", "ȫ����" }, 0);
        flag = dialog.open();
      }
    }
    switch (flag) {
    case 0:
      deleteHistoryVersion(plugin);
View Full Code Here


            // Check whether file exists and if so, confirm overwrite
            final File externalFile = new File( path );
            if ( externalFile.exists() )
            {
                MessageDialog overwriteDialog = new MessageDialog( shell, "Overwrite", null, "Overwrite?",
                    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

                final File externalFile = new File( path );
                if ( externalFile.exists() )
                {
                    String question = "The file '" + path
                        + "' already exists. Do you want to replace the existing file?";
                    MessageDialog overwriteDialog = new MessageDialog( shell, "Question", null, question,
                        MessageDialog.QUESTION, new String[]
                            { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }, 0 );
                    int overwrite = overwriteDialog.open();
                    switch ( overwrite )
                    {
                        case 0: // Yes
                            canOverwrite = true;
                            break;
View Full Code Here

        String testPassword = testPasswordText.getText();
        if ( currentPassword != null )
        {
            if ( currentPassword.verify( testPassword ) )
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verified sucessfully", MessageDialog.INFORMATION, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
            else
            {
                MessageDialog dialog = new MessageDialog( getShell(), "Password Verification", getShell().getImage(),
                    "Password verification failed", MessageDialog.ERROR, new String[]
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
        }
    }
View Full Code Here

  }

  protected boolean showConfirm(final Shell parent, final String title, final String message,
    final String icon) {
    final Image img = Activator.getImageDescriptor(icon).createImage();
    final MessageDialog dialog = new MessageDialog(parent, title, img, message,
      MessageDialog.QUESTION, new String[] { IDialogConstants.OK_LABEL,
        IDialogConstants.CANCEL_LABEL }, 0);
    final boolean r = dialog.open() == 0;
    img.dispose();
    return r;
  }
View Full Code Here

  }

  protected boolean showConfirm(final Shell parent, final String title, final String message,
    final String icon) {
    final Image img = EditUIPlugin.getImageDescriptor(icon).createImage();
    final MessageDialog dialog = new MessageDialog(parent, title, img, message,
      MessageDialog.QUESTION, new String[] { IDialogConstants.OK_LABEL,
        IDialogConstants.CANCEL_LABEL }, 0);
    final boolean r = dialog.open() == 0;
    img.dispose();
    return r;
  }
View Full Code Here

            // Check whether file exists and if so, confirm overwrite
            final File externalFile = new File( path );
            if ( externalFile.exists() )
            {
                MessageDialog overwriteDialog = new MessageDialog( shell, "Overwrite", null, "Overwrite?",
                    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

     *      the message
     */
    public static void reportError( String message )
    {

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

                    CreateConnectionActionHelper.createLdapBrowserConnection( server.getName(), serverConfiguration );
                }
                else
                {
                    // LDAP and LDAPS protocols are disabled, we report this error to the user
                    MessageDialog dialog = new MessageDialog( view.getSite().getShell(),
                        "Unable to create a connection", null,
                        "LDAP and LDAPS protocols are disabled. A connection cannot be created.", MessageDialog.ERROR,
                        new String[]
                            { IDialogConstants.OK_LABEL }, MessageDialog.OK );
                    dialog.open();
                }
            }
        }
    }
View Full Code Here

        {
            message = "Unable to read the server configuration." + ApacheDsPluginUtils.LINE_SEPARATOR
                + ApacheDsPluginUtils.LINE_SEPARATOR + "The following error occurred: " + errorMessage;
        }

        MessageDialog dialog = new MessageDialog( view.getSite().getShell(), "Unable to read the server configuration",
            null, message, MessageDialog.ERROR, new String[]
                { IDialogConstants.OK_LABEL }, MessageDialog.OK );
        dialog.open();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.dialogs.MessageDialog

Copyright © 2018 www.massapicom. 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.