1 package org.simantics.district.maps.server.prefs;
3 import org.eclipse.core.runtime.preferences.DefaultScope;
4 import org.osgi.service.prefs.Preferences;
5 //import org.simantics.maps.server.ui.Activator;
6 import org.simantics.district.maps.server.Activator;
8 public class MapsServerPreferences {
10 public static final String P_NODE = Activator.PLUGIN_ID;
12 public static final String P_START_AUTOMATICALLY = "org.simantics.maps.server.startAutomatically";
14 public static final String P_DEFAULT_PORT = "org.simantics.maps.server.defaultPort";
16 public static Preferences getPreferences() {
17 return DefaultScope.INSTANCE.getNode(MapsServerPreferences.P_NODE);
20 public static boolean startAutomatically() {
21 return getPreferences().getBoolean(P_START_AUTOMATICALLY, true);
24 public static int defaultPort() {
25 return getPreferences().getInt(P_DEFAULT_PORT, 8080);