1 package org.simantics.ui.workspace.tracker.internal.preferences;
3 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
4 import org.eclipse.core.runtime.preferences.DefaultScope;
5 import org.eclipse.core.runtime.preferences.IScopeContext;
6 import org.osgi.service.prefs.Preferences;
7 import org.simantics.ui.workspace.tracker.internal.contributions.IWorkspaceSizeTrackerConstants;
10 * @author Tuukka Lehtonen
13 public class WorkspaceSizeTrackingPreferenceInitializer extends AbstractPreferenceInitializer {
15 public WorkspaceSizeTrackingPreferenceInitializer() {
19 public void initializeDefaultPreferences() {
20 IScopeContext context = DefaultScope.INSTANCE;
21 Preferences node = context.getNode(IWorkspaceSizeTrackerConstants.P_NODE);
22 node.putBoolean(IWorkspaceSizeTrackerConstants.PREF_SHOW_MONITOR, IWorkspaceSizeTrackerConstants.DEFAULT_SHOW_MONITOR);
23 node.putInt(IWorkspaceSizeTrackerConstants.PREF_UPDATE_INTERVAL, IWorkspaceSizeTrackerConstants.DEFAULT_UPDATE_INTERVAL);
24 node.putBoolean(IWorkspaceSizeTrackerConstants.PREF_HIGHLIGHT_LOW_SPACE, IWorkspaceSizeTrackerConstants.DEFAULT_HIGHLIGHT_LOW_SPACE);
25 node.putLong(IWorkspaceSizeTrackerConstants.PREF_LOW_SPACE_THRESHOLD, IWorkspaceSizeTrackerConstants.DEFAULT_LOW_SPACE_THRESHOLD);