1 /*******************************************************************************
2 * Copyright (c) 2011 Association for Decentralized Information Management in
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.charts.preference;
14 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
15 import org.eclipse.core.runtime.preferences.DefaultScope;
16 import org.eclipse.core.runtime.preferences.IScopeContext;
17 import org.osgi.service.prefs.Preferences;
18 import org.simantics.charts.Activator;
21 * @author Toni Kalajainen
23 public class ChartPreferenceInitializer extends AbstractPreferenceInitializer {
25 public void initializeDefaultPreferences() {
26 IScopeContext context = DefaultScope.INSTANCE;
27 Preferences node = context.getNode(Activator.PLUGIN_ID);
29 node.putLong(ChartPreferences.P_REDRAW_INTERVAL, ChartPreferences.DEFAULT_REDRAW_INTERVAL);
30 node.putLong(ChartPreferences.P_AUTOSCALE_INTERVAL, ChartPreferences.DEFAULT_AUTOSCALE_INTERVAL);
31 node.putBoolean(ChartPreferences.P_DRAW_SAMPLES, ChartPreferences.DEFAULT_DRAW_SAMPLES);
32 node.put(ChartPreferences.P_TIMEFORMAT, ChartPreferences.DEFAULT_TIMEFORMAT);
33 node.put(ChartPreferences.P_VALUEFORMAT, ChartPreferences.DEFAULT_VALUEFORMAT);
34 node.put(ChartPreferences.P_TIMEWINDOW_TEMPLATE, ChartPreferences.DEFAULT_TIMEWINDOW_TEMPLATE);
35 node.put(ChartPreferences.P_DRAWMODE, ChartPreferences.DEFAULT_DRAWMODE);
36 node.put(ChartPreferences.P_AXISMODE, ChartPreferences.DEFAULT_AXISMODE);
37 node.put(ChartPreferences.P_SCALEMODE, ChartPreferences.DEFAULT_SCALEMODE);
38 node.put(ChartPreferences.P_ITEMPLACEMENT, ChartPreferences.DEFAULT_ITEMPLACEMENT);