Bug 24157 [Dialogs] MessageDialog needs to setFocus on default button
As the MessageDialog by default has no other widgets to set focus on we need to set focus on the default button to prevent it getting slammed by the default SWT behaviour.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java
*/
public static boolean openConfirm(Shell parent, String title, String message) {
	MessageDialog dialog = new MessageDialog(
		parent, 
		title, 
		null,	
		message, 
		QUESTION, 
		new String[] {IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL}, 
		0); 	
	return dialog.open() == 0;
}
/** 
 * Convenience method to open a standard error dialog.
 *
 * @param parent the parent shell of the dialog, or <code>null</code> if none
 * @param title the dialog's title, or <code>null</code> if none
 * @param message the message
 */
public static void openError(Shell parent, String title, String message) {
	MessageDialog dialog = new MessageDialog(
		parent,
		title, 
		null,	
		message, 
		ERROR, 
		new String[] {IDialogConstants.OK_LABEL}, 
		0); 	
	dialog.open();
	return;