Index: applications/editors/josm/plugins/infomode/.checkstyle
===================================================================
--- applications/editors/josm/plugins/infomode/.checkstyle	(revision 32789)
+++ applications/editors/josm/plugins/infomode/.checkstyle	(revision 32789)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="true" sync-formatter="false">
+  <local-check-config name="JOSM" location="/JOSM/tools/checkstyle/josm_checks.xml" type="project" description="">
+    <additional-data name="protect-config-file" value="false"/>
+  </local-check-config>
+  <fileset name="all" enabled="true" check-config-name="JOSM" local="true">
+    <file-match-pattern match-pattern="." include-pattern="true"/>
+  </fileset>
+  <filter name="DerivedFiles" enabled="true"/>
+  <filter name="FilesFromPackage" enabled="true">
+    <filter-data value="data"/>
+    <filter-data value="images"/>
+    <filter-data value="styles"/>
+    <filter-data value="resources"/>
+    <filter-data value="scripts"/>
+  </filter>
+</fileset-config>
Index: applications/editors/josm/plugins/infomode/.project
===================================================================
--- applications/editors/josm/plugins/infomode/.project	(revision 32788)
+++ applications/editors/josm/plugins/infomode/.project	(revision 32789)
@@ -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/infomode/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- applications/editors/josm/plugins/infomode/.settings/org.eclipse.jdt.ui.prefs	(revision 32789)
+++ applications/editors/josm/plugins/infomode/.settings/org.eclipse.jdt.ui.prefs	(revision 32789)
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 32788)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoMode.java	(revision 32789)
@@ -1,11 +1,3 @@
-/*
- * This file is part of InfoMode plugin for JOSM.
- * http://wiki.openstreetmap.org/wiki/JOSM/Plugins/InfoMode
- *
- * Licence: GPL v2 or later
- * Author:  Alexei Kasatkin, 2011
- * Thanks to authors of BuildingTools, ImproveWayAccuracy
- * for good sample code
- */
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.infomode;
 
@@ -60,7 +52,7 @@
     InfoMode(MapFrame mapFrame) {
         super(tr("InfoMode"), "infomode.png", tr("GPX info mode"),
-		Shortcut.registerShortcut("mapmode:infomode", tr("Mode: {0}", tr("GPX info mode")), KeyEvent.VK_BACK_SLASH, Shortcut.DIRECT), mapFrame, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
-        infoPanel=new InfoPanel();
-
+                Shortcut.registerShortcut("mapmode:infomode", tr("Mode: {0}", tr("GPX info mode")), KeyEvent.VK_BACK_SLASH, Shortcut.DIRECT),
+                mapFrame, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+        infoPanel = new InfoPanel();
     }
 
@@ -90,4 +82,5 @@
                     AWTEvent.KEY_EVENT_MASK);
         } catch (SecurityException ex) {
+            Main.error(ex);
         }
     }
@@ -100,9 +93,10 @@
 
         Main.map.mapView.removeTemporaryLayer(this);
-        if (oldPopup!=null) oldPopup.hide();
+        if (oldPopup != null) oldPopup.hide();
 
         try {
             Toolkit.getDefaultToolkit().removeAWTEventListener(this);
         } catch (SecurityException ex) {
+            Main.error(ex);
         }
 
@@ -115,6 +109,4 @@
     }
 
-
-
     //////////    Event listener methods
 
@@ -122,5 +114,5 @@
     public void paint(Graphics2D g, MapView mv, Bounds bbox) {
         if (pos == null) return;
-        Layer curL= mv.getLayerManager().getActiveLayer();
+        Layer curL = mv.getLayerManager().getActiveLayer();
         if (curL instanceof GpxLayer) showLayerInfo(g, curL, mv); else {
             for (Layer l : mv.getLayerManager().getLayers()) {
@@ -155,7 +147,8 @@
         if (!isEnabled()) return;
         if (e.getButton() != MouseEvent.BUTTON1) return;
-        if (oldPopup!=null) {
+        if (oldPopup != null) {
             oldPopup.hide();
-            oldPopup=null;        wpOld=null;
+            oldPopup = null;
+            wpOld = null;
         }
         repaint();
@@ -164,7 +157,8 @@
     @Override
     public void mouseDragged(MouseEvent e) {
-        if (oldPopup!=null) {
+        if (oldPopup != null) {
             oldPopup.hide();
-            oldPopup=null;        wpOld=null;
+            oldPopup = null;
+            wpOld = null;
         }
     }
@@ -209,8 +203,6 @@
 // </editor-fold>
 
-
-
     private void repaint() {
-        if (Main.map!=null) Main.map.mapView.repaint();
+        if (Main.map != null) Main.map.mapView.repaint();
     }
     /*private void setStatusLine(String tr) {
@@ -222,12 +214,15 @@
         Layer l = getLayerManager().getActiveLayer();
 
-        if (l instanceof GpxLayer && pos!=null) {
-            GpxLayer gpxL = (GpxLayer )l;
+        if (l instanceof GpxLayer && pos != null) {
+            GpxLayer gpxL = (GpxLayer) l;
             Set<GpxTrack> toRemove = new HashSet<>();
             for (GpxTrack track : gpxL.data.tracks) {
-                boolean f=true;
+                boolean f = true;
                 sg: for (GpxTrackSegment seg : track.getSegments()) {
                     for (WayPoint S : seg.getWayPoints()) {
-                        if (S.time!=0) {f=false; break sg;}
+                        if (S.time != 0) {
+                            f = false;
+                            break sg;
+                        }
                     }
                 }
@@ -239,27 +234,27 @@
 
     private boolean showLayerInfo(Graphics2D g, Layer l, MapView mv) {
-            GpxLayer gpxL = (GpxLayer )l;
-
-            double minDist=1e9,d;
-            WayPoint wp=null,oldWp=null,prevWp=null;
-            GpxTrack trk=null;
+            GpxLayer gpxL = (GpxLayer) l;
+
+            double minDist = 1e9, d;
+            WayPoint wp = null, oldWp = null, prevWp = null;
+            GpxTrack trk = null;
             double maxD = mv.getDist100Pixel()/3;
             for (GpxTrack track : gpxL.data.tracks) {
                 for (GpxTrackSegment seg : track.getSegments()) {
-                    oldWp=null;// next segment will have new previous point
+                    oldWp = null; // next segment will have new previous point
                     for (WayPoint S : seg.getWayPoints()) {
                         d = S.getEastNorth().distance(pos);
 
-                        if (d<minDist && d<maxD) {
+                        if (d < minDist && d < maxD) {
                             minDist = d;
-                            prevWp=oldWp;
-                            wp=S;
-                            trk=track;
+                            prevWp = oldWp;
+                            wp = S;
+                            trk = track;
                             }
-                        oldWp=S;
+                        oldWp = S;
                     }
                 }
             }
-            if (wp!=null) {
+            if (wp != null) {
                 Point p = mv.getPoint(wp.getCoor());
 
@@ -267,12 +262,12 @@
                 g.fillOval(p.x-10, p.y-10, 20, 20); // mark selected point
                 if (shift) { // highlight track
-                    g.setColor(new Color(255,30,0,128));
+                    g.setColor(new Color(255, 30, 0, 128));
                     Stroke oldStroke = g.getStroke();
-                    g.setStroke( new BasicStroke(10) );
+                    g.setStroke(new BasicStroke(10));
                     for (GpxTrackSegment seg : trk.getSegments()) {
-                    Point oldP=null,curP=null;// next segment will have new previous point
+                    Point oldP = null, curP = null; // next segment will have new previous point
                         for (WayPoint S : seg.getWayPoints()) {
                             curP = mv.getPoint(S.getEastNorth());
-                            if (oldP!=null) g.drawLine(oldP.x, oldP.y, curP.x, curP.y);
+                            if (oldP != null) g.drawLine(oldP.x, oldP.y, curP.x, curP.y);
                             oldP = curP;
                         }
@@ -280,22 +275,23 @@
                     g.setStroke(oldStroke);
                 }
-                Point s=mv.getLocationOnScreen();
+                Point s = mv.getLocationOnScreen();
                 int pcx = s.x+p.x-40;
                 int pcy = s.y+p.y+30;
-                if (shift) {pcx+=40; pcy-=30;}
-
-                if (wp!=wpOld) {
-                    if (oldPopup!=null) oldPopup.hide();
-                    double vel=-1;
-                    if (prevWp!=null && wp.time!=prevWp.time) {
-                        vel=wp.getCoor().greatCircleDistance(prevWp.getCoor())/
+                if (shift) {
+                    pcx += 40;
+                    pcy -= 30;
+                }
+                if (wp != wpOld) {
+                    if (oldPopup != null) oldPopup.hide();
+                    double vel = -1;
+                    if (prevWp != null && wp.time != prevWp.time) {
+                        vel = wp.getCoor().greatCircleDistance(prevWp.getCoor())/
                                 (wp.time-prevWp.time)*3.6;
                     }
-                    infoPanel.setData(wp,trk,vel,gpxL.data.tracks);
-                    Popup pp=PopupFactory.getSharedInstance().getPopup(mv, infoPanel,
-                            pcx, pcy);
+                    infoPanel.setData(wp, trk, vel, gpxL.data.tracks);
+                    Popup pp = PopupFactory.getSharedInstance().getPopup(mv, infoPanel, pcx, pcy);
                     pp.show();
-                    wpOld=wp;
-                    oldPopup=pp;
+                    wpOld = wp;
+                    oldPopup = pp;
                 }
                 return true;
Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoModePlugin.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoModePlugin.java	(revision 32788)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoModePlugin.java	(revision 32789)
@@ -1,12 +1,5 @@
-/*
- * This file is part of InfoMode plugin for JOSM.
- * http://wiki.openstreetmap.org/wiki/JOSM/Plugins/InfoMode
- *
- * Licence: GPL v2 or later
- * Author:  Alexei Kasatkin, 2011
- * Ideas by siberiano, Ilis, chnav, Polarbear-j, 
- */
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.infomode;
 
-package org.openstreetmap.josm.plugins.infomode;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.IconToggleButton;
@@ -14,4 +7,5 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+
 public class InfoModePlugin extends Plugin {
 
@@ -24,5 +18,5 @@
         if (oldFrame == null && newFrame != null) {
             Main.map.addMapMode(new IconToggleButton(new InfoMode(Main.map)));
-        }        
+        }
     }
 }
Index: applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java
===================================================================
--- applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java	(revision 32788)
+++ applications/editors/josm/plugins/infomode/src/org/openstreetmap/josm/plugins/infomode/InfoPanel.java	(revision 32789)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.plugins.infomode;
 
@@ -32,25 +33,25 @@
     private DateFormat df;
 
-    private JLabel label1=new JLabel();
-    private JLabel label2=new JLabel();
-    private JLabel label3=new JLabel();
-    private JLabel label4=new JLabel();
-    private JLabel label5=new JLabel();
-    private JLabel label6=new JLabel();
+    private JLabel label1 = new JLabel();
+    private JLabel label2 = new JLabel();
+    private JLabel label3 = new JLabel();
+    private JLabel label4 = new JLabel();
+    private JLabel label5 = new JLabel();
+    private JLabel label6 = new JLabel();
     private JButton but1 = new JButton(tr("Delete this"));
     private JButton but2 = new JButton(tr("Delete this&older"));
 
-    public InfoPanel() {
+    InfoPanel() {
         super(new GridBagLayout());
-        df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT,DateFormat.DEFAULT, Locale.getDefault());
-        setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-        add(label1, GBC.eol().insets(10,0,0,0));
-        add(label2, GBC.eol().insets(10,0,0,0));
-        add(label3, GBC.eol().insets(10,0,0,0));
-        add(label4, GBC.eol().insets(10,0,0,0));
-        add(label5, GBC.eol().insets(10,0,0,0));
-        add(label6, GBC.eol().insets(10,0,0,0));
-        add(but1, GBC.std().insets(10,5,0,0));
-        add(but2, GBC.eop().insets(10,5,0,0));
+        df = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.getDefault());
+        setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+        add(label1, GBC.eol().insets(10, 0, 0, 0));
+        add(label2, GBC.eol().insets(10, 0, 0, 0));
+        add(label3, GBC.eol().insets(10, 0, 0, 0));
+        add(label4, GBC.eol().insets(10, 0, 0, 0));
+        add(label5, GBC.eol().insets(10, 0, 0, 0));
+        add(label6, GBC.eol().insets(10, 0, 0, 0));
+        add(but1, GBC.std().insets(10, 5, 0, 0));
+        add(but2, GBC.eop().insets(10, 5, 0, 0));
         // lightweight hyperlink
         label6.addMouseListener(new MouseListener() {
@@ -58,19 +59,23 @@
             public void mouseClicked(MouseEvent e) {
                 String s = label6.getText();
-                OpenBrowser.displayUrl( s.substring(9, s.length()-11) );
+                OpenBrowser.displayUrl(s.substring(9, s.length()-11));
             }
+
             @Override
-			public void mousePressed(MouseEvent e) { }
+            public void mousePressed(MouseEvent e) { }
+
             @Override
-			public void mouseReleased(MouseEvent e) { }
+            public void mouseReleased(MouseEvent e) { }
+
             @Override
-			public void mouseEntered(MouseEvent e) { }
+            public void mouseEntered(MouseEvent e) { }
+
             @Override
-			public void mouseExited(MouseEvent e) { }
+            public void mouseExited(MouseEvent e) { }
         });
         but1.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
-                if (tracks!=null) tracks.remove(trk);
+                if (tracks != null) tracks.remove(trk);
                 Main.map.mapView.repaint();
             }
@@ -79,19 +84,24 @@
             @Override
             public void actionPerformed(ActionEvent e) {
-            if (tracks==null) return;
+            if (tracks == null) return;
             Set<GpxTrack> toRemove = new HashSet<>();
 
-            double tm=-1;
+            double tm = -1;
             for (GpxTrackSegment seg : trk.getSegments()) {
                     for (WayPoint S : seg.getWayPoints()) {
-                        if (S.time>tm) {tm=S.time;}
+                        if (S.time > tm) {
+                            tm = S.time;
+                        }
                     }
                 }
 
             for (GpxTrack track : tracks) {
-                boolean f=true;
+                boolean f = true;
                 sg: for (GpxTrackSegment seg : track.getSegments()) {
                     for (WayPoint S : seg.getWayPoints()) {
-                        if (S.time>tm) {f=false; break sg;}
+                        if (S.time > tm) {
+                            f = false;
+                            break sg;
+                        }
                     }
                 }
@@ -107,7 +117,8 @@
 
     void setData(WayPoint wp, GpxTrack trk, double vel, Collection<GpxTrack> tracks) {
-        this.tracks=tracks;
-        this.trk=trk;
-        if (wp.time==0.0) { label1.setText(tr("No timestamp"));
+        this.tracks = tracks;
+        this.trk = trk;
+        if (wp.time == 0.0) {
+            label1.setText(tr("No timestamp"));
             but2.setVisible(false);
         } else {
@@ -115,15 +126,20 @@
             but2.setVisible(true);
         }
-        if (vel>0) label2.setText(String.format("%.1f "+tr("km/h"), vel));
-              else label2.setText(null);
+        if (vel > 0) label2.setText(String.format("%.1f "+tr("km/h"), vel));
+        else label2.setText(null);
         String s = (String) trk.getAttributes().get("name");
-        if (s!=null) label3.setText(tr("Track name: ")+s);
-                else label3.setText(null);
+        if (s != null)
+            label3.setText(tr("Track name: ")+s);
+        else label3.setText(null);
         s = (String) trk.getAttributes().get("desc");
         label4.setText(s);
         s = (String) wp.attr.get("ele");
-        String s1="";
-        try {s1 = String.format("H=%3.1f   ", Double.parseDouble(s));} catch (Exception e) { }
-        s1=s1+"L="+(int)trk.length();
+        String s1 = "";
+        try {
+            s1 = String.format("H=%3.1f   ", Double.parseDouble(s));
+        } catch (Exception e) {
+            Main.warn(e);
+        }
+        s1 = s1+"L="+(int) trk.length();
         label5.setText(s1);
         if (trk.getAttributes().containsKey("url")) {
