Index: /applications/editors/josm/plugins/gpsblam/.project
===================================================================
--- /applications/editors/josm/plugins/gpsblam/.project	(revision 34514)
+++ /applications/editors/josm/plugins/gpsblam/.project	(revision 34515)
@@ -16,7 +16,13 @@
 			</arguments>
 		</buildCommand>
+		<buildCommand>
+			<name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
 	</natures>
 </projectDescription>
Index: /applications/editors/josm/plugins/gpsblam/build.xml
===================================================================
--- /applications/editors/josm/plugins/gpsblam/build.xml	(revision 34514)
+++ /applications/editors/josm/plugins/gpsblam/build.xml	(revision 34515)
@@ -5,55 +5,20 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12636"/>
+    <property name="plugin.main.version" value="14153"/>
 
-    <!--
-    **********************************************************
-    ** include targets that all plugins have in common
-    **********************************************************
+    <!-- Configure these properties (replace "..." accordingly).
+         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
     -->
+    <property name="plugin.author" value="Russell Edwards"/>
+    <property name="plugin.class" value="org.openstreetmap.josm.plugins.gpsblam.GPSBlamPlugin"/>
+    <property name="plugin.description" value="Analyse a set of GPS points to obtain its centre and direction of spread."/>
+    <property name="plugin.icon" value="images/mapmode/gpsblam_mode.png"/>
+    <property name="plugin.link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPSBlam"/>
+    <!--<property name="plugin.early" value="..."/>-->
+    <!--<property name="plugin.requires" value="..."/>-->
+    <!--<property name="plugin.stage" value="..."/>-->
+
+    <!-- ** include targets that all plugins have in common ** -->
     <import file="../build-common.xml"/>
-  
-    <!--
-    **********************************************************
-    ** dist - creates the plugin jar
-    **********************************************************
-    -->
-    <target name="dist" depends="compile,revision">
-        <echo message="creating ${ant.project.name}.jar ... "/>
-        <copy todir="${plugin.build.dir}/resources">
-            <fileset dir="resources"/>
-        </copy>
-        <copy todir="${plugin.build.dir}/images">
-            <fileset dir="images"/>
-        </copy>
-        <copy todir="${plugin.build.dir}/data">
-            <fileset dir="data"/>
-        </copy>
-        <copy todir="${plugin.build.dir}">
-            <fileset dir=".">
-                <include name="README"/>
-                <include name="LICENSE"/>
-            </fileset>
-        </copy>
-        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}" manifestencoding="UTF-8">
-            <!--
-            ************************************************
-            ** configure these properties. Most of them will be copied to the plugins
-            ** manifest file. Property values will also show up in the list available
-            ** plugins: https://josm.openstreetmap.de/wiki/Plugins.
-            **
-            ************************************************
-            -->
-            <manifest>
-                <attribute name="Author" value="Russell Edwards"/>
-                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.gpsblam.GPSBlamPlugin"/>
-                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
-                <attribute name="Plugin-Description" value="Analyse a set of GPS points to obtain its centre and direction of spread."/>
-                <attribute name="Plugin-Icon" value="images/mapmode/gpsblam_mode.png"/>
-                <attribute name="Plugin-Link" value="https://wiki.openstreetmap.org/wiki/JOSM/Plugins/GPSBlam"/>
-                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
-                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
-            </manifest>
-        </jar>
-    </target>
+
 </project>
Index: /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java
===================================================================
--- /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 34514)
+++ /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamInputData.java	(revision 34515)
@@ -9,5 +9,4 @@
 import java.util.LinkedList;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.CachedLatLon;
 import org.openstreetmap.josm.data.gpx.GpxTrack;
@@ -15,4 +14,5 @@
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
@@ -30,8 +30,8 @@
     GPSBlamInputData(Point p1, Point p2, int radius) {
         Collection<Layer> layers = MainApplication.getLayerManager().getLayers();
-        Projection projection = Main.getProjection();
+        Projection projection = ProjectionRegistry.getProjection();
         for (Layer l : layers) {
             if (l.isVisible() && l instanceof GpxLayer) {
-                for (GpxTrack track : ((GpxLayer)l).data.tracks) {
+                for (GpxTrack track : ((GpxLayer) l).data.tracks) {
                     for (GpxTrackSegment segment: track.getSegments()) {
                         for (WayPoint wayPoint : segment.getWayPoints()) {
@@ -69,16 +69,16 @@
                                     this.add(cll, wayPoint);
                                 }
-                            } // end if circular else line based selection
-                        } // end loop over wayponts in segment
-                    } // end loop over segments in track
-                } // end loop over tracks in layer
-            } // end if layer visible
-        } // end loop over layers
-    } // end constructor
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
 
     private void add(CachedLatLon cll, WayPoint wayPoint) {
         this.add(cll);
         Calendar day = new GregorianCalendar();
-        day.setTimeInMillis((long)wayPoint.time*1000);
+        day.setTimeInMillis((long) (wayPoint.time*1000d));
         day.set(Calendar.HOUR_OF_DAY, 0);
         day.set(Calendar.MINUTE, 0);
Index: /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMarker.java
===================================================================
--- /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMarker.java	(revision 34514)
+++ /applications/editors/josm/plugins/gpsblam/src/org/openstreetmap/josm/plugins/gpsblam/GPSBlamMarker.java	(revision 34515)
@@ -11,8 +11,8 @@
 import java.awt.geom.Point2D;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.CachedLatLon;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.MapView;
 
@@ -23,7 +23,10 @@
     private static final double FAC = 2.45; // 2.45 gives 95% CI for 2D
 
-    /** construct a blammarker by analysis of selected GPS points */
+    /**
+     * Construct a blammarker by analysis of selected GPS points
+     * @param inputData input data
+     */
     GPSBlamMarker(GPSBlamInputData inputData) {
-        Projection projection = Main.getProjection();
+        Projection projection = ProjectionRegistry.getProjection();
         // get mean east, north
         double meanEast=0.0, meanNorth=0.0;
@@ -67,5 +70,5 @@
 
         // save latlon coords of the mean and the ends of the crosshairs
-        Projection proj = Main.getProjection();
+        Projection proj = ProjectionRegistry.getProjection();
         mean = new CachedLatLon(proj.eastNorth2latlon(new EastNorth(meanEast, meanNorth)));
         hair1Coord1 = new CachedLatLon(proj.eastNorth2latlon(
@@ -88,5 +91,5 @@
 
     void paint(Graphics2D g, MapView mv) {
-        Projection projection = Main.getProjection();
+        Projection projection = ProjectionRegistry.getProjection();
         g.setColor(Color.GREEN);
         g.setPaintMode();
