* Roberto Gonzalez Rocha - Initial version
* Igor Malinin - refactoring, minor changes
*
- * $Id: XMLPreferenceInitializer.java,v 1.1 2004-09-02 18:28:03 jsurfer Exp $
+ * $Id: XMLPreferenceInitializer.java,v 1.2 2005-12-18 15:50:53 bananeweizen Exp $
*/
package net.sourceforge.phpeclipse.xml.ui.internal.preferences;
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
- IPreferenceStore store = XMLPlugin.getDefault().getPreferenceStore();
+ final IPreferenceStore store = XMLPlugin.getDefault().getPreferenceStore();
+ final Display display=Display.getDefault();
// TODO: ChainedPreferenceStore does not work for preferences preview
- PreferenceConverter.setDefault(store,
- AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND,
- Display.getDefault()
- .getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB());
+ display.syncExec(new Runnable() {
+ public void run() {
+ PreferenceConverter.setDefault(store,
+ AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND,
+ display.getSystemColor(SWT.COLOR_LIST_FOREGROUND).getRGB());
+ }});
store.setDefault(
AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT,
true);
- PreferenceConverter.setDefault(store,
- AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND,
- Display.getDefault()
- .getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB());
+ display.syncExec(new Runnable() {
+ public void run() {
+ PreferenceConverter.setDefault(store,
+ AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND,
+ display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB());
+ }});
store.setDefault(
AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT,