Bug 65095 MessageDialogWithToggle returns wrong value for yes_to_all
I'm using MessageDialogWithToggle class with 4 buttons: MessageDialogWithToggle dialog = new MessageDialogWithToggle( Display.getCurrent().getActiveShell(), RSCCoreUIPlugin.getString("ConfirmDeleteDialog.title_UI_"), null, message, MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL}, 1, SUBuilderPlugin.getString("CONFIRM_DELETE_DESC"), checkbox ); The following values 2, 1, 3, 1 are being returned for YES, YES_TO_ALL, NO, CANCEL buttons respectively. The YES_TO_ALL value is wrong, according to IDialogConstants it should be YES_TO_ALL_ID = 4.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java
* preferences. This value may be <code>null</code>, which indicates that
     * no preference should be updated automatically. It is then the
     * responsibility of the user of this API to use the information from the
     * toggle. Note: a <code>prefStore</code> is also needed.
     */
    private String prefKey = null;
    /**
     * The preference store which will be affected by the toggle button. This
     * value may be <code>null</code>, which indicates that no preference
     * should be updated automatically. It is then the responsibility of the
     * user of this API to use the information from the toggle. Note: a
     * <code>prefKey</code> is also needed.
     */
    private IPreferenceStore prefStore = null;
    /**
     * The toggle button (widget). This value is <code>null</code> until the
     * dialog is created.
     */
    private Button toggleButton = null;
    /**
     * The message displayed to the user, with the toggle button. This is the
     * text besides the toggle. If it is <code>null</code>, this means that
     * the default text for the toggle should be used.
     */
    private String toggleMessage;
    /**
     * The initial selected state of the toggle.
     */
    private boolean toggleState;
    /**