Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingPreferencePage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java14
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesAccess.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java15
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/TaskTagDictionary.java20
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java25
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CacheSizeBlock.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java6
12 files changed, 69 insertions, 51 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
index 5e8e0112ba6..b7333b61081 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/corext/codemanipulation/StubUtility.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2001, 2010 IBM Corporation and others.
+ * Copyright (c) 2001, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -432,7 +432,7 @@ public class StubUtility {
return lineDelimiter;
}
// workspace preference
- scopeContext= new IScopeContext[] { new InstanceScope() };
+ scopeContext= new IScopeContext[] { InstanceScope.INSTANCE };
String platformDefault= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
return Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, platformDefault, scopeContext);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java
index a1c848f5e59..e98def88fd8 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2010 QNX Software Systems and others.
+ * Copyright (c) 2002, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -477,7 +477,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
*/
public static Preferences getBuildLogPreferences(IProject project) {
if (project == null)
- return new InstanceScope().getNode(QUALIFIER).node(GLOBAL_BUILD_CONSOLE_NODE);
+ return InstanceScope.INSTANCE.getNode(QUALIFIER).node(GLOBAL_BUILD_CONSOLE_NODE);
else
return new LocalProjectScope(project).getNode(QUALIFIER).node(BUILD_CONSOLE_NODE);
}
@@ -488,7 +488,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
*/
public static IPreferenceStore getBuildLogPreferenceStore(IProject project) {
if (project == null)
- return new ScopedPreferenceStore(new InstanceScope(), QUALIFIER + "/" + GLOBAL_BUILD_CONSOLE_NODE); //$NON-NLS-1$
+ return new ScopedPreferenceStore(InstanceScope.INSTANCE, QUALIFIER + "/" + GLOBAL_BUILD_CONSOLE_NODE); //$NON-NLS-1$
else
return new ScopedPreferenceStore(new LocalProjectScope(project), QUALIFIER + "/" + BUILD_CONSOLE_NODE); //$NON-NLS-1$
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
index 43479a815b8..5602aaa1df2 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2010 QNX Software Systems and others.
+ * Copyright (c) 2002, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -244,7 +244,7 @@ public class BuildConsolePage extends Page
JFaceResources.getFontRegistry().addListener(this);
setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT));
- setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
+ setTabs(CUIPlugin.getDefault().getPreferenceStore().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
getConsole().addPropertyChangeListener(this);
CUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(this);
@@ -294,7 +294,7 @@ public class BuildConsolePage extends Page
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT)) {
setFont(JFaceResources.getFont(BuildConsolePreferencePage.PREF_BUILDCONSOLE_FONT));
} else if (property.equals(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH)) {
- setTabs(CUIPlugin.getDefault().getPluginPreferences().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
+ setTabs(CUIPlugin.getDefault().getPreferenceStore().getInt(BuildConsolePreferencePage.PREF_BUILDCONSOLE_TAB_WIDTH));
} else if (IConsoleConstants.P_BACKGROUND_COLOR.equals(property)) {
fViewer.getTextWidget().setBackground(fConsole.getBackground());
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingPreferencePage.java
index afa57ba589c..59d8a79470c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingPreferencePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/WorkspaceLanguageMappingPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2010 IBM Corporation and others.
+ * Copyright (c) 2007, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,8 +14,9 @@ import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
@@ -105,8 +106,9 @@ public class WorkspaceLanguageMappingPreferencePage extends PreferencePage imple
@Override
protected void performDefaults() {
super.performDefaults();
- Preferences node = CCorePlugin.getDefault().getPluginPreferences();
- node.setToDefault(CCorePreferenceConstants.WORKSPACE_LANGUAGE_MAPPINGS);
+ // set to default
+ IEclipsePreferences node = InstanceScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID);
+ node.remove(CCorePreferenceConstants.WORKSPACE_LANGUAGE_MAPPINGS);
try {
// remove workspace mappings
Map<String,String> currentMappings= fMappings.getWorkspaceMappings();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java
index 0f9f5995b7c..37dd8c72b79 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/OptionsConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -198,13 +198,13 @@ public abstract class OptionsConfigurationBlock {
if (fProject != null) {
fLookupOrder= new IScopeContext[] {
new ProjectScope(fProject),
- new InstanceScope(),
- new DefaultScope()
+ InstanceScope.INSTANCE,
+ DefaultScope.INSTANCE
};
} else {
fLookupOrder= new IScopeContext[] {
- new InstanceScope(),
- new DefaultScope()
+ InstanceScope.INSTANCE,
+ DefaultScope.INSTANCE
};
}
@@ -256,12 +256,12 @@ public abstract class OptionsConfigurationBlock {
}
private int getRebuildCount() {
- return fManager.getWorkingCopy(new DefaultScope().getNode(CUIPlugin.PLUGIN_ID)).getInt(REBUILD_COUNT_KEY, 0);
+ return fManager.getWorkingCopy(DefaultScope.INSTANCE.getNode(CUIPlugin.PLUGIN_ID)).getInt(REBUILD_COUNT_KEY, 0);
}
private void incrementRebuildCount() {
fRebuildCount++;
- fManager.getWorkingCopy(new DefaultScope().getNode(CUIPlugin.PLUGIN_ID)).putInt(REBUILD_COUNT_KEY, fRebuildCount);
+ fManager.getWorkingCopy(DefaultScope.INSTANCE.getNode(CUIPlugin.PLUGIN_ID)).putInt(REBUILD_COUNT_KEY, fRebuildCount);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesAccess.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesAccess.java
index 5f89470e0bf..bede9ca7141 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesAccess.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/PreferencesAccess.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,11 +43,11 @@ public class PreferencesAccess {
}
public IScopeContext getDefaultScope() {
- return new DefaultScope();
+ return DefaultScope.INSTANCE;
}
public IScopeContext getInstanceScope() {
- return new InstanceScope();
+ return InstanceScope.INSTANCE;
}
public IScopeContext getProjectScope(IProject project) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java
index 968cfaf9dea..7382481dbe5 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/TaskTagRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,6 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.rules.ICharacterScanner;
import org.eclipse.jface.text.rules.IToken;
@@ -133,18 +132,18 @@ public final class TaskTagRule extends CombinedWordRule implements IPropertyChan
* @param token the token to return for words recognized as task tags
* @param defaultToken
* @param preferenceStore
- * @param corePreferences
+ * @param corePreferenceStore
*/
public TaskTagRule(IToken token, IToken defaultToken, IPreferenceStore preferenceStore,
- Preferences corePreferences) {
+ IPreferenceStore corePreferenceStore) {
super(new TaskTagDetector(), defaultToken);
fMatcher = new TaskTagMatcher(token);
addWordMatcher(fMatcher);
String taskWords= null;
if (preferenceStore.contains(TODO_TASK_TAGS)) {
taskWords= preferenceStore.getString(TODO_TASK_TAGS);
- } else if (corePreferences != null) {
- taskWords= corePreferences.getString(TODO_TASK_TAGS);
+ } else if (corePreferenceStore != null) {
+ taskWords= corePreferenceStore.getString(TODO_TASK_TAGS);
}
if (taskWords != null) {
addTaskTags(taskWords);
@@ -153,8 +152,8 @@ public final class TaskTagRule extends CombinedWordRule implements IPropertyChan
boolean isCaseSensitive= true;
if (preferenceStore.contains(TODO_TASK_CASE_SENSITIVE)) {
isCaseSensitive= preferenceStore.getBoolean(TODO_TASK_CASE_SENSITIVE);
- } else if (corePreferences != null) {
- isCaseSensitive= corePreferences.getBoolean(TODO_TASK_CASE_SENSITIVE);
+ } else if (corePreferenceStore != null) {
+ isCaseSensitive= corePreferenceStore.getBoolean(TODO_TASK_CASE_SENSITIVE);
}
fMatcher.setCaseSensitive(isCaseSensitive);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/TaskTagDictionary.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/TaskTagDictionary.java
index 9db2bbfc306..1169b2e8dde 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/TaskTagDictionary.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/spelling/TaskTagDictionary.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,12 +15,12 @@ package org.eclipse.cdt.internal.ui.text.spelling;
import java.net.URL;
import java.util.StringTokenizer;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
-import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
+import org.eclipse.jface.util.IPropertyChangeListener;
+import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
+import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.internal.ui.text.spelling.engine.AbstractSpellDictionary;
@@ -42,18 +42,18 @@ public class TaskTagDictionary extends AbstractSpellDictionary implements IPrope
*/
@Override
protected synchronized boolean load(final URL url) {
- final Plugin plugin= CCorePlugin.getDefault();
+ final CUIPlugin plugin= CUIPlugin.getDefault();
if (plugin != null) {
- plugin.getPluginPreferences().addPropertyChangeListener(this);
+ plugin.getCorePreferenceStore().addPropertyChangeListener(this);
return updateTaskTags();
}
return false;
}
/*
- * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent)
+ * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
*/
- public void propertyChange(final PropertyChangeEvent event) {
+ public void propertyChange(PropertyChangeEvent event) {
if (CCorePreferenceConstants.TODO_TASK_TAGS.equals(event.getProperty()))
updateTaskTags();
}
@@ -63,9 +63,9 @@ public class TaskTagDictionary extends AbstractSpellDictionary implements IPrope
*/
@Override
public synchronized void unload() {
- final Plugin plugin= CCorePlugin.getDefault();
+ final CUIPlugin plugin= CUIPlugin.getDefault();
if (plugin != null)
- plugin.getPluginPreferences().removePropertyChangeListener(this);
+ plugin.getCorePreferenceStore().removePropertyChangeListener(this);
super.unload();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java
index ce4d309bc11..03ece11382b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 QNX Software Systems and others.
+ * Copyright (c) 2004, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -44,7 +44,7 @@ import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.dialogs.SelectionStatusDialog;
-import org.eclipse.cdt.core.browser.PathUtil;
+import org.eclipse.cdt.utils.PathUtil;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICElement;
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 1f07b60ee98..50387cd5b8e 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -276,7 +276,6 @@ public class CUIPlugin extends AbstractUIPlugin {
return MessageFormat.format(getResourceString(key), new Object[] {arg});
}
- @SuppressWarnings("cast") // java.text.MessageFormat would require the cast
public static String getFormattedString(String key, String[] args) {
return MessageFormat.format(getResourceString(key), (Object[]) args);
}
@@ -381,6 +380,12 @@ public class CUIPlugin extends AbstractUIPlugin {
*/
private IPreferenceStore fCombinedPreferenceStore;
+ /**
+ * The core preference store.
+ * @since 5.3
+ */
+ private IPreferenceStore fCorePreferenceStore;
+
private CoreModel fCoreModel;
private CDocumentProvider fDocumentProvider;
private WorkingCopyManager fWorkingCopyManager;
@@ -655,13 +660,25 @@ public class CUIPlugin extends AbstractUIPlugin {
if (fCombinedPreferenceStore == null) {
fCombinedPreferenceStore= new ChainedPreferenceStore(new IPreferenceStore[] {
getPreferenceStore(),
- new ScopedPreferenceStore(new InstanceScope(), PLUGIN_CORE_ID),
+ getCorePreferenceStore(),
EditorsUI.getPreferenceStore()
});
}
return fCombinedPreferenceStore;
}
-
+
+ /**
+ * Returns a preference store for org.eclipse.cdt.core preferences
+ * @return the preference store
+ * @since 5.3
+ */
+ public IPreferenceStore getCorePreferenceStore() {
+ if (fCorePreferenceStore == null) {
+ fCorePreferenceStore= new ScopedPreferenceStore(InstanceScope.INSTANCE, PLUGIN_CORE_ID);
+ }
+ return fCorePreferenceStore;
+ }
+
/**
* Returns a section in the C UI plugin's dialog settings. If the section doesn't exist yet, it is created.
*
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CacheSizeBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CacheSizeBlock.java
index 759713b013d..0019eeee6c0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CacheSizeBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CacheSizeBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -127,7 +127,7 @@ public class CacheSizeBlock extends AbstractCOptionPage {
}
private void initializeValues() {
- ScopedPreferenceStore prefStore= new ScopedPreferenceStore(new InstanceScope(), CCorePlugin.PLUGIN_ID);
+ ScopedPreferenceStore prefStore= new ScopedPreferenceStore(InstanceScope.INSTANCE, CCorePlugin.PLUGIN_ID);
fDBLimitPct.setPreferenceStore(prefStore);
fDBLimitPct.setPropertyChangeListener(validityChangeListener);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java
index c9df7fbd733..3a5e1fc45ed 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/doctools/generic/GenericTagCommentScanner.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Symbian Software Systems and others.
+ * Copyright (c) 2008, 2011 Symbian Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
import org.eclipse.jface.text.rules.IRule;
import org.eclipse.jface.text.rules.IToken;
@@ -37,7 +37,7 @@ import org.eclipse.cdt.internal.ui.text.TaskTagRule;
*/
public class GenericTagCommentScanner extends BufferedRuleBasedScanner implements ICTokenScanner {
protected TaskTagRule fTaskTagRule;
- protected Preferences fCorePreferenceStore;
+ protected IPreferenceStore fCorePreferenceStore;
protected String fDefaultTokenProperty;
protected String fTagToken;

Back to the top