Package org.eclipse.jface.dialogs

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


    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;
  }

  void showMessage(final String message) {
View Full Code Here


    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;
  }

  void showMessage(final String message) {
View Full Code Here

            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

    {

        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

                    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

        }

        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();
    }


    /**
     * Sets the enabled state of this action.
View Full Code Here

                // the name of the connection that has been created
                MessageDialog dialog = new MessageDialog( window.getShell(), "Connection created", null,
                    "A connection called '" + connection.getName() + "' has been created.", MessageDialog.INFORMATION,
                    new String[]
                        { IDialogConstants.OK_LABEL }, MessageDialog.OK );
                dialog.open();
            }
            else
            {
                // We're not already in the LDAP perspective, we indicate to the user
                // the name of the connection that has been created and we ask him
View Full Code Here

                MessageDialog dialog = new MessageDialog( window.getShell(), "Connection created", null,
                    "A connection called '" + connection.getName()
                        + "' has been created.\n\nDo you want to switch to the LDAP perspective ?",
                    MessageDialog.INFORMATION, new String[]
                        { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, MessageDialog.OK );
                if ( dialog.open() == MessageDialog.OK )
                {
                    // Switching to the LDAP perspective
                    window.getActivePage().setPerspective( ldapPerspective );
                }
            }
View Full Code Here

                        + "Do you wish to continue?";

                    MessageDialog dialog = new MessageDialog( view.getSite().getShell(), title, null, message,
                        MessageDialog.WARNING, new String[]
                            { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, MessageDialog.OK );
                    if ( dialog.open() == MessageDialog.CANCEL )
                    {
                        return;
                    }
                }
View Full Code Here

        }

        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();
    }


    /**
     * Gets an array of String containing the ports and their associated
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.