Package org.eclipse.jface.dialogs

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


    public static void openWarningDialog( String title, String message )
    {
        MessageDialog dialog = new MessageDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
            title, null, message, MessageDialog.WARNING, new String[]
                { IDialogConstants.OK_LABEL }, MessageDialog.OK );
        dialog.open();
    }


    /**
     * Checks, if this plugins runs in the Eclipse IDE or in RCP environment.
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();
    }


    /**
     * Gets the server configuration.
View Full Code Here

    String title = UIMessages.NoInstrumentedClassesError_title;
    String message = UIMessages.NoInstrumentedClassesError_message;

    MessageDialog d = new MessageDialog(parent, title, null, message, MessageDialog.ERROR,
        new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0);
    if (d.open() == 0) {
      parent.getDisplay().asyncExec(new Runnable() {
        public void run() {
          DebugUITools.openLaunchConfigurationDialogOnGroup(parent,
              new StructuredSelection(source), EclEmmaUIPlugin.ID_COVERAGE_LAUNCH_GROUP);
        }
View Full Code Here

        String[] buttons = new String[] { IDialogConstants.OK_LABEL,
                IDialogConstants.CANCEL_LABEL };
        MessageDialog d = new MessageDialog(getWindow().getShell(),
                WorkbenchMessages.ResetPerspective_title,
                null, message, MessageDialog.QUESTION, buttons, 0);
        if (d.open() == 0) {
      page.resetPerspective();
    }
    }

}
View Full Code Here

                    IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL };
            MessageDialog d = new MessageDialog(this.getShell(),
                    WorkbenchMessages.SavePerspective_overwriteTitle,
                    null, message, MessageDialog.QUESTION, buttons, 0);

            switch (d.open()) {
            case 0: //yes
                break;
            case 1: //no
                return;
            case 2: //cancel
View Full Code Here

          };
        }

        choice = SaveableHelper.testGetAutomatedResponse();
        if (SaveableHelper.testGetAutomatedResponse() == SaveableHelper.USER_RESPONSE) {
          choice = dialog.open();
         
          if(stillOpenElsewhere) {
            // map value of choice back to ISaveablePart2 values
            switch (choice) {
            case IDialogConstants.YES_ID:
View Full Code Here

          shellProvider.getShell(), WorkbenchMessages.Save_Resource,
          null, message, MessageDialog.QUESTION, buttons, 0);
       
        int choice = SaveableHelper.testGetAutomatedResponse();
        if (SaveableHelper.testGetAutomatedResponse() == SaveableHelper.USER_RESPONSE) {
          choice = d.open();
        }

        // Branch on the user choice.
        // The choice id is based on the order of button labels
        // above.
View Full Code Here

        NLS.bind(WorkbenchMessages.EditorManager_saveChangesQuestion,
            dirtyEditor.getName()), MessageDialog.QUESTION,
        new String[] { IDialogConstants.YES_LABEL,
            IDialogConstants.NO_LABEL,
            WorkbenchMessages.EditorManager_openNewEditorLabel }, 0);
    int result = dialog.open();
    if (result == 0) { // YES
      ProgressMonitorDialog pmd = new ProgressMonitorJobsDialog(dialog
          .getShell());
      pmd.open();
      dirtyEditor.getEditor(true).doSave(pmd.getProgressMonitor());
View Full Code Here

        // Asking for saving the modifications
        MessageDialog dialog = new MessageDialog( Display.getCurrent().getActiveShell(), Messages
            .getString( "EntryEditorUtils.SaveChanges" ), null, Messages //$NON-NLS-1$
            .getString( "EntryEditorUtils.SaveChangesDescription" ), MessageDialog.QUESTION, new String[] //$NON-NLS-1$
            { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 0 );
        int result = dialog.open();
        if ( result == 0 )
        {
            // Saving the modifications
            EntryEditorInput eei = editor.getEntryEditorInput();
            IStatus status = eei.saveSharedWorkingCopy( true, editor );
View Full Code Here

            {
                MessageDialog overwriteDialog = new MessageDialog( shell,
                    Messages.getString( "LdifEditor.Overwrite" ), null, Messages.getString( "OverwriteQuestion" ), //$NON-NLS-1$ //$NON-NLS-2$
                    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
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.