Use DefaultScope.INSTANCE/InstanceScope.INSTANCE instead of deprecated constructor
diff --git a/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/core/index/sql/h2/H2IndexPreferences.java b/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/core/index/sql/h2/H2IndexPreferences.java
index f102fbc..841cf1c 100644
--- a/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/core/index/sql/h2/H2IndexPreferences.java
+++ b/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/core/index/sql/h2/H2IndexPreferences.java
@@ -14,7 +14,6 @@
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
 
 public class H2IndexPreferences extends AbstractPreferenceInitializer {
 
@@ -46,7 +45,7 @@
 
 	@Override
 	public void initializeDefaultPreferences() {
-		IEclipsePreferences p = ((IScopeContext) new DefaultScope())
+		IEclipsePreferences p = DefaultScope.INSTANCE
 				.getNode(H2Index.PLUGIN_ID);
 
 		p.putInt(DB_CACHE_SIZE, 32000); // 32Mb
diff --git a/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/internal/core/index/sql/h2/Schema.java b/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/internal/core/index/sql/h2/Schema.java
index f0f1751..a00846c 100644
--- a/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/internal/core/index/sql/h2/Schema.java
+++ b/core/plugins/org.eclipse.dltk.core.index.sql.h2/src/org/eclipse/dltk/internal/core/index/sql/h2/Schema.java
@@ -150,7 +150,7 @@
 	}
 
 	private void storeSchemaVersion(String newVersion) {
-		IEclipsePreferences node = new InstanceScope()
+		IEclipsePreferences node = InstanceScope.INSTANCE
 				.getNode(H2Index.PLUGIN_ID);
 		node.put(H2IndexPreferences.SCHEMA_VERSION, newVersion);
 		try {
diff --git a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKAssociationManager.java b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKAssociationManager.java
index 3c5c7f1..cb619c7 100644
--- a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKAssociationManager.java
+++ b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKAssociationManager.java
@@ -15,7 +15,6 @@
 
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.dltk.compiler.CharOperation;
 import org.eclipse.dltk.core.DLTKCore;
@@ -39,8 +38,9 @@
 		synchronized (this) {
 			if (cachedPatterns == null) {
 				final IEclipsePreferences prefs = getEclipsePreferences();
-				initPatterns(prefs.get(DLTKCore.LANGUAGE_FILENAME_ASSOCIATIONS,
-						new DefaultScope().getNode(qualifier).get(
+				initPatterns(prefs.get(
+						DLTKCore.LANGUAGE_FILENAME_ASSOCIATIONS,
+						DefaultScope.INSTANCE.getNode(qualifier).get(
 								DLTKCore.LANGUAGE_FILENAME_ASSOCIATIONS, null)));
 			}
 			patterns = cachedPatterns;
diff --git a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKCorePreferenceInitializer.java b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKCorePreferenceInitializer.java
index 9b9ed0f..47bcd56 100644
--- a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKCorePreferenceInitializer.java
+++ b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/DLTKCorePreferenceInitializer.java
@@ -56,7 +56,7 @@
 		optionNames.add(DLTKCore.PROJECT_SOURCE_PARSER_ID);
 
 		// Store default values to default preferences
-		IEclipsePreferences defaultPreferences = new DefaultScope()
+		IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE
 				.getNode(DLTKCore.PLUGIN_ID);
 		for (Map.Entry<String, String> entry : defaultOptionsMap.entrySet()) {
 			String optionName = entry.getKey();
diff --git a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/ModelManager.java b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/ModelManager.java
index 79f7aca..9262dee 100644
--- a/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/ModelManager.java
+++ b/core/plugins/org.eclipse.dltk.core/model/org/eclipse/dltk/internal/core/ModelManager.java
@@ -60,7 +60,6 @@
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.dltk.compiler.problem.IProblem;
 import org.eclipse.dltk.compiler.util.HashtableOfObjectToInt;
@@ -1559,7 +1558,7 @@
 
 			public void removed(IEclipsePreferences.NodeChangeEvent event) {
 				if (event.getChild() == preferencesLookup[PREF_DEFAULT]) {
-					preferencesLookup[PREF_DEFAULT] = ((IScopeContext) new DefaultScope())
+					preferencesLookup[PREF_DEFAULT] = DefaultScope.INSTANCE
 							.getNode(DLTKCore.PLUGIN_ID);
 				}
 			}
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/preferences/OptionsConfigurationBlock.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/preferences/OptionsConfigurationBlock.java
index 9c64236..9f6dba1 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/preferences/OptionsConfigurationBlock.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/internal/ui/preferences/OptionsConfigurationBlock.java
@@ -144,14 +144,14 @@
 
 	private int getRebuildCount() {
 		return fManager.getWorkingCopy(
-				new DefaultScope().getNode(DLTKUIPlugin.PLUGIN_ID)).getInt(
+				DefaultScope.INSTANCE.getNode(DLTKUIPlugin.PLUGIN_ID)).getInt(
 				REBUILD_COUNT_KEY, 0);
 	}
 
 	private void incrementRebuildCount() {
 		fRebuildCount++;
 		fManager.getWorkingCopy(
-				new DefaultScope().getNode(DLTKUIPlugin.PLUGIN_ID)).putInt(
+				DefaultScope.INSTANCE.getNode(DLTKUIPlugin.PLUGIN_ID)).putInt(
 				REBUILD_COUNT_KEY, fRebuildCount);
 	}