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/CodeFormatterConfigurationBlock.java
GridData gdata= new GridData(GridData.FILL_BOTH);
		gdata.widthHint= fPixelConverter.convertWidthInCharsToPixels(30);
		gdata.heightHint= fPixelConverter.convertHeightInCharsToPixels(12);
		control.setLayoutData(gdata);
		return previewViewer;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#validateSettings(java.lang.String, java.lang.String)
	 */
	protected void validateSettings(String changedKey, String newValue) {
		if (changedKey == null || PREF_LINE_SPLIT.equals(changedKey)) {
			fLineLengthStatus= validatePositiveNumber(newValue);
		}
		if (changedKey == null || PREF_TAB_SIZE.equals(changedKey)) {
			fTabSizeStatus= validatePositiveNumber(newValue);
			int oldTabSize= fSourceViewer.getTextWidget().getTabs();
			if (fTabSizeStatus.matches(IStatus.ERROR)) {
				fWorkingValues.put(PREF_TAB_SIZE, String.valueOf(oldTabSize)); 
			} else {
				fSourceViewer.getTextWidget().setTabs(getPositiveIntValue(newValue, 0));
			}
		}
		updatePreview();
		fContext.statusChanged(StatusUtil.getMoreSevere(fLineLengthStatus, fTabSizeStatus));
	}	
	
		
	private String loadPreviewFile(String filename) {
		String separator= System.getProperty("line.separator"); 
		StringBuffer btxt= new StringBuffer(512);