Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialog


    if (!importPreferences)
      preferences = null;

    /* Show warning and ask for confirmation if preferences should be imported */
    if (!fIsWelcome && importPreferences && preferences != null && !preferences.isEmpty()) {
      MessageDialog dialog = new MessageDialog(getShell(), Messages.ImportWizard_ATTENTION, null, Messages.ImportWizard_PREFERENCE_OVERWRITE, MessageDialog.WARNING, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0);
      if (dialog.open() != 0)
        return false;
    }

    /* Run Import */
    ImportUtils.doImport(target, folderChilds, labels, filters, preferences, !fIsWelcome);
View Full Code Here


        /* Check if this operation has the potential of deleting existing news */
        boolean containsNews = bookmark.getNewsCount(INews.State.getVisible()) > 0;
        if (containsNews) {
          String msg = Messages.GeneralPropertyPage_CHANGE_LINK_WARNING;
          MessageDialog dialog = new MessageDialog(fParent.getShell(), Messages.GeneralPropertyPage_WARNING, null, msg, MessageDialog.WARNING, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1);
          if (dialog.open() == IDialogConstants.CANCEL_ID)
            return false;
        }

        try {
          DAOService daoService = Owl.getPersistenceService().getDAOService();
View Full Code Here

  @Override
  protected void okPressed() {

    /* Show an Extra Warning if Update will Fail due to missing write Permissions */
    if (!fCanUpdate) {
      MessageDialog dialog = new MessageDialog(getShell(), Messages.UpdateDialog_WARNING, null, Messages.UpdateDialog_MISSING_PERMISSIONS_WARNING, MessageDialog.WARNING, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0);
      if (dialog.open() != 0)
        return;
    }

    super.okPressed();
  }
View Full Code Here

      message.append("the selected elements?");
    }

    /* Create Dialog and open */
    String[] buttons = new String[] { "Delete", IDialogConstants.CANCEL_LABEL };
    MessageDialog dialog = new MessageDialog(fShell, "Confirm Delete", null, message.toString(), MessageDialog.QUESTION, buttons, 0);
    return dialog.open() == 0;
  }
View Full Code Here

                final File externalFile = new File( path );
                if ( externalFile.exists() )
                {
                    String question = NLS.bind( Messages
                        .getString( "ServerConfigurationEditor.TheFileAlreadyExistsReplace" ), path ); //$NON-NLS-1$
                    MessageDialog overwriteDialog = new MessageDialog( shell, Messages
                        .getString( "ServerConfigurationEditor.Question" ), null, question, //$NON-NLS-1$
                        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


    private void askUpdateSharedWorkingCopy( IWorkbenchPartReference partRef, IEntry originalEntry,
        IEntry oscSharedWorkingCopy, Object source )
    {
        MessageDialog dialog = new MessageDialog( partRef.getPart( false ).getSite().getShell(), Messages
            .getString( "EntryEditorManager.EntryChanged" ), null, Messages //$NON-NLS-1$
            .getString( "EntryEditorManager.EntryChangedDescription" ), MessageDialog.QUESTION, new String[] //$NON-NLS-1$
            { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0 );
        int result = dialog.open();
        if ( result == 0 )
        {
            // update reference copy and working copy
            updateOscSharedReferenceCopy( originalEntry );
            updateOscSharedWorkingCopy( originalEntry );
View Full Code Here

        String testPassword = testPasswordText.getText();
        if ( currentPassword != null )
        {
            if ( currentPassword.verify( testPassword ) )
            {
                MessageDialog dialog = new MessageDialog(
                    getShell(),
                    Messages.getString( "PasswordDialog.PasswordVerification" ), getShell().getImage(), //$NON-NLS-1$
                    Messages.getString( "PasswordDialog.PasswordVerifiedSuccessfully" ), MessageDialog.INFORMATION, new String[] //$NON-NLS-1$
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
            else
            {
                MessageDialog dialog = new MessageDialog(
                    getShell(),
                    Messages.getString( "PasswordDialog.PasswordVerification" ), getShell().getImage(), //$NON-NLS-1$
                    Messages.getString( "PasswordDialog.PasswordVerificationFailed" ), MessageDialog.ERROR, new String[] //$NON-NLS-1$
                        { IDialogConstants.OK_LABEL }, 0 );
                dialog.open();
            }
        }
    }
View Full Code Here

          return;

        currentHighContrast = !currentHighContrast;

        // make sure they really want to do this
        if (new MessageDialog(null,
            IDEWorkbenchMessages.SystemSettingsChange_title, null,
            IDEWorkbenchMessages.SystemSettingsChange_message,
            MessageDialog.QUESTION, new String[] {
                IDEWorkbenchMessages.SystemSettingsChange_yes,
                IDEWorkbenchMessages.SystemSettingsChange_no },
View Full Code Here

      UIJob job = new UIJob(Messages.CloudFoundryUiCallback_JOB_CF_ERROR) {
        public IStatus runInUIThread(IProgressMonitor monitor) {
          Shell shell = CloudUiUtil.getShell();
          if (shell != null) {
            new MessageDialog(shell, Messages.CloudFoundryUiCallback_ERROR_CALLBACK_TITLE, null,
                status.getMessage(), MessageDialog.ERROR, new String[] { Messages.COMMONTXT_OK }, 0)
                .open();
          }
          return Status.OK_STATUS;
        }
View Full Code Here

                    MessageDialog.openInformation(view.getSite().getShell(), "No server selected", "A server must be selected");
                    return;
                }
                int selection = 2;
                if (!doNotAskAgain) {
                    MessageDialog dialog = new MessageDialog(view.getSite().getShell(), Messages.defaultDialogTitle, null, Messages.dialogPublishClean,
                            MessageDialog.QUESTION_WITH_CANCEL,
                            new String[] {"Cancel", "OK (do not ask again)", "OK"}, 1) {
                        @Override
                        protected void configureShell(Shell shell) {
                            super.configureShell(shell);
                            setShellStyle(getShellStyle() | SWT.SHEET);
                        }
                    };
                    selection = dialog.open();
                }
                if (selection != 0) {
                    if (selection==1) {
                        doNotAskAgain = true;
                    }
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.