Bug 66526 [Dialogs] Review the design of MessageDialogWithToggle.createButtonsForButtonBar
I200406090800. Tod has mentioned some concerns over the large if statement structure used to look up labels and match them to identifiers. This seems cumbersome, and should be looked over again.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java
/**
     * @see Dialog#createButtonBar(Composite)
     */
    protected void createButtonsForButtonBar(Composite parent) {
        final String[] buttonLabels = getButtonLabels();
        final Button[] buttons = new Button[buttonLabels.length];
        final int defaultButtonIndex = getDefaultButtonIndex();
        for (int i = 0; i < buttonLabels.length; i++) {
            int id = i;
            String label = buttonLabels[i];
            if (IDialogConstants.OK_LABEL.equals(label)) {
                id = IDialogConstants.OK_ID;
            } else if (IDialogConstants.YES_LABEL.equals(label)) {
                id = IDialogConstants.YES_ID;
            } else if (IDialogConstants.NO_LABEL.equals(label)) {
                id = IDialogConstants.NO_ID;
            } else if (IDialogConstants.CANCEL_LABEL.equals(label)) {
                id = IDialogConstants.CANCEL_ID;
            } else if (IDialogConstants.YES_TO_ALL_LABEL.equals(label)) {
                id = IDialogConstants.YES_TO_ALL_ID;
            } else if (IDialogConstants.SKIP_LABEL.equals(label)) {
                id = IDialogConstants.SKIP_ID;
            } else if (IDialogConstants.STOP_LABEL.equals(label)) {
                id = IDialogConstants.STOP_ID;
            } else if (IDialogConstants.ABORT_LABEL.equals(label)) {
                id = IDialogConstants.ABORT_ID;
            } else if (IDialogConstants.RETRY_LABEL.equals(label)) {
                id = IDialogConstants.RETRY_ID;
            } else if (IDialogConstants.IGNORE_LABEL.equals(label)) {
                id = IDialogConstants.IGNORE_ID;