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
currentPage.setSize(containerSize);
				}
			} else if (hdiff < 0 || vdiff < 0) {
				currentPage.setSize(containerSize);
			}
		}
		
		
		
		Control[] children = pageContainer.getChildren();
		Control currentControl = currentPage.getControl();
		for (int i = 0; i < children.length; i++) {
			if (children[i] != currentControl)
				children[i].setVisible(false);
		}
		
		currentPage.setVisible(true);
		if (oldPage != null)
			oldPage.setVisible(false);
		
		update();
		return true;
	}
	/**
	 * Create the page for the node.
	 * @param node
	 */
	protected void createPage(IPreferenceNode node) {
		node.createPage();
	}