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
});
		return toolBar;
	}
	/*
	 * Creates a help link. This is used when there is no help image
	 * available.
	 */
	private Link createHelpLink(Composite parent) {
		Link link = new Link(parent, SWT.WRAP | SWT.NO_FOCUS);
        ((GridLayout) parent.getLayout()).numColumns++;
		link.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
		link.setText("<a>"+IDialogConstants.HELP_LABEL+"</a>"); 
		link.setToolTipText(IDialogConstants.HELP_LABEL);
		link.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
				helpPressed();
            }
        });
		return link;
	}	
	
	/*
	 * Returns whether or not the given layout can support the addition of a tray.
	 */
	private boolean isCompatibleLayout(Layout layout) {
		if (layout != null && layout instanceof GridLayout) {
			GridLayout grid = (GridLayout)layout;
			return !grid.makeColumnsEqualWidth && (grid.horizontalSpacing == 0) &&
					(grid.marginWidth == 0) && (grid.marginHeight == 0) &&
					(grid.horizontalSpacing == 0) && (grid.numColumns == 5);