1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

return IEclipsePreferences

This commit is contained in:
Alena Laskavaia 2011-03-11 03:17:19 +00:00
parent 8702144ba5
commit c2dfefd6ea

View file

@ -18,7 +18,7 @@ import org.eclipse.cdt.codan.core.model.IProblemWorkingCopy;
import org.eclipse.cdt.codan.core.param.IProblemPreference;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.osgi.service.prefs.Preferences;
/**
@ -157,10 +157,10 @@ public class CodanPreferencesLoader {
* @param project
* @return project preferences node
*/
public static Preferences getProjectNode(IProject project) {
public static IEclipsePreferences getProjectNode(IProject project) {
if (!project.exists())
return null;
Preferences prefNode = new ProjectScope(project).getNode(CodanCorePlugin.PLUGIN_ID);
IEclipsePreferences prefNode = new ProjectScope(project).getNode(CodanCorePlugin.PLUGIN_ID);
if (prefNode == null)
return null;
return prefNode;
@ -171,8 +171,8 @@ public class CodanPreferencesLoader {
*
* @return project preferences node
*/
public static Preferences getWorkspaceNode() {
Preferences prefNode = new InstanceScope().getNode(CodanCorePlugin.PLUGIN_ID);
public static IEclipsePreferences getWorkspaceNode() {
IEclipsePreferences prefNode = CodanCorePlugin.getDefault().getStorePreferences();
if (prefNode == null)
return null;
return prefNode;