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
if (!page.performOk())
								return;
						}
					}
				} catch (Exception e) {
					handleException(e);
				} finally {
					
					
					if (!errorOccurred)
						handleSave();
					
					close();
				}
			}
			/*
			 * (non-Javadoc)
			 * 
			 * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable)
			 */
			public void handleException(Throwable e) {
				errorOccurred = true;
				if (Platform.isRunning()) {
					String bundle = Platform.PI_RUNTIME;
					Platform.getLog(Platform.getBundle(bundle)).log(
							new Status(IStatus.ERROR, bundle, 0, e.toString(), e));
				} else
					e.printStackTrace();
				clearSelectedNode();
				String message = JFaceResources.getString("SafeRunnable.errorMessage");