package org.simantics.district.maps.server.prefs; import org.eclipse.core.runtime.preferences.DefaultScope; import org.osgi.service.prefs.Preferences; //import org.simantics.maps.server.ui.Activator; import org.simantics.district.maps.server.Activator; public class MapsServerPreferences { public static final String P_NODE = Activator.PLUGIN_ID; public static final String P_START_AUTOMATICALLY = "org.simantics.maps.server.startAutomatically"; public static final String P_DEFAULT_PORT = "org.simantics.maps.server.defaultPort"; public static Preferences getPreferences() { return DefaultScope.INSTANCE.getNode(MapsServerPreferences.P_NODE); } public static boolean startAutomatically() { return getPreferences().getBoolean(P_START_AUTOMATICALLY, true); } public static int defaultPort() { return getPreferences().getInt(P_DEFAULT_PORT, 8080); } }