Bug 177405 [Preferences] Layout issues with Text Boxes and Scrollbars
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
if (page instanceof PreferencePage) {
				
				IPreferenceStore store = ((PreferencePage) page).getPreferenceStore();
				if (store != null && store.needsSaving()
						&& store instanceof IPersistentPreferenceStore) {
					try {
						((IPersistentPreferenceStore) store).save();
					} catch (IOException e) {
						MessageDialog
								.openError(
										getShell(),
										JFaceResources.getString("PreferenceDialog.saveErrorTitle"), 
										JFaceResources
												.format(
														"PreferenceDialog.saveErrorMessage", new Object[] { page.getTitle(), e.getMessage() })); 
					}
				}
			}
		}
	}
	/**
	 * Notifies that the window's close button was pressed, the close menu was
	 * selected, or the ESCAPE key pressed.
	 * <p>
	 * The default implementation of this framework method sets the window's
	 * return code to <code>CANCEL</code> and closes the window using
	 * <code>close</code>. Subclasses may extend or reimplement.
	 * </p>
	 */
	protected void handleShellCloseEvent() {