Bug 48400 [Dialogs] MessageDialog needs javadoc for returnCode == -1
org.eclipse.jface.dialogs.MessageDialog extends handleShellCloseEvent() and sets a returnCode of -1 when the dialog is closed without pressing a button (pressed esc key or clicked close box). This special returnCode needs to be commented in JavaDocs, since it is an unexpected result (and already caused problems). I suggest to ... - transform the comment for handleShellCloseEvent() into a JavaDoc comment - replace '-1' by SWT.DEFAULT or a new 'public static final int' constant - mention the special returnCode in MessageDialog's class JavaDoc
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/MessageDialog.java
Composite composite = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	composite.setLayout(layout);
	
	GridData data = new GridData(GridData.FILL_BOTH);
	data.horizontalSpan = 2;
	
	composite.setLayoutData(data);
	
	customArea = createCustomArea(composite);
	
	
	if(customArea == null)
		customArea = new Label(composite,SWT.NULL);
	return composite;
}
/**
 * Gets a button in this dialog's button bar.
 *
 * @param index the index of the button in the dialog's button bar
 * @return a button in the dialog's button bar
 */
protected Button getButton(int index) {
	return buttons[index];
}
/**
 * Returns the minimum message area width in pixels
 * This determines the minimum width of the dialog.