Package org.eclipse.jface.dialogs

Examples of org.eclipse.jface.dialogs.MessageDialog


            String dialogMessage,
            int dialogImageType,
            String[] buttonLabels,
            int defaultIndex){
       
        MessageDialog dialog = new MessageDialog(parentShell, dialogTitle, dialogImage, dialogMessage, dialogImageType, buttonLabels, defaultIndex );
        ZoomingDialog zd=new ZoomingDialog(parentShell, dialog, start);
       
        zd.open();
        return zd.getReturnCode();
    }
View Full Code Here


                                Messages.UDIGApplication_error1
                                + Messages.UDIGApplication_error2
                                + "http://www.microsoft.com/downloads/details.aspx?FamilyID=6A63AB9C-DF12-4D41-933C-BE590FEAA05A&displaylang=en"; //$NON-NLS-1$
                            UiPlugin.log( message, null );               
                                                  
                            MessageDialog dialog = new MessageDialog(
                                    display.getActiveShell(),
                                    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

     *
     * @param message the question to ask
     * @return <code>true</code> for Yes, and <code>false</code> for No
     */
    protected boolean queryYesNoQuestion(String message) {
        MessageDialog dialog = new MessageDialog(getContainer().getShell(),
                Messages.WizardDataTransferPage_dialog_title,
                (Image) null,
                message, MessageDialog.QUESTION,
                new String[] { IDialogConstants.YES_LABEL,
                               IDialogConstants.NO_LABEL }, 0);
        // ensure yes is the default

        return dialog.open() == 0;
    }
View Full Code Here

    public void init( IWorkbenchWindow window ) {
    }
   
    @Override
    public void run( IAction action ) {
        MessageDialog d=new MessageDialog(Display.getDefault().getActiveShell(),
                "Test", null, "Test zoom dialog", MessageDialog.INFORMATION,
                new String[]{"OK"}, 1);
        ZoomingDialog zd=new ZoomingDialog(Display.getDefault().getActiveShell(), d, new Rectangle(0,0,10,10));
        zd.open();
    }
View Full Code Here

                String title = InMemoryCoverageLoader_msgTitle;
                String desc = MessageFormat.format(InMemoryCoverageLoader_message, resource
                        .getIdentifier(), finalHeap);
                String[] buttons = {InMemoryCoverageLoader_restart_button,
                        InMemoryCoverageLoader_close_button};
                MessageDialog dialog = new MessageDialog(shell, title, null, desc, QUESTION,
                        buttons, 0){

                    @Override
                    protected void buttonPressed( int buttonId ) {
                        if (buttonId == 0) {
                            try {
                                UiPlugin.setMaxHeapSize(String.valueOf(finalHeap));
                                PlatformUI.getWorkbench().restart();

                            } catch (IOException e) {
                                throw (RuntimeException) new RuntimeException().initCause(e);
                            }
                        }
                        super.buttonPressed(buttonId);
                    }
                };
                dialog.open();

            }
        });
    }
View Full Code Here

   * Creates and return a new wizard closing dialog without opening it.
   *
   * @return MessageDalog
   */
  private MessageDialog createWizardClosingDialog() {
    MessageDialog result = new MessageDialog(getShell(),
        JFaceResources.getString("WizardClosingDialog.title"), //$NON-NLS-1$
        null,
        JFaceResources.getString("WizardClosingDialog.message"), //$NON-NLS-1$
        MessageDialog.QUESTION,
        new String[] { IDialogConstants.OK_LABEL }, 0) {
View Full Code Here

        EditorUtility.openInEditor(type, true);
    }

    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

        updateListDependencies();
      }

      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

        String[] buttons= {
            EditorMessages.Editor_error_activated_deleted_save_button_save,
            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

      }

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

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.