]> gerrit.simantics Code Review - simantics/district.git/blob
8401aed4fafa8348ca36bdbdee9ba56506beb77d
[simantics/district.git] /
1 package org.simantics.maps.elevation.server.prefs;
2
3 import org.eclipse.core.runtime.preferences.InstanceScope;
4 import org.osgi.service.prefs.Preferences;
5 import org.simantics.maps.elevation.server.Activator;
6
7 public class MapsElevationServerPreferences {
8
9     public static final String P_NODE = Activator.PLUGIN_ID;
10
11     public static final String P_USE_ELEVATION_SERVER = "org.simantics.maps.elevation.server.useElevationServer";
12
13     public static Preferences getPreferences() {
14         return InstanceScope.INSTANCE.getNode(MapsElevationServerPreferences.P_NODE);
15     }
16
17     public static boolean useElevationServer() {
18         return getPreferences().getBoolean(P_USE_ELEVATION_SERVER, false);
19     }
20
21 }