blob: cd65c10c5006406446954d3d921313cfe47569c6 [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2006, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.internal.nico.core;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.statet.ecommons.preferences.core.Preference;
import org.eclipse.statet.ecommons.preferences.core.util.PreferenceUtils;
import org.eclipse.statet.internal.nico.core.preferences.HistoryPreferences;
import org.eclipse.statet.nico.core.NicoPreferenceNodes;
public class NicoPreferenceInitializer extends AbstractPreferenceInitializer {
@Override
public void initializeDefaultPreferences() {
final IScopeContext scope= DefaultScope.INSTANCE;
final Map<Preference<?>, Object> map= new HashMap<>();
new HistoryPreferences().addPreferencesToMap(map);
map.put(NicoPreferenceNodes.KEY_DEFAULT_TIMEOUT, 15000);
PreferenceUtils.setPrefValues(scope, map);
}
}