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
int i= fAnnotationList.getSelectionIndex();
				String key= fAnnotationColorListModel[i][3];
				fOverlayStore.setValue(key, fShowInOverviewRulerCheckBox.getSelection());
			}
		});
		
		foregroundColorButton.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
				
			}
			
			public void widgetSelected(SelectionEvent e) {
				int i= fAnnotationList.getSelectionIndex();
				String key= fAnnotationColorListModel[i][1];
				PreferenceConverter.setValue(fOverlayStore, key, fAnnotationForegroundColorEditor.getColorValue());
			}
		});
		
		return composite;
	}
	private Control createTypingPage(Composite parent) {
		Composite composite= new Composite(parent, SWT.NONE);
		GridLayout layout= new GridLayout();
		layout.numColumns= 1;
		composite.setLayout(layout);
		String label= PreferencesMessages.getString("JavaEditorPreferencePage.smartHomeEnd"); 
		addCheckBox(composite, label, PreferenceConstants.EDITOR_SMART_HOME_END, 1);
		addFiller(composite);
		Group group= new Group(composite, SWT.NONE);
		layout= new GridLayout();