]> gerrit.simantics Code Review - simantics/platform.git/blob
27a620e50fcd907db868d96c566a657027772f64
[simantics/platform.git] /
1 package org.simantics.ui.workspace.tracker.internal.preferences;
2
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;
8
9 /**
10  * @author Tuukka Lehtonen
11  * @since 1.31.0
12  */
13 public class WorkspaceSizeTrackingPreferenceInitializer extends AbstractPreferenceInitializer {
14
15         public WorkspaceSizeTrackingPreferenceInitializer() {
16         }
17
18         @Override
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);
26         }
27
28 }