Bug 154398 [Dialogs] Javadoc - IconAndMessageDialog.createMessageArea assumes parent composite is using GridLayout
IconAndMessageDialog.createMessageArea assigns GridData objects as the layout data for the children of the parent composite. This mandates that the parent's layout is a GridLayout - which is unspecified in the Javadoc. This affects all callers of IconAndMessageDialog.createMessageArea as well, for example: ErrorDialog.createDialogArea MessageDialog.createDialogArea ProgressDialog.createDialogArea
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/IconAndMessageDialog.java
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.layout.LayoutConstants;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleAdapter;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
/**
 * The IconAndMessageDialog is the abstract superclass of dialogs that have an
 * icon and a message as the first two widgets. In this dialog the icon and
 * message are direct children of the shell in order that they can be read by
 * accessibility tools more easily.
 */
public abstract class IconAndMessageDialog extends Dialog {
	/**
	 * Message (a localized string).
	 */
	protected String message;
	/**
	 * Message label is the label the message is shown on.
	 */
	protected Label messageLabel;
	/**
	 * Return the label for the image.