Index: applications/editors/josm/plugins/surveyor/.checkstyle
===================================================================
--- applications/editors/josm/plugins/surveyor/.checkstyle	(revision 33011)
+++ applications/editors/josm/plugins/surveyor/.checkstyle	(revision 33011)
@@ -0,0 +1,20 @@
+<?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="src/org/dinopolis"/>
+    <filter-data value=".svn"/>
+    <filter-data value="data"/>
+    <filter-data value="images"/>
+    <filter-data value="resources"/>
+    <filter-data value="styles"/>
+    <filter-data value="scripts"/>
+  </filter>
+</fileset-config>
Index: applications/editors/josm/plugins/surveyor/.project
===================================================================
--- applications/editors/josm/plugins/surveyor/.project	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/.project	(revision 33011)
@@ -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/surveyor/src/at/dallermassl/josm/plugin/surveyor/ActionConstants.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ActionConstants.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ActionConstants.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -42,9 +39,9 @@
     public void actionPerformed(ActionEvent e) {
         if (e.getSource() instanceof AbstractButton) {
-            autoSave = ((AbstractButton)e.getSource()).isSelected();
+            autoSave = ((AbstractButton) e.getSource()).isSelected();
         }
 
-        if(autoSave) {
-            if(gpsDataTimer == null) {
+        if (autoSave) {
+            if (gpsDataTimer == null) {
                 gpsDataTimer = new Timer();
             }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -44,5 +41,5 @@
             File tmpFile = new File(file.getAbsoluteFile()+".tmp");
             System.out.println("AutoSaving osm data to file " + file.getAbsolutePath());
-            synchronized(SurveyorLock.class) {
+            synchronized (SurveyorLock.class) {
                 OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(new FileOutputStream(tmpFile)), false, dataset.getVersion());
                 w.header();
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -58,5 +55,5 @@
         try {
             GpxLayer gpsLayer = LayerUtil.findGpsLayer(gpsLayerName, GpxLayer.class);
-            if(gpsLayer == null) {
+            if (gpsLayer == null) {
                 return;
             }
@@ -69,5 +66,5 @@
             PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(tmpFile)));
             try (GpxWriter gpxWriter = new GpxWriter(out)) {
-            	gpxWriter.write(gpsLayer.data);
+                gpxWriter.write(gpsLayer.data);
             }
             tmpFile.renameTo(file);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonDescription.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -49,6 +46,6 @@
         super();
     }
-    /**
-     * @param hotkey
+    
+    /**
      * @param actions a list of actions to be performed.
      * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
@@ -59,5 +56,4 @@
 
     /**
-     * @param hotkey
      * @param actions a list of actions to be performed.
      * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
@@ -79,5 +75,4 @@
 
     /**
-     * @param hotkey
      * @param actions a list of actions to be performed.
      * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
@@ -88,5 +83,5 @@
         this.hotkey = hotkey;
         this.iconName = iconName;
-        if(type == null) {
+        if (type == null) {
             this.type = ButtonType.SINGLE;
         } else {
@@ -102,4 +97,5 @@
         return this.actions;
     }
+    
     /**
      * @param actions the actions to set
@@ -108,4 +104,5 @@
         this.actions = actions;
     }
+    
     /**
      * @return the hotkey
@@ -114,4 +111,5 @@
         return this.hotkey;
     }
+    
     /**
      * @param hotkey the hotkey to set
@@ -120,4 +118,5 @@
         this.hotkey = hotkey;
     }
+    
     /**
      * @return the label
@@ -153,4 +152,5 @@
         }
     }
+    
     /**
      * @param type the type to set
@@ -162,5 +162,4 @@
     /**
      * Sets the name of the icon.
-     * @param icon
      */
     public void setIcon(String icon) {
@@ -176,11 +175,11 @@
         String actionName = tr(getLabel()) + " (" + hotkey + ")";
 
-        Icon icon = ImageProvider.getIfAvailable(null,iconName);
+        Icon icon = ImageProvider.getIfAvailable(null, iconName);
         if (icon == null)
-            icon = ImageProvider.getIfAvailable("markers",iconName);
+            icon = ImageProvider.getIfAvailable("markers", iconName);
         if (icon == null)
-            icon = ImageProvider.getIfAvailable("symbols",iconName);
+            icon = ImageProvider.getIfAvailable("symbols", iconName);
         if (icon == null)
-            icon = ImageProvider.getIfAvailable("nodes",iconName);
+            icon = ImageProvider.getIfAvailable("nodes", iconName);
 
         MetaAction action = new MetaAction(actionName, icon);
@@ -189,5 +188,5 @@
 
         AbstractButton button;
-        if(type == ButtonType.TOGGLE) {
+        if (type == ButtonType.TOGGLE) {
             button = new JToggleButton(action);
             connectActionAndButton(action, button);
@@ -223,12 +222,15 @@
         private Action action;
         private AbstractButton button;
-        public SelectionStateAdapter(Action theAction, AbstractButton theButton) {
+        
+        SelectionStateAdapter(Action theAction, AbstractButton theButton) {
             action = theAction;
             button = theButton;
         }
+        
         protected void configure() {
             action.addPropertyChangeListener(this);
             button.addItemListener(this);
         }
+        
         public void itemStateChanged(ItemEvent e) {
             boolean value = e.getStateChange() == ItemEvent.SELECTED;
@@ -238,6 +240,6 @@
 
         public void propertyChange(PropertyChangeEvent evt) {
-            if(evt.getPropertyName().equals(ActionConstants.SELECTED_KEY)) {
-                Boolean newSelectedState = (Boolean)evt.getNewValue();
+            if (evt.getPropertyName().equals(ActionConstants.SELECTED_KEY)) {
+                Boolean newSelectedState = (Boolean) evt.getNewValue();
                 button.setSelected(newSelectedState.booleanValue());
             }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonType.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonType.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/ButtonType.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsActionEvent.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsActionEvent.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsActionEvent.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -17,15 +14,8 @@
     private LatLon coordinates;
 
-
-    /**
-     * @param e
-     * @param latitude
-     * @param longitude
-     */
     public GpsActionEvent(ActionEvent e, double latitude, double longitude) {
         super(e.getSource(), e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers());
         coordinates = new LatLon(latitude, longitude);
     }
-
 
     /**
@@ -35,6 +25,3 @@
         return this.coordinates;
     }
-
-
-
 }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsDataSource.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsDataSource.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/GpsDataSource.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -16,5 +13,4 @@
      * @return gps data.
      */
-    public LiveGpsData getGpsData();
-
+    LiveGpsData getGpsData();
 }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/MetaAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/MetaAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/MetaAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -35,18 +32,10 @@
     }
 
-    /**
-     * @param name
-     */
     public MetaAction(String name) {
         super(name);
     }
 
-    /**
-     * @param name
-     * @param icon
-     */
     public MetaAction(String name, Icon icon) {
         super(name, icon);
-        // TODO Auto-generated constructor stub
     }
 
@@ -96,5 +85,5 @@
             System.out.println("Surveyor: no gps data available!");
             // TEST for offline test only:
-            if(Main.pref.getBoolean("surveyor.debug")) {
+            if (Main.pref.getBoolean("surveyor.debug")) {
                 for (SurveyorActionDescription action : actions) {
                     action.actionPerformed(new GpsActionEvent(e, 0, 0));
@@ -103,12 +92,9 @@
         }
         JFrame frame = SurveyorPlugin.getSurveyorFrame();
-        if(frame != null && frame.isVisible()) {
+        if (frame != null && frame.isVisible()) {
             frame.toFront();
         }
     }
 
-    /**
-     * @param gpsDataSource
-     */
     public void setGpsDataSource(GpsDataSource gpsDataSource) {
         this.gpsDataSource = gpsDataSource;
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -17,5 +14,5 @@
      * @param event the event.
      */
-    public void actionPerformed(GpsActionEvent event);
+    void actionPerformed(GpsActionEvent event);
 
     /**
@@ -23,4 +20,4 @@
      * @param parameters the parameters.
      */
-    public void setParameters(List<String> parameters);
+    void setParameters(List<String> parameters);
 }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionDescription.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -10,4 +7,5 @@
 
 import org.dinopolis.util.io.Tokenizer;
+import org.openstreetmap.josm.Main;
 
 /**
@@ -20,5 +18,4 @@
     private SurveyorAction action;
 
-
     /**
      * Default Constructor
@@ -27,16 +24,10 @@
         super();
     }
-    /**
-     * @param actionClass
-     * @param params
-     */
+    
     public SurveyorActionDescription(String actionClass) {
         super();
         this.actionClass = actionClass;
     }
-    /**
-     * @param actionClass
-     * @param params
-     */
+    
     public SurveyorActionDescription(String actionClass, List<String> params) {
         super();
@@ -44,8 +35,5 @@
         this.params = params;
     }
-    /**
-     * @param actionClass
-     * @param params
-     */
+    
     public SurveyorActionDescription(String actionClass, String[] params) {
         super();
@@ -56,4 +44,5 @@
         }
     }
+    
     /**
      * @return the actionClass
@@ -62,4 +51,5 @@
         return this.actionClass;
     }
+    
     /**
      * @param actionClass the actionClass to set
@@ -68,4 +58,5 @@
         this.actionClass = actionClass;
     }
+    
     /**
      * @return the params
@@ -74,4 +65,5 @@
         return this.params;
     }
+    
     /**
      * @param params the params to set
@@ -82,5 +74,5 @@
 
     public void actionPerformed(GpsActionEvent e) {
-        if(action == null) {
+        if (action == null) {
             action = SurveyorActionFactory.getInstance(actionClass);
             action.setParameters(getParameterList());
@@ -106,4 +98,5 @@
             params = tokenizer.nextLine();
         } catch (IOException ignore) {
+            Main.debug(ignore);
         }
     }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorActionFactory.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -17,21 +14,21 @@
  *
  */
-public class SurveyorActionFactory {
-    private static Map<String, SurveyorAction>actionCache = new HashMap<>();
+public final class SurveyorActionFactory {
+    private static Map<String, SurveyorAction> actionCache = new HashMap<>();
     public static final String DEFAULT_PACKAGE = SurveyorActionFactory.class.getPackage().getName() + ".action";
 
-    /**
-     * @param actionClass
-     * @return
-     */
+    private SurveyorActionFactory() {
+        // Hide default contructir for utilities classes
+    }
+    
     public static SurveyorAction getInstance(String actionClass) {
         try {
             SurveyorAction action = actionCache.get(actionClass);
-            if(action == null) {
+            if (action == null) {
                 try {
-                    action = (SurveyorAction)Class.forName(actionClass).newInstance();
+                    action = (SurveyorAction) Class.forName(actionClass).newInstance();
                 } catch (ClassNotFoundException e) {
                     actionClass = DEFAULT_PACKAGE + "." + actionClass;
-                    action = (SurveyorAction)Class.forName(actionClass).newInstance();
+                    action = (SurveyorAction) Class.forName(actionClass).newInstance();
                 }
                 actionCache.put(actionClass, action);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -44,5 +41,5 @@
     private JLabel streetLabel;
     private JPanel buttonPanel;
-    private Set<String>hotKeys;
+    private Set<String> hotKeys;
 
     public SurveyorComponent() {
@@ -84,5 +81,5 @@
     public void setWidth(String widthString) {
         width = Integer.parseInt(widthString);
-        if(width > 0 && height > 0) {
+        if (width > 0 && height > 0) {
             super.setPreferredSize(new Dimension(width, height));
         }
@@ -95,5 +92,5 @@
     public void setHeight(String heightString) {
         height = Integer.parseInt(heightString);
-        if(width > 0 && height > 0) {
+        if (width > 0 && height > 0) {
             super.setPreferredSize(new Dimension(width, height));
         }
@@ -105,8 +102,9 @@
 
     public void addButton(ButtonDescription description) {
-        if(description.getHotkey() != "" &&  hotKeys.contains(description.getHotkey())) {
-            JOptionPane.showMessageDialog(Main.parent, tr("Duplicate hotkey for button ''{0}'' - button will be ignored!",description.getLabel()));
+        if (description.getHotkey() != "" && hotKeys.contains(description.getHotkey())) {
+            JOptionPane.showMessageDialog(Main.parent, 
+                    tr("Duplicate hotkey for button ''{0}'' - button will be ignored!", description.getLabel()));
         } else {
-            if(rows == 0 && columns == 0) {
+            if (rows == 0 && columns == 0) {
                 setColumns("4");
             }
@@ -129,9 +127,9 @@
         try {
             parser.start(in);
-        } catch(SAXException e) {
+        } catch (SAXException e) {
             e.printStackTrace();
         }
         List<SurveyorActionDescription> actions = new ArrayList<>();
-        while(parser.hasNext()) {
+        while (parser.hasNext()) {
             Object object = parser.next();
             if (object instanceof SurveyorComponent) {
@@ -140,10 +138,10 @@
             } else if (object instanceof ButtonDescription) {
                 System.out.println("ButtonDescription " + object);
-                ((ButtonDescription)object).setActions(actions);
-                surveyorComponent.addButton(((ButtonDescription)object));
+                ((ButtonDescription) object).setActions(actions);
+                surveyorComponent.addButton(((ButtonDescription) object));
                 actions.clear();
             } else if (object instanceof SurveyorActionDescription) {
                 System.out.println("SurveyorActionDescription " + object);
-                actions.add((SurveyorActionDescription)object);
+                actions.add((SurveyorActionDescription) object);
             } else {
                 System.err.println("unknown " + object);
@@ -160,9 +158,8 @@
     @Override
     public void propertyChange(PropertyChangeEvent evt) {
-        if("gpsdata".equals(evt.getPropertyName())) {
+        if ("gpsdata".equals(evt.getPropertyName())) {
             gpsData = (LiveGpsData) evt.getNewValue();
             streetLabel.setText(tr("Way: ") + gpsData.getWayInfo());
         }
-
     }
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java	(revision 33011)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorPlugin.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorPlugin.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorPlugin.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -17,4 +14,6 @@
 import org.openstreetmap.josm.plugins.PluginInformation;
 
+// CHECKSTYLE.OFF: HideUtilityClassConstructorCheck
+
 /**
  * Plugin that uses live gps data and a button panel to add nodes/waypoints etc at the current
@@ -26,16 +25,17 @@
  *
  */
-public class SurveyorPlugin {
+public final class SurveyorPlugin {
 
     private static JFrame surveyorFrame;
     public static final String PREF_KEY_STREET_NAME_FONT_SIZE = "surveyor.way.fontsize";
-
+    
     /**
-     *
+     * Constructs a new {@code SurveyorPlugin}.
+     * @param info plugin information
      */
     public SurveyorPlugin(PluginInformation info) {
 
         LiveGpsPlugin gpsPlugin = (LiveGpsPlugin) PluginHandler.getPlugin("livegps");
-        if(gpsPlugin == null)
+        if (gpsPlugin == null)
             throw new IllegalStateException(tr("SurveyorPlugin needs LiveGpsPlugin, but could not find it!"));
 
@@ -64,3 +64,4 @@
     }
 
+    // CHECKSTYLE.ON: HideUtilityClassConstructorCheck
 }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorShowAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor;
 
@@ -51,6 +48,6 @@
 
     @Override
-	public void actionPerformed(ActionEvent e) {
-        if(surveyorFrame == null) {
+    public void actionPerformed(ActionEvent e) {
+        if (surveyorFrame == null) {
             surveyorFrame = new JFrame();
 
@@ -66,6 +63,6 @@
             actionMap.put("zoomout", new AbstractAction() {
                 @Override
-				public void actionPerformed(ActionEvent e) {
-                    if(Main.map != null && Main.map.mapView != null) {
+                public void actionPerformed(ActionEvent e) {
+                    if (Main.map != null && Main.map.mapView != null) {
                         Main.map.mapView.zoomToFactor(2);
                     }
@@ -76,6 +73,6 @@
             actionMap.put("zoomin", new AbstractAction() {
                 @Override
-				public void actionPerformed(ActionEvent e) {
-                    if(Main.map != null && Main.map.mapView != null) {
+                public void actionPerformed(ActionEvent e) {
+                    if (Main.map != null && Main.map.mapView != null) {
                         Main.map.mapView.zoomToFactor(1/2);
                     }
@@ -86,5 +83,5 @@
             actionMap.put("autocenter", new AbstractAction() {
                 @Override
-				public void actionPerformed(ActionEvent e) {
+                public void actionPerformed(ActionEvent e) {
                     // toggle autocenter
                     gpsPlugin.setAutoCenter(!gpsPlugin.isAutoCenter());
@@ -110,5 +107,5 @@
     public SurveyorComponent createComponent() {
         String source = Main.pref.get("surveyor.source");
-        if(source == null || source.length() == 0) {
+        if (source == null || source.length() == 0) {
             source = DEFAULT_SOURCE;
             Main.pref.put("surveyor.source", DEFAULT_SOURCE);
@@ -121,5 +118,5 @@
         } catch (IOException e) {
             Main.error(e);
-            JOptionPane.showMessageDialog(Main.parent, tr("Could not read surveyor definition: {0}",source));
+            JOptionPane.showMessageDialog(Main.parent, tr("Could not read surveyor definition: {0}", source));
         } catch (SAXException e) {
             Main.error(e);
@@ -144,5 +141,5 @@
         parser.start(new BufferedReader(new InputStreamReader(in)));
         List<SurveyorActionDescription> actions = new ArrayList<>();
-        while(parser.hasNext()) {
+        while (parser.hasNext()) {
             Object object = parser.next();
             if (object instanceof SurveyorComponent) {
@@ -151,10 +148,10 @@
             } else if (object instanceof ButtonDescription) {
                 //System.out.println("ButtonDescription " + object);
-                ((ButtonDescription)object).setActions(actions);
-                surveyorComponent.addButton(((ButtonDescription)object));
+                ((ButtonDescription) object).setActions(actions);
+                surveyorComponent.addButton(((ButtonDescription) object));
                 actions = new ArrayList<>();
             } else if (object instanceof SurveyorActionDescription) {
                 //System.out.println("SurveyorActionDescription " + object);
-                actions.add((SurveyorActionDescription)object);
+                actions.add((SurveyorActionDescription) object);
             } else {
                 Main.error("surveyor: unknown xml element: " + object);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/AbstractSurveyorAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/AbstractSurveyorAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/AbstractSurveyorAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/BeepAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/BeepAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/BeepAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -25,9 +22,10 @@
         Main.worker.execute(new Runnable() {
             public void run() {
-                for(int index = 0; index < beepNumber; ++index) {
+                for (int index = 0; index < beepNumber; ++index) {
                     Toolkit.getDefaultToolkit().beep();
                     try {
                         Thread.sleep(200);
                     } catch (InterruptedException ignore) {
+                        Main.debug(ignore);
                     }
                 }
@@ -40,7 +38,7 @@
         try {
             beepNumber = Integer.parseInt(parameters.get(0));
-        } catch(NumberFormatException e) {
+        } catch (NumberFormatException e) {
             // print but recover
-            e.printStackTrace();
+            Main.warn(e);
         }
     }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/ConsolePrinterAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/ConsolePrinterAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/ConsolePrinterAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/PlayAudioAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/PlayAudioAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/PlayAudioAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -38,5 +35,5 @@
             public void run() {
                 try {
-                    if(audioSource == null) {
+                    if (audioSource == null) {
                         audioSource = getParameters().get(0);
                     }
@@ -61,5 +58,5 @@
                     // Create the clip
                     DataLine.Info info = new DataLine.Info(
-                        Clip.class, stream.getFormat(), ((int)stream.getFrameLength()*format.getFrameSize()));
+                        Clip.class, stream.getFormat(), ((int) stream.getFrameLength()*format.getFrameSize()));
                     Clip clip = (Clip) AudioSystem.getLine(info);
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -44,5 +41,5 @@
         for (String keyValuePair : parameters) {
             pos = keyValuePair.indexOf('=');
-            if(pos > 0) {
+            if (pos > 0) {
                 key = keyValuePair.substring(0, pos);
                 value = keyValuePair.substring(pos + 1);
@@ -59,11 +56,10 @@
         //System.out.println(getClass().getSimpleName() + " KOORD: " + coordinates.lat() + ", " + coordinates.lon() + " params: " + keyValues);
         Node node = new Node(coordinates);
-        for(Pair<String, String> entry : keyValues) {
+        for (Pair<String, String> entry : keyValues) {
             node.put(entry.a, entry.b);
         }
-        synchronized(SurveyorLock.class) {
+        synchronized (SurveyorLock.class) {
             DataSet ds = Main.getLayerManager().getEditDataSet();
-            if(ds != null)
-            {
+            if (ds != null) {
                 ds.addPrimitive(node);
                 ds.setSelected(node);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -51,6 +48,6 @@
         String markerTitle = getParameters().get(0);
         Object source = event.getSource();
-        if(source instanceof JToggleButton) {
-            if(((JToggleButton)source).isSelected()) {
+        if (source instanceof JToggleButton) {
+            if (((JToggleButton) source).isSelected()) {
                 markerTitle = tr("{0} start", markerTitle);
             } else {
@@ -78,5 +75,5 @@
     
             String inputText = dialog.openDialog(SurveyorPlugin.getSurveyorFrame(), tr("Waypoint Description"), timeout*1000);
-            if(inputText != null && inputText.length() > 0) {
+            if (inputText != null && inputText.length() > 0) {
                 inputText = inputText.replaceAll("<", "_"); // otherwise the gpx file is ruined
                 markerText = markerText + " " + inputText;
@@ -90,9 +87,9 @@
         WayPoint waypoint = new WayPoint(event.getCoordinates());
         waypoint.attr.put("name", markerText);
-        if(iconName != null && !iconName.isEmpty())
+        if (iconName != null && !iconName.isEmpty())
             waypoint.attr.put("sym", iconName);
-        synchronized(SurveyorLock.class) {
+        synchronized (SurveyorLock.class) {
             layer.data.add(new Marker(event.getCoordinates(), markerText, iconName, null, -1.0, 0.0));
-            if(gpsLayer != null) {
+            if (gpsLayer != null) {
                 gpsLayer.data.waypoints.add(waypoint);
             }
@@ -107,8 +104,8 @@
      */
     public MarkerLayer getMarkerLayer() {
-        if(markerLayer == null) {
+        if (markerLayer == null) {
             markerLayer = LayerUtil.findGpsLayer(MARKER_LAYER_NAME, MarkerLayer.class);
 
-            if(markerLayer == null) {
+            if (markerLayer == null) {
                 // not found, add a new one
                 markerLayer = new MarkerLayer(new GpxData(), MARKER_LAYER_NAME, null, null);
@@ -124,8 +121,8 @@
      */
     public GpxLayer getGpxLayer() {
-        if(liveGpsLayer == null) {
+        if (liveGpsLayer == null) {
             Collection<Layer> layers = Main.getLayerManager().getLayers();
             for (Layer layer : layers) {
-                if(layer instanceof LiveGpsLayer) {
+                if (layer instanceof LiveGpsLayer) {
                     liveGpsLayer = (LiveGpsLayer) layer;
                     break;
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SystemExecuteAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SystemExecuteAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SystemExecuteAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -38,5 +35,5 @@
 
                     while ((line = br.readLine()) != null) {
-                        Main.info(getClass().getSimpleName() + ": " +  line);
+                        Main.info(getClass().getSimpleName() + ": " + line);
                     }
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/TaggingPresetAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/TaggingPresetAction.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/TaggingPresetAction.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action;
 
@@ -26,5 +23,5 @@
     @Override
     public void actionPerformed(GpsActionEvent event) {
-        if(preset == null) {
+        if (preset == null) {
             return;
         }
@@ -47,5 +44,5 @@
     @Override
     public void setParameters(List<String> parameters) {
-        if(parameters.size() == 0) {
+        if (parameters.size() == 0) {
             throw new IllegalArgumentException("No annotation preset name given!");
         }
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/DialogClosingThread.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/DialogClosingThread.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/DialogClosingThread.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action.gui;
 
@@ -29,5 +26,4 @@
     /**
      * Using the given dialog and the default timeout.
-     * @param dialog
      */
     public DialogClosingThread(JDialog dialog) {
@@ -35,8 +31,4 @@
     }
 
-    /**
-     * @param dialog
-     * @param timeout
-     */
     public DialogClosingThread(JDialog dialog, long timeout) {
         super();
@@ -49,10 +41,12 @@
     public void run() {
         String title = dialog.getTitle();
-        while(loopCount > 0) {
+        while (loopCount > 0) {
             dialog.setTitle(title + " (" + loopCount + "sec)");
             --loopCount;
             try {
                 sleep(1000);
-            } catch(InterruptedException ignore) {}
+            } catch (InterruptedException ignore) {
+                Main.debug(ignore);
+            }
         }
 
@@ -83,11 +77,8 @@
     }
 
-    /**
-     * @param optionPane
-     */
     public void observe(Container container) {
-        for(Component component : container.getComponents()) {
-            if(component instanceof JTextField) {
-                observe((JTextField)component);
+        for (Component component : container.getComponents()) {
+            if (component instanceof JTextField) {
+                observe((JTextField) component);
             } else {
                 observe(component);
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/WaypointDialog.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/WaypointDialog.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/gui/WaypointDialog.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.action.gui;
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/LayerUtil.java	(revision 33011)
@@ -1,5 +1,3 @@
-/**
- *
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.util;
 
@@ -11,6 +9,10 @@
  *
  */
-public class LayerUtil {
+public final class LayerUtil {
 
+    private LayerUtil() {
+        // Hide default contructir for utilities classes
+    }
+    
     /**
      * Returns the layer with the given name and type from the map view or <code>null</code>.
@@ -23,7 +25,7 @@
     public static <LayerType extends Layer> LayerType findGpsLayer(String layerName, Class<LayerType> layerType) {
         Layer result = null;
-        if(Main.map != null && Main.map.mapView != null) {
-            for(Layer layer : Main.getLayerManager().getLayers()) {
-                if(layerName.equals(layer.getName()) && layerType.isAssignableFrom(layer.getClass())) {
+        if (Main.map != null && Main.map.mapView != null) {
+            for (Layer layer : Main.getLayerManager().getLayers()) {
+                if (layerName.equals(layer.getName()) && layerType.isAssignableFrom(layer.getClass())) {
                     result = layer;
                     break;
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/ResourceLoader.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/ResourceLoader.java	(revision 33010)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/util/ResourceLoader.java	(revision 33011)
@@ -1,6 +1,3 @@
-/**
- * Copyright by Christof Dallermassl
- * This program is free software and licensed under GPL.
- */
+// License: GPL. For details, see LICENSE file.
 package at.dallermassl.josm.plugin.surveyor.util;
 
@@ -14,5 +11,5 @@
  *
  */
-public class ResourceLoader {
+public final class ResourceLoader {
 
     private ResourceLoader() {
@@ -29,5 +26,5 @@
      */
     @SuppressWarnings("resource")
-	public static InputStream getInputStream(String source) throws IOException {
+    public static InputStream getInputStream(String source) throws IOException {
         InputStream in = null;
         if (source.startsWith("http://") || source.startsWith("https://") || source.startsWith("ftp://") || source.startsWith("file:")) {
