Example usage for org.eclipse.jface.dialogs IDialogConstants OK_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants OK_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.

Prototype

String OK_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants OK_LABEL.

Click Source Link

Document

The label for OK buttons.

Usage

From source file:com.elphel.vdt.ui.dialogs.VDTErrorDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);

    if (shouldShowDetailsButton())
        detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL,
                false);/*from   ww w .j  av  a 2  s  .  c  o m*/
}

From source file:com.foglyn.ui.WorkingOnCaseErrorDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    if (isMissingEstimateProblem()) {
        createButton(parent, IDialogConstants.OPEN_ID, "Open Case " + taskID, false);
    }/*from  w ww . ja va  2  s .  co  m*/

    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}

From source file:com.genuitec.eclipse.gerrit.tools.dialogs.SettingsDialog.java

License:Open Source License

protected void createButtonsForButtonBar(Composite parent) {
    parent.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, false, false));
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
    revalidate();/* ww  w  .  ja va 2s  .c  o  m*/
}

From source file:com.github.fengtan.sophie.dialogs.ExceptionDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    detailsButton = createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL,
            false);/*from www  .  j  ava2  s  .  com*/
}

From source file:com.github.reprogrammer.swtbot.examples.EclipseBot.java

License:Open Source License

public void deleteProject(String projectName) {
    selectJavaProject(projectName).contextMenu("Delete").click();
    SWTBotShell shell = activateShellWithName("Delete Resources");
    if (!bot.checkBox().isChecked()) {
        bot.checkBox().click();/*from w w w  . j  av  a2 s .c  o  m*/
    }
    bot.button(IDialogConstants.OK_LABEL).click();
    bot.waitUntil(Conditions.shellCloses(shell));
}

From source file:com.github.reprogrammer.swtbot.examples.TestEncapsulateField.java

License:Open Source License

@Override
protected void doExecuteRefactoring() {
    bot.selectFromPackageExplorer(PROJECT_NAME, "src", PACKAGE_NAME, getTestFileName(), getTestName(), "field");
    bot.invokeRefactoringFromMenu("Encapsulate Field...");
    final String dialogName = "Encapsulate Field";
    bot.getBot().waitUntilWidgetAppears(shellIsActive(dialogName));
    bot.deselectRadio("use setter and getter");
    bot.getBot().radio("keep field reference").click();
    bot.clickButtons(IDialogConstants.OK_LABEL);
    bot.getBot().waitUntil(Conditions.shellCloses(bot.getBot().shell(dialogName)));
    assertEquals(getTestOuputContents(), bot.getEditorContents(getTestName()));
}

From source file:com.google.code.t4eclipse.errorlog.action.LogErrorAction.java

License:Open Source License

public static void openMRTErrorDialog(final String title, final String message, final Throwable detail,
        final IStatus status) {
    Display.getDefault().syncExec(new Runnable() {
        public void run() {
            Shell parent = PlatformUI.getWorkbench().getWorkbenchWindows()[0].getShell();
            String[] labels;/*from w  w  w  .ja va 2  s  . c o  m*/
            if (detail != null) {
                labels = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.SHOW_DETAILS_LABEL };
                InternalErrorDialog dialog = new InternalErrorDialog(parent, title, null, message, detail, 1,
                        labels, 1);
                dialog.setDetailButton(1);
                dialog.open();
            } else {
                ErrorDialog.openError(parent, title, message, status);
            }
        }
    });

}

From source file:com.google.dart.tools.search.internal.ui.util.ExtendedDialogWindow.java

License:Open Source License

private MessageDialog createClosingDialog() {
    MessageDialog result = new MessageDialog(getShell(), SearchMessages.SearchDialogClosingDialog_title, null,
            SearchMessages.SearchDialogClosingDialog_message, MessageDialog.QUESTION,
            new String[] { IDialogConstants.OK_LABEL }, 0);
    return result;
}

From source file:com.google.dart.tools.ui.actions.FormatAllAction.java

License:Open Source License

@Override
public void run(IStructuredSelection selection) {
    CompilationUnit[] cus = getCompilationUnits(selection);
    if (cus.length == 0) {
        MessageDialog.openInformation(getShell(), ActionMessages.FormatAllAction_EmptySelection_title,
                ActionMessages.FormatAllAction_EmptySelection_description);
        return;// www. j  a va2 s  .  c o  m
    }
    try {
        if (cus.length == 1) {
            DartUI.openInEditor(cus[0]);
        } else {
            int returnCode = OptionalMessageDialog.open("FormatAll", //$NON-NLS-1$
                    getShell(), ActionMessages.FormatAllAction_noundo_title, null,
                    ActionMessages.FormatAllAction_noundo_message, MessageDialog.WARNING,
                    new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL }, 0);
            if (returnCode != OptionalMessageDialog.NOT_SHOWN && returnCode != Window.OK) {
                return;
            }
        }
    } catch (CoreException e) {
        ExceptionHandler.handle(e, getShell(), ActionMessages.FormatAllAction_error_title,
                ActionMessages.FormatAllAction_error_message);
    }
    runOnMultiple(cus);
}

From source file:com.google.dart.tools.ui.internal.dialogs.ListDialog.java

License:Open Source License

@Override
protected void createButtonsForButtonBar(Composite parent) {
    if (!fAddCancelButton) {
        createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    } else {/*w ww.j  av a  2  s  . c om*/
        super.createButtonsForButtonBar(parent);
    }
}