diff options
| author | Szymon Brandys | 2012-03-02 10:50:59 +0000 |
|---|---|---|
| committer | Szymon Brandys | 2012-03-02 10:50:59 +0000 |
| commit | 577b508d9ac375a25aba8fcd34aebd71c73127bb (patch) | |
| tree | c3c2143e20f038b9f37d0989147929b19a36d96a | |
| parent | 4ea40760b3b7859ea85ed7b2cdf3399e24c1fbe0 (diff) | |
| download | eclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.tar.gz eclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.tar.xz eclipse.platform.resources-577b508d9ac375a25aba8fcd34aebd71c73127bb.zip | |
Removing calls to deprecated API
Change-Id: I79ed2d05dcb6dd532ded9b72c0f10be0e9b0b54c
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 980a0016f..e0f29f09c 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 763f0f4d0..142376bfe 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); |
