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
return false;
		}
		IPreferencePage oldPage = currentPage;
		currentPage = newPage;
		
		currentPage.setContainer(this);
		
		
		if (currentPage.getControl() == null) {
			final boolean[] failed = { false };
			Platform.run(new ISafeRunnable() {
				public void handleException(Throwable e) {
					failed[0] = true;
				}
				public void run() {
					createPageControl(currentPage, pageContainer);
				}
			});
			if (failed[0])
				return false;
			
			
			
			Assert.isNotNull(currentPage.getControl());
		}
		
		
		final Point[] size = new Point[1];
		final Point failed = new Point(-1, -1);
		Platform.run(new ISafeRunnable() {