aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSzymon Brandys2012-03-02 05:50:59 (EST)
committerSzymon Brandys2012-03-02 05:50:59 (EST)
commit577b508d9ac375a25aba8fcd34aebd71c73127bb (patch)
treec3c2143e20f038b9f37d0989147929b19a36d96a
parent4ea40760b3b7859ea85ed7b2cdf3399e24c1fbe0 (diff)
downloadeclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.zip
eclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.tar.gz
eclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.tar.bz2
Removing calls to deprecated APIrefs/changes/27/5227/1
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectContentTypes.java6
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java4
2 files changed, 4 insertions, 6 deletions
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectContentTypes.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectContentTypes.java
index 980a001..e0f29f0 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectContentTypes.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectContentTypes.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 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
@@ -65,7 +65,7 @@ public class ProjectContentTypes {
private IScopeContext getDelegate() {
if (!usesContentTypePreferences(project.getName()))
- return ProjectContentTypes.INSTANCE_SCOPE;
+ return InstanceScope.INSTANCE;
return projectScope;
}
@@ -95,8 +95,6 @@ public class ProjectContentTypes {
private static final String CONTENT_TYPE_PREF_NODE = "content-types"; //$NON-NLS-1$
- static final InstanceScope INSTANCE_SCOPE = new InstanceScope();
-
private static final String PREF_LOCAL_CONTENT_TYPE_SETTINGS = "enabled"; //$NON-NLS-1$
private static final Preferences PROJECT_SCOPE = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
private Cache contentTypesPerProject;
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
index 763f0f4..142376b 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/WorkspaceDescription.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -33,7 +33,7 @@ public class WorkspaceDescription extends ModelObject implements IWorkspaceDescr
public WorkspaceDescription(String name) {
super(name);
// initialize based on the values in the default preferences
- IEclipsePreferences node = new DefaultScope().getNode(ResourcesPlugin.PI_RESOURCES);
+ IEclipsePreferences node = DefaultScope.INSTANCE.getNode(ResourcesPlugin.PI_RESOURCES);
autoBuilding = node.getBoolean(ResourcesPlugin.PREF_AUTO_BUILDING, PreferenceInitializer.PREF_AUTO_BUILDING_DEFAULT);
maxBuildIterations = node.getInt(ResourcesPlugin.PREF_MAX_BUILD_ITERATIONS, PreferenceInitializer.PREF_MAX_BUILD_ITERATIONS_DEFAULT);
applyFileStatePolicy = node.getBoolean(ResourcesPlugin.PREF_APPLY_FILE_STATE_POLICY, PreferenceInitializer.PREF_APPLY_FILE_STATE_POLICY_DEFAULT);