package org.simantics.maps.elevation.server.prefs; import org.eclipse.core.runtime.preferences.InstanceScope; import org.osgi.service.prefs.Preferences; import org.simantics.maps.elevation.server.Activator; public class MapsElevationServerPreferences { public static final String P_NODE = Activator.PLUGIN_ID; public static final String P_USE_ELEVATION_SERVER = "org.simantics.maps.elevation.server.useElevationServer"; public static final String P_PIPE_DEPTH_UNDER_GROUND = "org.simantics.maps.elevation.server.pipeDepthUnderGround"; public static Preferences getPreferences() { return InstanceScope.INSTANCE.getNode(MapsElevationServerPreferences.P_NODE); } public static boolean useElevationServer() { return getPreferences().getBoolean(P_USE_ELEVATION_SERVER, false); } public static int pipeDepthUnderGround() { return getPreferences().getInt(P_PIPE_DEPTH_UNDER_GROUND, -1); } }