Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2011-03-25 11:05:45 +0000
committerAnton Leherbauer2011-03-25 11:05:45 +0000
commit8de0852813b60a30a378008c50d7738a54b3f3fe (patch)
treeed5bcb71b85dbf105574f1612cb74362e6727eae /core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java
parent4a37d52c1cb3dd95aa699399429df58a77b6808f (diff)
downloadorg.eclipse.cdt-8de0852813b60a30a378008c50d7738a54b3f3fe.tar.gz
org.eclipse.cdt-8de0852813b60a30a378008c50d7738a54b3f3fe.tar.xz
org.eclipse.cdt-8de0852813b60a30a378008c50d7738a54b3f3fe.zip
Fix deprecation warningsv201103250805
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java25
1 files changed, 21 insertions, 4 deletions
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.
*

Back to the top