Bug 30941 Preferences default initialization. Can not do a syncExec
20030204 The initialization of the preference default currently contains a final Display display= Display.getDefault(); display.syncExec(new Runnable() { public void run() { Color c= display.getSystemColor(SWT.COLOR_GRAY); rgbs[0]= c.getRGB(); c= display.getSystemColor(SWT.COLOR_LIST_FOREGROUND); rgbs[1]= c.getRGB(); c= display.getSystemColor(SWT.COLOR_LIST_BACKGROUND); rgbs[2]= c.getRGB(); } }); We should avoid and remove this as this is a candidate for a deadlock.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
e= fCheckBoxes.keySet().iterator();
		while (e.hasNext()) {
			Button b= (Button) e.next();
			String key= (String) fCheckBoxes.get(b);
			b.setSelection(fOverlayStore.getBoolean(key));
		}
		
		e= fTextFields.keySet().iterator();
		while (e.hasNext()) {
			Text t= (Text) e.next();
			String key= (String) fTextFields.get(t);
			t.setText(fOverlayStore.getString(key));
		}
		
		RGB rgb= PreferenceConverter.getColor(fOverlayStore, PreferenceConstants.EDITOR_BACKGROUND_COLOR);
		fBackgroundColorEditor.setColorValue(rgb);		
		
		boolean default_= fOverlayStore.getBoolean(PreferenceConstants.EDITOR_BACKGROUND_DEFAULT_COLOR);
		fBackgroundDefaultRadioButton.setSelection(default_);
		fBackgroundCustomRadioButton.setSelection(!default_);
		fBackgroundColorButton.setEnabled(!default_);
		boolean closeJavaDocs= fOverlayStore.getBoolean(PreferenceConstants.EDITOR_CLOSE_JAVADOCS);
		fAddJavaDocTagsButton.setEnabled(closeJavaDocs);
		boolean fillMethodArguments= fOverlayStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES);
		fGuessMethodArgumentsButton.setEnabled(fillMethodArguments);
		
        updateAutoactivationControls();
	}
	
    private void updateAutoactivationControls() {