Bug 26109 [Dialogs] Need a FormData version of the button sizing API
The button sizing API in Dialog assumes the developer wants a GridData. We should promote the FormData version in PathVariablesDialog to Dialog.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/Dialog.java
* <p>
 * The <code>Dialog</code> implementation of this framework method sets
 * this dialog's return code to <code>Window.OK</code>
 * and closes the dialog. Subclasses may override.
 * </p>
 */
protected void okPressed() {
	setReturnCode(OK);
	close();
}
protected void setButtonLayoutData(Button button) {
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
	int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
	data.widthHint = Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
	button.setLayoutData(data);
}
/**
 * @see org.eclipse.jface.window.Window#close()
 */
public boolean close() {
	boolean returnValue = super.close();
	if(returnValue){
		buttons = new HashMap();
		buttonBar = null;
		dialogArea = null;
	}
	return returnValue;
}}