Package org.eclipse.jface.dialogs

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


    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


                                    Messages.UDIGApplication_title,
                                    null,
                                    message,
                                    MessageDialog.ERROR,
                                    new String[]{"Exit","Continue"}, 0 );
                            int answer = dialog.open();
                            if( answer == 0 ){
                                PlatformUI.getWorkbench().close();
                                //System.exit(1); // need to ask the workbench to exit so this is clean...
                            }
                        } finally {
View Full Code Here

                message, MessageDialog.QUESTION,
                new String[] { IDialogConstants.YES_LABEL,
                               IDialogConstants.NO_LABEL }, 0);
        // ensure yes is the default

        return dialog.open() == 0;
    }

    /**
     * Restores control settings that were saved in the previous instance of this
     * page. 
View Full Code Here

                            }
                        }
                        super.buttonPressed(buttonId);
                    }
                };
                dialog.open();

            }
        });
    }
View Full Code Here

    private void bringUpNewClassWizard( StoryLine storyLine) {
        Shell shell= PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        MessageDialog dialog=new MessageDialog(null,"Type "+storyLine.asClassName()+" not found",null,"Do you want to create it?",
                                                MessageDialog.QUESTION,
                                                new String[]{"Yes","Yes, using Minimock","No"},0);
        int ret=dialog.open();
        if ((ret==0)||(ret==1)){
            NewClassWizard wizard=new NewClassWizard(storyLine,ret==1);
            wizard.init(PlatformUI.getWorkbench(), null);
            WizardDialog wd=new WizardDialog(shell,wizard);
View Full Code Here

      }

      private boolean isPerformRevert() {
        Shell shell= viewer.getControl().getShell();
        MessageDialog dialog= new MessageDialog(shell, TextEditorMessages.SpellingConfigurationBlock_error_title, null, TextEditorMessages.SpellingConfigurationBlock_error_message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1);
        return dialog.open() == 0;
      }

      private void revertSelection() {
        try {
          viewer.removeSelectionChangedListener(this);
View Full Code Here

            EditorMessages.Editor_error_activated_deleted_save_button_close,
        };

        MessageDialog dialog= new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0);

        if (dialog.open() == 0) {
          IProgressMonitor pm= getProgressMonitor();
          performSaveAs(pm);
          if (pm.isCanceled())
            handleEditorInputChanged();
        } else {
View Full Code Here

                null,
                NLSUtility.format(TextEditorMessages.AbstractDecoratedTextEditor_saveAs_overwrite_message, path),
                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.INFORMATION, new String[]{
                            POLICY_DELETION_DIALOG_YES_TEXT,
                            POLICY_DELETION_DIALOG_NO_TEXT},
                        0);
                // Open the dialog.
                dialog.open();

                // Only delete the policy if the user has confirmed the action
                // by pressing the Yes button at index 0.
                if (dialog.getReturnCode() == 0) {
                    // Delete takes a while so use a BusyIndicator.
View Full Code Here

                              null,
                              "You're trying to create a user who already exists!",
                              SWT.ICON_ERROR,
                              new String[]{"OK"},
                              0);
          dlg.open();
          return;
        }
        rootElement.addElement("user").addAttribute("username", uname.getText()).addAttribute("password", password.getText());
      }
      result = true;
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.