Bug 131978 [Wizards] WizardDialog shell size keeps growing
I20060314-1200 We persist the dialog size for the Apply Patch wizard. Currently, if a user hits help, the help will appear in a tray, courtesy of TrayDialog. The problem is that the tray is figured into the overall dialog size when we persist the dialog size. So the next time we open up the dialog, it will be the same size as the old dialog plus the help tray. If the user hits helps again and closes, the dialog will grow yet again. Repro steps: 1. Open the Apply Patch wizard. 2. Hit F1 + close wizard. 3. Reopen Apply Patch wizard and note new size.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TrayDialog.java
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;
import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
/**
 * A <code>TrayDialog</code> is a specialized <code>Dialog</code> that can contain
 * a tray on its side. The tray's content is provided as a <code>DialogTray</code>.
 * <p>
 * It is recommended to subclass this class instead of <code>Dialog</code> in all
 * cases except where the dialog should never show a tray. For example, dialogs
 * which are very short, simple, and quick to dismiss (e.g. a message dialog with
 * an OK button) should subclass <code>Dialog</code>.
 * </p>
 * <p>
 * Note: Trays are not supported on dialogs that use a custom layout on the <code>
 * Shell</code> by overriding <code>Window#getLayout()</code>.
 * </p>
 * 
 * @see org.eclipse.jface.dialogs.DialogTray
 * @see org.eclipse.jface.window.Window#getLayout()
 * @since 3.2
 */
public abstract class TrayDialog extends Dialog {