Bug 273330 [JFace] Add API to MessageDialog to enable clients to use SWT.SHEET
A new style constant SWT.SHEET was added recently. Without adding new API in JFace, clients who are currently using the convenience methods MessageDialog.openWarning/Error/Information/Question/Confirmation would not be able to open these dialogs as sheets.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java
text = toggleMessage;
            }
            toggleButton.setText(text);
        }
    }
    /**
     * A mutator for the state of the toggle button. This method will update the
     * button, if it exists.
     * 
     * @param toggleState
     *            The desired state of the toggle button (<code>true</code>
     *            means the toggle should be selected).
     */
    public void setToggleState(boolean toggleState) {
        this.toggleState = toggleState;
        
        if ((toggleButton != null) && (!toggleButton.isDisposed())) {
            toggleButton.setSelection(toggleState);
        }
    }
    
    /**
     * Attempt to find a standard JFace button id that matches the specified button
     * label.  If no match can be found, use the default id provided.
     * 
     * @param buttonLabel the button label whose id is sought
     * @param defaultId the id to use for the button if there is no standard id
     * @return the id for the specified button label
     */
    private int mapButtonLabelToButtonID(String buttonLabel, int defaultId) {