Project: Eclipse_Platform_UI
Bug 413943 [Workbench] Make "instance/org.eclipse.ui.ide/WORKSPACE_NAME" a public preference
Reported: 2013-07-29 14:55:51 | Status: resolved fixed

A normal call to a core API, i.e., EclipsePreferences.put() for key "instance/org.eclipse.ui.ide/WORKSPACE_NAME", leads to this exception in the UI: org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:4397) at org.eclipse.swt.SWT.error(SWT.java:4312) at org.eclipse.swt.SWT.error(SWT.java:4283) at org.eclipse.swt.widgets.Widget.error(Widget.java:472) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:363) at org.eclipse.swt.widgets.Decorations.getText(Decorations.java:747) at org.eclipse.ui.internal.WorkbenchWindowConfigurer.getTitle(WorkbenchWindowConfigurer.java:301) at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.recomputeTitle(IDEWorkbenchWindowAdvisor.java:421) at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.updateTitle(IDEWorkbenchWindowAdvisor.java:498) at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.access$3(IDEWorkbenchWindowAdvisor.java:461) at org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor$5.propertyChange(IDEWorkbenchWindowAdvisor.java:353) at org.eclipse.ui.preferences.ScopedPreferenceStore$3.run(ScopedPreferenceStore.java:375) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.preferences.ScopedPreferenceStore.firePropertyChangeEvent(ScopedPreferenceStore.java:372) at org.eclipse.ui.preferences.ScopedPreferenceStore$2.preferenceChange(ScopedPreferenceStore.java:194) at org.eclipse.core.internal.preferences.EclipsePreferences$3.run(EclipsePreferences.java:896) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.preferences.EclipsePreferences.firePreferenceEvent(EclipsePreferences.java:899) at org.eclipse.core.internal.preferences.EclipsePreferences.put(EclipsePreferences.java:912) The private method IDEWorkbenchWindowAdvisor.recomputeTitle() seems to assume that it's always being called on the UI thread, but it's not.

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IIDEPreferenceConstants.java