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, true);
23 node.putInt(IWorkspaceSizeTrackerConstants.PREF_UPDATE_INTERVAL, 1000);
24 node.putBoolean(IWorkspaceSizeTrackerConstants.PREF_HIGHLIGHT_LOW_SPACE, true);
25 node.putLong(IWorkspaceSizeTrackerConstants.PREF_LOW_SPACE_THRESHOLD, 500);