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
Label separator = new Label(pageAreaComposite, SWT.HORIZONTAL
				| SWT.SEPARATOR);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		separator.setLayoutData(gd);
		return composite;
	}
	/**
	 * Create the pageArea in the composite.
	 * @param composite
	 * @param layout
	 */
	private void createPageArea(Composite composite, GridLayout layout) {
		Composite pageAreaComposite = new Composite(composite, SWT.NONE);
		pageAreaComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
		GridLayout pageAreaLayout = new GridLayout();
		layout.marginHeight = 0;
		layout.marginWidth = 10;
		pageAreaComposite.setLayout(pageAreaLayout);
		
		
		pageContainer = createPageContainer(pageAreaComposite);
		pageContainer.setLayoutData(new GridData(GridData.FILL_BOTH));
		
		Label separator = new Label(pageAreaComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		separator.setLayoutData(gd);
	}
	/**
	 * Create the sash with right control on the right. Note 
	 * that this method assumes GridData for the layout data