Index: applications/editors/josm/plugins/livegps/build.xml
===================================================================
--- applications/editors/josm/plugins/livegps/build.xml	(revision 33738)
+++ applications/editors/josm/plugins/livegps/build.xml	(revision 33739)
@@ -2,5 +2,5 @@
 <project name="livegps" default="dist" basedir=".">
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
-    <property name="plugin.main.version" value="12289"/>
+    <property name="plugin.main.version" value="12987"/>
 	
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 33738)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsAcquirer.java	(revision 33739)
@@ -22,4 +22,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.Logging;
 
 public class LiveGpsAcquirer implements Runnable {
@@ -47,8 +48,8 @@
 
         gpsdHost = Main.pref.get(C_HOST, DEFAULT_HOST);
-        gpsdPort = Main.pref.getInteger(C_PORT, DEFAULT_PORT);
+        gpsdPort = Main.pref.getInt(C_PORT, DEFAULT_PORT);
         // put the settings back in to the preferences, makes keys appear.
         Main.pref.put(C_HOST, gpsdHost);
-        Main.pref.putInteger(C_PORT, gpsdPort);
+        Main.pref.putInt(C_PORT, gpsdPort);
     }
 
@@ -133,5 +134,5 @@
                         Thread.sleep(1000);
                     } catch (InterruptedException ignore) {
-                        Main.trace(ignore);
+                        Logging.trace(ignore);
                     }
                 }
@@ -162,5 +163,5 @@
                 oldGpsData = gpsData;
             } catch (IOException iox) {
-                Main.warn(iox, "LiveGps: lost connection to gpsd");
+                Logging.log(Logging.LEVEL_WARN, "LiveGps: lost connection to gpsd", iox);
                 fireGpsStatusChangeEvent(
                         LiveGpsStatus.GpsStatus.CONNECTION_FAILED,
@@ -170,5 +171,5 @@
                     Thread.sleep(1000);
                 } catch (InterruptedException ignore) {
-                    Main.trace(ignore);
+                    Logging.trace(ignore);
                 }
                 // send warning to layer
@@ -176,5 +177,5 @@
         }
 
-        Main.info("LiveGps: Disconnected from gpsd");
+        Logging.info("LiveGps: Disconnected from gpsd");
         fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.DISCONNECTED,
                 tr("Not connected"));
@@ -190,5 +191,5 @@
         String line, type, release;
 
-        Main.info("LiveGps: trying to connect to gpsd at " + gpsdHost + ":" + gpsdPort);
+        Logging.info("LiveGps: trying to connect to gpsd at " + gpsdHost + ":" + gpsdPort);
         fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.CONNECTING, tr("Connecting"));
 
@@ -199,5 +200,5 @@
                 break;
             } catch (IOException e) {
-                Main.warn("LiveGps: Could not open connection to gpsd: " + e);
+                Logging.warn("LiveGps: Could not open connection to gpsd: " + e);
                 gpsdSocket = null;
             }
@@ -222,12 +223,12 @@
             if (type.equals("VERSION")) {
                 release = greeting.getString("release");
-                Main.info("LiveGps: Connected to gpsd " + release);
+                Logging.info("LiveGps: Connected to gpsd " + release);
             } else
-                Main.info("LiveGps: Unexpected JSON in gpsd greeting: " + line);
+                Logging.info("LiveGps: Unexpected JSON in gpsd greeting: " + line);
         } catch (JsonException jex) {
             if (line.startsWith("GPSD,")) {
                 connected = true;
                 JSONProtocol = false;
-                Main.info("LiveGps: Connected to old gpsd protocol version.");
+                Logging.info("LiveGps: Connected to old gpsd protocol version.");
                 fireGpsStatusChangeEvent(LiveGpsStatus.GpsStatus.CONNECTED, tr("Connected"));
             }
@@ -257,5 +258,5 @@
             gpsdSocket = null;
         } catch (Exception e) {
-            Main.warn("LiveGps: Unable to close socket; reconnection may not be possible");
+            Logging.warn("LiveGps: Unable to close socket; reconnection may not be possible");
         }
     }
@@ -272,5 +273,5 @@
             report = Json.createReader(new StringReader(line)).readObject();
         } catch (JsonException jex) {
-            Main.warn("LiveGps: line read from gpsd is not a JSON object:" + line);
+            Logging.warn("LiveGps: line read from gpsd is not a JSON object:" + line);
             return null;
         }
@@ -332,5 +333,5 @@
                         course = Float.parseFloat(status[8]);
                     } catch (NumberFormatException nex) {
-                        Main.debug(nex);
+                        Logging.debug(nex);
                     }
                     return new LiveGpsData(lat, lon, course, speed);
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 33738)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsData.java	(revision 33739)
@@ -6,8 +6,9 @@
 import java.awt.Point;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.MapFrame;
 
 /**
@@ -179,7 +180,8 @@
      */
     public Way getWay() {
-        if (way == null && Main.map != null && Main.map.mapView != null) {
-            Point xy = Main.map.mapView.getPoint(getLatLon());
-            way = Main.map.mapView.getNearestWay(xy, OsmPrimitive::isUsable);
+        MapFrame map = MainApplication.getMap();
+        if (way == null && map != null && map.mapView != null) {
+            Point xy = map.mapView.getPoint(getLatLon());
+            way = map.mapView.getNearestWay(xy, OsmPrimitive::isUsable);
         }
         return way;
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java	(revision 33738)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsDrawHelper.java	(revision 33739)
@@ -1,6 +1,4 @@
 // License: Public Domain. For details, see LICENSE file.
 package livegps;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.Color;
@@ -11,7 +9,6 @@
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.data.preferences.CachingProperty;
-import org.openstreetmap.josm.data.preferences.ColorProperty;
+import org.openstreetmap.josm.data.preferences.NamedColorProperty;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.gui.layer.MapViewGraphics;
 import org.openstreetmap.josm.gui.layer.gpx.GpxDrawHelper;
@@ -24,7 +21,7 @@
 
     private static final CachingProperty<Color> COLOR_POSITION =
-            new ColorProperty(C_LIVEGPS_COLOR_POSITION, Color.RED).cached();
+            new NamedColorProperty(C_LIVEGPS_COLOR_POSITION, Color.RED).cached();
     private static final CachingProperty<Color> COLOR_POSITION_ESTIMATE =
-            new ColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached();
+            new NamedColorProperty(C_LIVEGPS_COLOR_POSITION_ESTIMATE, Color.CYAN).cached();
 
     private static final String C_CURSOR_H = "livegps.cursor_height"; /* in pixels */
@@ -51,7 +48,7 @@
         Point screen = mv.getPoint(lastPoint.getCoor());
 
-        int TriaHeight = Main.pref.getInteger(C_CURSOR_H, 20);
-        int TriaWidth = Main.pref.getInteger(C_CURSOR_W, 10);
-        int TriaThick = Main.pref.getInteger(C_CURSOR_T, 4);
+        int TriaHeight = Main.pref.getInt(C_CURSOR_H, 20);
+        int TriaWidth = Main.pref.getInt(C_CURSOR_W, 10);
+        int TriaThick = Main.pref.getInt(C_CURSOR_T, 4);
 
         /*
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 33738)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsLayer.java	(revision 33739)
@@ -14,9 +14,9 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxData;
 import org.openstreetmap.josm.data.gpx.GpxTrack;
 import org.openstreetmap.josm.data.gpx.WayPoint;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 
@@ -80,10 +80,10 @@
     public void center() {
         if (lastPoint != null)
-            Main.map.mapView.zoomTo(lastPoint.getCoor());
+            MainApplication.getMap().mapView.zoomTo(lastPoint.getCoor());
     }
 
     public void conditionalCenter(LatLon Pos) {
-        Point2D P = Main.map.mapView.getPoint2D(Pos);
-        Rectangle rv = Main.map.mapView.getBounds(null);
+        Point2D P = MainApplication.getMap().mapView.getPoint2D(Pos);
+        Rectangle rv = MainApplication.getMap().mapView.getBounds(null);
         Date date = new Date();
         long current = date.getTime();
@@ -92,5 +92,5 @@
 
         if (!rv.contains(P) || (centerInterval > 0 && current - lastCenter >= centerInterval)) {
-            Main.map.mapView.zoomTo(Pos);
+            MainApplication.getMap().mapView.zoomTo(Pos);
             lastCenter = current;
         }
@@ -111,5 +111,5 @@
                 setCurrentPosition(lastData.getLatitude(), lastData.getLongitude());
                 if (allowRedraw())
-                    Main.map.repaint();
+                    MainApplication.getMap().repaint();
             }
         }
@@ -139,18 +139,18 @@
      */
     private void initIntervals() {
-        if ((refreshInterval = Main.pref.getInteger(oldC_REFRESH_INTERVAL, 0)) != 0) {
+        if ((refreshInterval = Main.pref.getInt(oldC_REFRESH_INTERVAL, 0)) != 0) {
             refreshInterval *= 1000;
             Main.pref.put(oldC_REFRESH_INTERVAL, null);
         } else
-            refreshInterval = Main.pref.getInteger(C_REFRESH_INTERVAL, DEFAULT_REFRESH_INTERVAL);
+            refreshInterval = Main.pref.getInt(C_REFRESH_INTERVAL, DEFAULT_REFRESH_INTERVAL);
 
-        centerInterval = Main.pref.getInteger(C_CENTER_INTERVAL, DEFAULT_CENTER_INTERVAL);
-        centerFactor = Main.pref.getInteger(C_CENTER_FACTOR, DEFAULT_CENTER_FACTOR);
+        centerInterval = Main.pref.getInt(C_CENTER_INTERVAL, DEFAULT_CENTER_INTERVAL);
+        centerFactor = Main.pref.getInt(C_CENTER_FACTOR, DEFAULT_CENTER_FACTOR);
         if (centerFactor <= 1 || centerFactor >= 99)
             centerFactor = DEFAULT_CENTER_FACTOR;
 
-            Main.pref.putInteger(C_REFRESH_INTERVAL, refreshInterval);
-            Main.pref.putInteger(C_CENTER_INTERVAL, centerInterval);
-        Main.pref.putInteger(C_CENTER_FACTOR, (int) centerFactor);
+            Main.pref.putInt(C_REFRESH_INTERVAL, refreshInterval);
+            Main.pref.putInt(C_CENTER_INTERVAL, centerInterval);
+        Main.pref.putInt(C_CENTER_FACTOR, (int) centerFactor);
 
         /*
Index: applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java
===================================================================
--- applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 33738)
+++ applications/editors/josm/plugins/livegps/src/livegps/LiveGpsPlugin.java	(revision 33739)
@@ -13,7 +13,7 @@
 import javax.swing.JMenu;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -110,5 +110,5 @@
         enableTracking(false);
         lgpscapture.setSelected(false);
-        Main.getLayerManager().removeLayerChangeListener(this);
+        MainApplication.getLayerManager().removeLayerChangeListener(this);
         lgpslayer = null;
     }
@@ -116,5 +116,5 @@
     public LiveGpsPlugin(PluginInformation info) {
         super(info);
-        MainMenu menu = Main.main.menu;
+        MainMenu menu = MainApplication.getMenu();
         lgpsmenu = menu.gpsMenu;
         if (lgpsmenu.getItemCount() > 0) {
@@ -173,6 +173,6 @@
             if (lgpslayer == null) {
                 lgpslayer = new LiveGpsLayer(data);
-                Main.getLayerManager().addLayer(lgpslayer);
-                Main.getLayerManager().addLayerChangeListener(this);
+                MainApplication.getLayerManager().addLayer(lgpslayer);
+                MainApplication.getLayerManager().addLayerChangeListener(this);
                 lgpslayer.setAutoCenter(isAutoCenter());
             }
