1 package org.simantics.maps.elevation.server.prefs;
3 import org.eclipse.core.runtime.preferences.InstanceScope;
4 import org.osgi.service.prefs.Preferences;
5 import org.simantics.maps.elevation.server.Activator;
7 public class MapsElevationServerPreferences {
9 public static final String P_NODE = Activator.PLUGIN_ID;
11 public static final String P_USE_ELEVATION_SERVER = "org.simantics.maps.elevation.server.useElevationServer";
12 public static final String P_PIPE_DEPTH_UNDER_GROUND = "org.simantics.maps.elevation.server.pipeDepthUnderGround";
14 public static Preferences getPreferences() {
15 return InstanceScope.INSTANCE.getNode(MapsElevationServerPreferences.P_NODE);
18 public static boolean useElevationServer() {
19 return getPreferences().getBoolean(P_USE_ELEVATION_SERVER, false);
22 public static int pipeDepthUnderGround() {
23 return getPreferences().getInt(P_PIPE_DEPTH_UNDER_GROUND, -1);