mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Removed use of a deprecated constructor.
This commit is contained in:
parent
34f8e32373
commit
b42e687828
3 changed files with 24 additions and 26 deletions
|
@ -45,7 +45,7 @@ public class CCoreInternals {
|
||||||
new ProjectScope(project).getNode(CCorePlugin.PLUGIN_ID).flush();
|
new ProjectScope(project).getNode(CCorePlugin.PLUGIN_ID).flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new InstanceScope().getNode(CCorePlugin.PLUGIN_ID).flush();
|
InstanceScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID).flush();
|
||||||
} catch (BackingStoreException e) {
|
} catch (BackingStoreException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core;
|
package org.eclipse.cdt.internal.core;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||||
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
|
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
|
||||||
|
@ -26,7 +23,9 @@ import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
import org.eclipse.core.runtime.preferences.DefaultScope;
|
import org.eclipse.core.runtime.preferences.DefaultScope;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
import org.eclipse.core.runtime.preferences.IScopeContext;
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
|
@ -52,7 +51,7 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
defaultOptionsMap.put(CodeReaderCache.CODE_READER_BUFFER, CodeReaderCache.DEFAULT_CACHE_SIZE_IN_MB_STRING);
|
defaultOptionsMap.put(CodeReaderCache.CODE_READER_BUFFER, CodeReaderCache.DEFAULT_CACHE_SIZE_IN_MB_STRING);
|
||||||
|
|
||||||
// Store default values to default preferences
|
// Store default values to default preferences
|
||||||
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(CCorePlugin.PLUGIN_ID);
|
IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID);
|
||||||
for (Map.Entry<String,String> entry : defaultOptionsMap.entrySet()) {
|
for (Map.Entry<String,String> entry : defaultOptionsMap.entrySet()) {
|
||||||
String optionName = entry.getKey();
|
String optionName = entry.getKey();
|
||||||
defaultPreferences.put(optionName, entry.getValue());
|
defaultPreferences.put(optionName, entry.getValue());
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.core;
|
package org.eclipse.cdt.internal.core;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
@ -66,7 +65,7 @@ public class LocalProjectScope implements IScopeContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEclipsePreferences getNode(String qualifier) {
|
public IEclipsePreferences getNode(String qualifier) {
|
||||||
return new InstanceScope().getNode(qualifier + QUALIFIER_EXT + fContext);
|
return InstanceScope.INSTANCE.getNode(qualifier + QUALIFIER_EXT + fContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue