Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2003-03-04 10:44:30 -0500
committerDoug Schaefer2003-03-04 10:44:30 -0500
commit35fc95ccadbce5e7d8e5b73e9ea6096a28643c7d (patch)
tree298adc74978e85d2c4b9ab5d84ec805fa0a3fed0
parent2d8ecfb1b17297e2e11dadd3a012e0e3e58572d9 (diff)
downloadorg.eclipse.cdt-35fc95ccadbce5e7d8e5b73e9ea6096a28643c7d.tar.gz
org.eclipse.cdt-35fc95ccadbce5e7d8e5b73e9ea6096a28643c7d.tar.xz
org.eclipse.cdt-35fc95ccadbce5e7d8e5b73e9ea6096a28643c7d.zip
Fixed up the preference to make sure the core stays in sync with the
UI's preference store.
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java5
2 files changed, 9 insertions, 6 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java
index 678c76d5f4..6c52e83cc7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CPluginPreferencePage.java
@@ -21,9 +21,9 @@ import org.eclipse.ui.help.WorkbenchHelp;
*/
public class CPluginPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
- private static final String PREF_LINK_TO_EDITOR= "linkToEditor";
+ private static final String PREF_LINK_TO_EDITOR= "linkToEditor"; //$NON-NLS-1$
public static final String PREF_SHOW_CU_CHILDREN= "CUChildren"; //$NON-NLS-1$
- private static final String PREF_USE_NEW_PARSER= "useNewParser";
+ private static final String PREF_USE_NEW_PARSER= "useNewParser"; //$NON-NLS-1$
private static final String LINK_TO_EDITOR_LABEL= "CBasePreferencePage.linkToEditor.label";
private static final String SHOW_CU_CHILDREN_LABEL= "CBasePreferencePage.CUChildren.label";
@@ -75,8 +75,6 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
* @see IWorkbenchPreferencePage#init
*/
public void init(IWorkbench workbench) {
- CUIPlugin.getDefault().getPreferenceStore().setValue(PREF_USE_NEW_PARSER,
- CCorePlugin.getDefault().useNewParser());
}
/**
@@ -85,8 +83,8 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
public static void initDefaults(IPreferenceStore prefs) {
prefs.setDefault(PREF_LINK_TO_EDITOR, true);
prefs.setDefault(PREF_SHOW_CU_CHILDREN, true);
- prefs.setDefault(PREF_USE_NEW_PARSER, CCorePlugin.getDefault().useNewParser());
- }
+ prefs.setDefault(PREF_USE_NEW_PARSER, false);
+ }
/* (non-Javadoc)
* @see org.eclipse.jface.preference.IPreferencePage#performOk()
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java
index 7f917f6926..80741f2fe2 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java
@@ -9,6 +9,7 @@ import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.BuildConsoleManager;
@@ -217,6 +218,10 @@ public class CUIPlugin extends AbstractUIPlugin {
CPluginImages.initialize();
}
});
+
+ // TODO - temporary kludge (maybe) to make sure the core preferences
+ // are kept in sync with the stored preferences
+ CCorePlugin.getDefault().setUseNewParser(CPluginPreferencePage.useNewParser());
}
/**

Back to the top