Bug 75988 [Preferences] IPreferencePage#performOk() returning false should prevent the dialog from closing
I think that if this method returns false, it should prevent the dialog from closing. Today, in order to perform validation I have to register key listeners to all fields an use #setValid(false) to disable the "OK" button.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
private PreferenceManager preferenceManager;
	/**
	 * Flag for the presence of the error message.
	 */
	private boolean showingError = false;
	/**
	 * Preference store, initially <code>null</code> meaning none.
	 * 
	 * @see #setPreferenceStore
	 */
	private IPreferenceStore preferenceStore;
	private Composite titleArea;
	private Label titleImage;
	/**
	 * The tree viewer.
	 */
	private TreeViewer treeViewer;
	/**
	 * Creates a new preference dialog under the control of the given preference
	 * manager.
	 * 
	 * @param parentShell
	 *            the parent shell
	 * @param manager
	 *            the preference manager
	 */
	public PreferenceDialog(Shell parentShell, PreferenceManager manager) {
		super(parentShell);
		setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX);
		preferenceManager = manager;