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
* (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.preference.IPreferencePageContainer#updateButtons()
	 */
	public void updateButtons() {
		okButton.setEnabled(isCurrentPageValid());
	}
	/*
	 * (non-Javadoc)
	 * 
	 * @see org.eclipse.jface.preference.IPreferencePageContainer#updateMessage()
	 */
	public void updateMessage() {
		String message = null;
		String errorMessage = null;
		if(currentPage != null){
			message = currentPage.getMessage();
			errorMessage = currentPage.getErrorMessage();
		}
		int messageType = IMessageProvider.NONE;
		if (message != null && currentPage instanceof IMessageProvider)
			messageType = ((IMessageProvider) currentPage).getMessageType();
		if (errorMessage != null) {
			message = errorMessage;
			messageType = IMessageProvider.ERROR;
			if (!showingError) {
				
				showingError = true;
				titleImage.setImage(null);
				titleImage.setBackground(JFaceColors.getErrorBackground(titleImage.getDisplay()));