Bug 31395 Child window of Preferences dialog centers between screens
On the Preferences->Java->Code Generation->Names tab, the Edit button opens a dialog that is split between multiple monitors, instead of centering on the main Preference window like the rest of its child windows do.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java
*/	
	protected abstract void validateSettings(String changedKey, String newValue);
	
	
	protected String[] getTokens(String text, String separator) {
		StringTokenizer tok= new StringTokenizer(text, separator); 
		int nTokens= tok.countTokens();
		String[] res= new String[nTokens];
		for (int i= 0; i < res.length; i++) {
			res[i]= tok.nextToken().trim();
		}
		return res;
	}	
	
	public boolean performOk(boolean enabled) {
		String[] allKeys= getAllKeys();
		Map actualOptions= getOptions(false);
		
		
		boolean hasChanges= false;
		for (int i= 0; i < allKeys.length; i++) {
			String key= allKeys[i];
			String oldVal= (String) actualOptions.get(key);
			String val= null;
			if (enabled) {
				val= (String) fWorkingValues.get(key);
				if (!val.equals(oldVal)) {
					hasChanges= true;
					actualOptions.put(key, val);
				}