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
}
}
/**
 * Creates and returns the contents of an area
 * of the dialog which appears below the message and
 * above the button bar.
 * <p>
 * The default implementation of this framework method
 * returns <code>null</code>. Subclasses may override.
 * </p>
 *
 * @param the parent composite to contain the custom area
 * @return the custom area control, or <code>null</code>
 */
protected Control createCustomArea(Composite parent) {
	return null;
}
/**
 * This implementation of the <code>Dialog</code> framework 
 * method creates and lays out a composite and calls 
 * <code>createMessageArea</code> and <code>createCustomArea</code>
 * to populate it. Subclasses should override <code>createCustomArea</code>
 * to add contents below the message.
 */
protected Control createDialogArea(Composite parent) {
	
	
	createMessageArea(parent);