Bug 25211 Widget Is Disposed from java preference page
Build 20021018 I got the following "Widget is disposed" exception repeatedly when browsing the Java preference pages: !MESSAGE Widget is disposed !STACK 0 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:2139) at org.eclipse.swt.SWT.error(SWT.java:2071) at org.eclipse.swt.widgets.Widget.error(Widget.java:294) at org.eclipse.swt.widgets.Control.getDisplay(Control.java:1268) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:476) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:232) at org.eclipse.swt.widgets.List.select(List.java:946) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage$19.run(JavaEditorPreferencePage.java:1047) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:31) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:94) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1374) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1246) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1420) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1403) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) !ENTRY org.eclipse.ui 4 4 Oct 22, 2002 14:38:46.78 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Oct 22, 2002 14:38:46.84 !MESSAGE Widget is disposed !STACK 0 org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:2139) at org.eclipse.swt.SWT.error(SWT.java:2071) at org.eclipse.swt.widgets.Widget.error(Widget.java:294) at org.eclipse.swt.widgets.Control.getDisplay(Control.java:1268) at org.eclipse.swt.widgets.Widget.isValidThread(Widget.java:476) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:232) at org.eclipse.swt.widgets.List.select(List.java:946) at org.eclipse.jdt.internal.ui.preferences.JavaEditorPreferencePage$20.run(JavaEditorPreferencePage.java:1057) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:31) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:94) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:1374) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1246) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1420) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1403) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorPreferencePage.java
});
		
		foregroundColorButton.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
				
			}
			public void widgetSelected(SelectionEvent e) {
				int i= fSyntaxColorList.getSelectionIndex();
				String key= fSyntaxColorListModel[i][1];
				
				PreferenceConverter.setValue(fOverlayStore, key, fSyntaxForegroundColorEditor.getColorValue());
			}
		});
		fBackgroundColorButton.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
				
			}
			public void widgetSelected(SelectionEvent e) {
				PreferenceConverter.setValue(fOverlayStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, fBackgroundColorEditor.getColorValue());					
			}
		});
		fBoldCheckBox.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent e) {
				
			}
			public void widgetSelected(SelectionEvent e) {
				int i= fSyntaxColorList.getSelectionIndex();
				String key= fSyntaxColorListModel[i][1];
				fOverlayStore.setValue(key + BOLD, fBoldCheckBox.getSelection());
			}