Index: /trunk/src/JOSM.java
===================================================================
--- /trunk/src/JOSM.java	(revision 8508)
+++ /trunk/src/JOSM.java	(revision 8509)
@@ -1,3 +1,3 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+// License: GPL. For details, see LICENSE file.
 import org.openstreetmap.josm.gui.MainApplication;
 
Index: /trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/Main.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/Main.java	(revision 8509)
@@ -1040,6 +1040,8 @@
 
     /**
-     * Asks user to perform "save layer" operations (save on disk and/or upload data to server) for all {@link AbstractModifiableLayer} before JOSM exits.
-     * @return {@code true} if there was nothing to save, or if the user wants to proceed to save operations. {@code false} if the user cancels.
+     * Asks user to perform "save layer" operations (save on disk and/or upload data to server) for all
+     * {@link AbstractModifiableLayer} before JOSM exits.
+     * @return {@code true} if there was nothing to save, or if the user wants to proceed to save operations.
+     *         {@code false} if the user cancels.
      * @since 2025
      */
@@ -1054,5 +1056,6 @@
      * @param selectedLayers The layers to check. Only instances of {@link AbstractModifiableLayer} are considered.
      * @param exit {@code true} if JOSM is exiting, {@code false} otherwise.
-     * @return {@code true} if there was nothing to save, or if the user wants to proceed to save operations. {@code false} if the user cancels.
+     * @return {@code true} if there was nothing to save, or if the user wants to proceed to save operations.
+     *         {@code false} if the user cancels.
      * @since 5519
      */
Index: /trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/AbstractInfoAction.java	(revision 8509)
@@ -29,5 +29,6 @@
     }
 
-    public AbstractInfoAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, String toolbarId, boolean installAdapters) {
+    public AbstractInfoAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register,
+            String toolbarId, boolean installAdapters) {
         super(name, iconName, tooltip, shortcut, register, toolbarId, installAdapters);
     }
@@ -46,5 +47,6 @@
                         tr("Continue"),
                         ImageProvider.get("ok"),
-                        trn("Click to continue and to open {0} browser", "Click to continue and to open {0} browsers", numBrowsers, numBrowsers),
+                        trn("Click to continue and to open {0} browser", "Click to continue and to open {0} browsers",
+                                numBrowsers, numBrowsers),
                         null // no specific help topic
                 ),
Index: /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 8509)
@@ -146,8 +146,10 @@
     @Override
     protected void updateEnabledState() {
+        ImageryType type = info.getImageryType();
         // never enable blacklisted entries. Do not add same imagery layer twice (fix #2519)
-        if (info.isBlacklisted() /*|| isLayerAlreadyPresent()*/) { // FIXME check disabled to allow several instances with different settings (see #7981)
+        if (info.isBlacklisted() /*|| isLayerAlreadyPresent()*/) {
+            // FIXME check disabled to allow several instances with different settings (see #7981)
             setEnabled(false);
-        } else if (info.getImageryType() == ImageryType.TMS || info.getImageryType() == ImageryType.BING || info.getImageryType() == ImageryType.SCANEX) {
+        } else if (type == ImageryType.TMS || type == ImageryType.BING || type == ImageryType.SCANEX) {
             setEnabled(true);
         } else if (Main.isDisplayingMapView() && !Main.map.mapView.getAllLayers().isEmpty()) {
Index: /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 8509)
@@ -42,5 +42,6 @@
      * @since 5438
      */
-    public DiskAccessAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, String toolbarId, boolean installAdapters) {
+    public DiskAccessAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register,
+            String toolbarId, boolean installAdapters) {
         super(name, iconName, tooltip, shortcut, register, toolbarId, installAdapters);
     }
@@ -84,10 +85,13 @@
      *                 If false, only the file filters that include {@code extension} will be proposed
      * @param lastDirProperty The name of the property used to setup the AbstractFileChooser initial directory.
-     *        This property will then be updated to the new "last directory" chosen by the user. If null, the default property "lastDirectory" will be used.
+     *        This property will then be updated to the new "last directory" chosen by the user.
+     *        If null, the default property "lastDirectory" will be used.
      * @return The {@code AbstractFileChooser}.
      * @since 5438
      */
-    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension, int selectionMode, boolean allTypes, String lastDirProperty) {
-        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, extension, allTypes, selectionMode).openFileChooser();
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, String extension,
+            int selectionMode, boolean allTypes, String lastDirProperty) {
+        return new FileChooserManager(open, lastDirProperty)
+            .createFileChooser(multiple, title, extension, allTypes, selectionMode).openFileChooser();
     }
 
@@ -102,9 +106,11 @@
      *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
      *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @param lastDirProperty The name of the property used to setup the AbstractFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user
+     * @param lastDirProperty The name of the property used to setup the AbstractFileChooser initial directory.
+     * This property will then be updated to the new "last directory" chosen by the user
      * @return The {@code AbstractFileChooser}.
      * @since 5438
      */
-    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, FileFilter filter, int selectionMode, String lastDirProperty) {
+    public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title, FileFilter filter,
+            int selectionMode, String lastDirProperty) {
         return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filter, selectionMode).openFileChooser();
     }
@@ -121,5 +127,6 @@
      *                      <li>just select directories ({@code JFileChooser.DIRECTORIES_ONLY})</li>
      *                      <li>select both files and directories ({@code JFileChooser.FILES_AND_DIRECTORIES})</li></ul>
-     * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory. This property will then be updated to the new "last directory" chosen by the user
+     * @param lastDirProperty The name of the property used to setup the JFileChooser initial directory.
+     * This property will then be updated to the new "last directory" chosen by the user
      * @return The {@code AbstractFileChooser}.
      * @since 5438
@@ -127,5 +134,6 @@
     public static AbstractFileChooser createAndOpenFileChooser(boolean open, boolean multiple, String title,
             Collection<? extends FileFilter> filters, FileFilter defaultFilter, int selectionMode, String lastDirProperty) {
-        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filters, defaultFilter, selectionMode).openFileChooser();
+        return new FileChooserManager(open, lastDirProperty).createFileChooser(multiple, title, filters, defaultFilter, selectionMode)
+                .openFileChooser();
     }
 }
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadAlongAction.java	(revision 8509)
@@ -44,5 +44,5 @@
         super(name, iconName, tooltip, shortcut, registerInToolbar);
     }
-    
+
     protected static void addToDownload(Area a, Rectangle2D r, Collection<Rectangle2D> results, double maxArea) {
         Area tmp = new Area(r);
@@ -74,5 +74,5 @@
         }
     }
-    
+
     /**
      * Area "a" contains the hull that we would like to download data for. however we
@@ -92,5 +92,6 @@
      * the areas if applicable.
      */
-    protected static void confirmAndDownloadAreas(Area a, double maxArea, boolean osmDownload, boolean gpxDownload, String title, ProgressMonitor progressMonitor) {
+    protected static void confirmAndDownloadAreas(Area a, double maxArea, boolean osmDownload, boolean gpxDownload, String title,
+            ProgressMonitor progressMonitor) {
         List<Rectangle2D> toDownload = new ArrayList<>();
         addToDownload(a, a.getBounds(), toDownload, maxArea);
@@ -99,6 +100,9 @@
         }
         JPanel msg = new JPanel(new GridBagLayout());
-        msg.add(new JLabel(tr("<html>This action will require {0} individual<br>" + "download requests. Do you wish<br>to continue?</html>", toDownload.size())), GBC.eol());
-        if (JOptionPane.OK_OPTION != JOptionPane.showConfirmDialog(Main.parent, msg, title, JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE)) {
+        msg.add(new JLabel(
+                tr("<html>This action will require {0} individual<br>" + "download requests. Do you wish<br>to continue?</html>",
+                        toDownload.size())), GBC.eol());
+        if (JOptionPane.OK_OPTION != JOptionPane.showConfirmDialog(Main.parent, msg, title,
+                JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 8509)
@@ -28,5 +28,6 @@
     public DownloadPrimitiveAction() {
         super(tr("Download object..."), "downloadprimitive", tr("Download OSM object by ID."),
-                Shortcut.registerShortcut("system:download_primitive", tr("File: {0}", tr("Download object...")), KeyEvent.VK_O, Shortcut.CTRL_SHIFT), true);
+                Shortcut.registerShortcut("system:download_primitive", tr("File: {0}", tr("Download object...")),
+                        KeyEvent.VK_O, Shortcut.CTRL_SHIFT), true);
         putValue("help", ht("/Action/DownloadObject"));
     }
@@ -44,5 +45,6 @@
      * @param newLayer if the data should be downloaded into a new layer
      * @param ids List of primitive id to download
-     * @param downloadReferrers if the referrers of the object should be downloaded as well, i.e., parent relations, and for nodes, additionally, parent ways
+     * @param downloadReferrers if the referrers of the object should be downloaded as well, i.e., parent relations, and for nodes,
+     * additionally, parent ways
      * @param full if the members of a relation should be downloaded as well
      */
Index: /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java	(revision 8509)
@@ -80,5 +80,6 @@
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
         if (!(layer instanceof OsmDataLayer) && !(layer instanceof GpxLayer))
-            throw new IllegalArgumentException(MessageFormat.format("Expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.", layer.getClass().getName()));
+            throw new IllegalArgumentException(MessageFormat.format("Expected instance of OsmDataLayer or GpxLayer. Got ''{0}''.",
+                    layer.getClass().getName()));
 
         File file = createAndOpenSaveFileChooser(tr("Export GPX file"), GpxImporter.FILE_FILTER);
Index: /trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 8509)
@@ -73,5 +73,6 @@
      * TODO: do not pass Icon, pass ImageProvider instead
      */
-    public JosmAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+    public JosmAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar,
+            String toolbarId, boolean installAdapters) {
         super(name);
         if(icon != null)
@@ -111,5 +112,6 @@
      * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
      */
-    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar,
+            String toolbarId, boolean installAdapters) {
         this(name, iconName == null ? null : new ImageProvider(iconName), tooltip, shortcut, registerInToolbar,
                 toolbarId == null ? iconName : toolbarId, installAdapters);
Index: /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/JumpToAction.java	(revision 8509)
@@ -128,5 +128,7 @@
                 ll = new LatLon(Double.parseDouble(lat.getText()), Double.parseDouble(lon.getText()));
             } catch (NumberFormatException ex) {
-                JOptionPane.showMessageDialog(Main.parent, tr("Could not parse Latitude, Longitude or Zoom. Please check."), tr("Unable to parse Lon/Lat"), JOptionPane.ERROR_MESSAGE);
+                JOptionPane.showMessageDialog(Main.parent,
+                        tr("Could not parse Latitude, Longitude or Zoom. Please check."),
+                        tr("Unable to parse Lon/Lat"), JOptionPane.ERROR_MESSAGE);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/SessionSaveAsAction.java	(revision 8509)
@@ -89,5 +89,6 @@
             fc = createAndOpenFileChooser(false, false, tr("Save session"), joz, JFileChooser.FILES_ONLY, "lastDirectory");
         } else {
-            fc = createAndOpenFileChooser(false, false, tr("Save session"), Arrays.asList(new FileFilter[]{jos, joz}), jos, JFileChooser.FILES_ONLY, "lastDirectory");
+            fc = createAndOpenFileChooser(false, false, tr("Save session"), Arrays.asList(new FileFilter[]{jos, joz}), jos,
+                    JFileChooser.FILES_ONLY, "lastDirectory");
         }
 
Index: /trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java	(revision 8509)
@@ -44,6 +44,6 @@
      */
     public SimplifyWayAction() {
-        super(tr("Simplify Way"), "simplify", tr("Delete unnecessary nodes from a way."), Shortcut.registerShortcut("tools:simplify", tr("Tool: {0}", tr("Simplify Way")),
-                KeyEvent.VK_Y, Shortcut.SHIFT), true);
+        super(tr("Simplify Way"), "simplify", tr("Delete unnecessary nodes from a way."),
+                Shortcut.registerShortcut("tools:simplify", tr("Tool: {0}", tr("Simplify Way")), KeyEvent.VK_Y, Shortcut.SHIFT), true);
         putValue("help", ht("/Action/SimplifyWay"));
     }
Index: /trunk/src/org/openstreetmap/josm/actions/ToggleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/ToggleAction.java	(revision 8509)
@@ -40,5 +40,6 @@
      * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
      */
-    public ToggleAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+    public ToggleAction(String name, ImageProvider icon, String tooltip, Shortcut shortcut, boolean registerInToolbar,
+            String toolbarId, boolean installAdapters) {
         super(name, icon, tooltip, shortcut, registerInToolbar, toolbarId, installAdapters);
         // It is required to set the SELECTED_KEY to a non-null value in order to let Swing components update it
@@ -115,5 +116,6 @@
     /**
      * Toggles the selcted action state, if needed according to the ActionEvent that trigerred the action.
-     * This method will do nothing if the action event comes from a Swing component supporting the SELECTED_KEY property because the component already set the selected state.
+     * This method will do nothing if the action event comes from a Swing component supporting the SELECTED_KEY property because
+     * the component already set the selected state.
      * This method needs to be called especially if the action is associated with a keyboard shortcut to ensure correct selected state.
      * @see <a href="https://weblogs.java.net/blog/zixle/archive/2005/11/changes_to_acti.html">Changes to Actions in 1.6</a>
Index: /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java	(revision 8509)
@@ -464,5 +464,6 @@
 
         Main.main.undoRedo.add(new SequenceCommand(
-                trn("Dupe {0} node into {1} nodes", "Dupe {0} nodes into {1} nodes", selectedNodes.size(), selectedNodes.size(), selectedNodes.size()+allNewNodes.size()), cmds));
+                trn("Dupe {0} node into {1} nodes", "Dupe {0} nodes into {1} nodes",
+                        selectedNodes.size(), selectedNodes.size(), selectedNodes.size()+allNewNodes.size()), cmds));
         getCurrentDataSet().setSelected(allNewNodes);
     }
Index: /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java	(revision 8509)
@@ -35,5 +35,6 @@
      *
      * @param id the primitive id
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE},
+     * {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
      */
     public static void handlePrimitiveGoneException(long id, OsmPrimitiveType type) {
Index: /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 8509)
@@ -124,5 +124,6 @@
          * @param formerValidatedPrimitives the last collection of primitives being validates. May be null.
          */
-        public ValidationTask(Collection<Test> tests, Collection<OsmPrimitive> validatedPrimitives, Collection<OsmPrimitive> formerValidatedPrimitives) {
+        public ValidationTask(Collection<Test> tests, Collection<OsmPrimitive> validatedPrimitives,
+                Collection<OsmPrimitive> formerValidatedPrimitives) {
             super(tr("Validating"), false /*don't ignore exceptions */);
             this.validatedPrimitives  = validatedPrimitives;
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java	(revision 8509)
@@ -626,5 +626,6 @@
     }
 
-    private void insertNodeIntoAllNearbySegments(List<WaySegment> wss, Node n, Collection<OsmPrimitive> newSelection, Collection<Command> cmds, List<Way> replacedWays, List<Way> reuseWays) {
+    private void insertNodeIntoAllNearbySegments(List<WaySegment> wss, Node n, Collection<OsmPrimitive> newSelection,
+            Collection<Command> cmds, List<Way> replacedWays, List<Way> reuseWays) {
         Map<Way, List<Integer>> insertPoints = new HashMap<>();
         for (WaySegment ws : wss) {
@@ -1293,396 +1294,10 @@
 
     private class SnapHelper {
-        private boolean snapOn; // snapping is turned on
-
-        private boolean active; // snapping is active for current mouse position
-        private boolean fixed; // snap angle is fixed
-        private boolean absoluteFix; // snap angle is absolute
-
-        private boolean drawConstructionGeometry;
-        private boolean showProjectedPoint;
-        private boolean showAngle;
-
-        private boolean snapToProjections;
-
-        private EastNorth dir2;
-        private EastNorth projected;
-        private String labelText;
-        private double lastAngle;
-
-        private double customBaseHeading=-1; // angle of base line, if not last segment)
-        private EastNorth segmentPoint1; // remembered first point of base segment
-        private EastNorth segmentPoint2; // remembered second point of base segment
-        private EastNorth projectionSource; // point that we are projecting to the line
-
-        private double[] snapAngles;
-        private double snapAngleTolerance;
-
-        private double pe,pn; // (pe,pn) - direction of snapping line
-        private double e0,n0; // (e0,n0) - origin of snapping line
-
-        private final String fixFmt="%d "+tr("FIX");
-        private Color snapHelperColor;
-        private Color highlightColor;
-
-        private Stroke normalStroke;
-        private Stroke helperStroke;
-        private Stroke highlightStroke;
-
-        private JCheckBoxMenuItem checkBox;
-
-        public void init() {
-            snapOn=false;
-            checkBox.setState(snapOn);
-            fixed=false; absoluteFix=false;
-
-            Collection<String> angles = Main.pref.getCollection("draw.anglesnap.angles",
-                    Arrays.asList("0","30","45","60","90","120","135","150","180"));
-
-            snapAngles = new double[2*angles.size()];
-            int i=0;
-            for (String s: angles) {
-                try {
-                    snapAngles[i] = Double.parseDouble(s); i++;
-                    snapAngles[i] = 360-Double.parseDouble(s); i++;
-                } catch (NumberFormatException e) {
-                    Main.warn("Incorrect number in draw.anglesnap.angles preferences: "+s);
-                    snapAngles[i]=0;i++;
-                    snapAngles[i]=0;i++;
-                }
-            }
-            snapAngleTolerance = Main.pref.getDouble("draw.anglesnap.tolerance", 5.0);
-            drawConstructionGeometry = Main.pref.getBoolean("draw.anglesnap.drawConstructionGeometry", true);
-            showProjectedPoint = Main.pref.getBoolean("draw.anglesnap.drawProjectedPoint", true);
-            snapToProjections = Main.pref.getBoolean("draw.anglesnap.projectionsnap", true);
-
-            showAngle = Main.pref.getBoolean("draw.anglesnap.showAngle", true);
-            useRepeatedShortcut = Main.pref.getBoolean("draw.anglesnap.toggleOnRepeatedA", true);
-
-            normalStroke = rubberLineStroke;
-            snapHelperColor = Main.pref.getColor(marktr("draw angle snap"), Color.ORANGE);
-
-            highlightColor = Main.pref.getColor(marktr("draw angle snap highlight"), ORANGE_TRANSPARENT);
-            highlightStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.highlight","10"));
-            helperStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.helper","1 4"));
-        }
-
-        public void saveAngles(String ... angles) {
-            Main.pref.putCollection("draw.anglesnap.angles", Arrays.asList(angles));
-        }
-
-        public  void setMenuCheckBox(JCheckBoxMenuItem checkBox) {
-            this.checkBox = checkBox;
-        }
-
-        public  void drawIfNeeded(Graphics2D g2, MapView mv) {
-            if (!snapOn || !active)
-                return;
-            Point p1=mv.getPoint(getCurrentBaseNode());
-            Point p2=mv.getPoint(dir2);
-            Point p3=mv.getPoint(projected);
-            GeneralPath b;
-            if (drawConstructionGeometry) {
-                g2.setColor(snapHelperColor);
-                g2.setStroke(helperStroke);
-
-                b = new GeneralPath();
-                if (absoluteFix) {
-                    b.moveTo(p2.x,p2.y);
-                    b.lineTo(2*p1.x-p2.x,2*p1.y-p2.y); // bi-directional line
-                } else {
-                    b.moveTo(p2.x,p2.y);
-                    b.lineTo(p3.x,p3.y);
-                }
-                g2.draw(b);
-            }
-            if (projectionSource != null) {
-                g2.setColor(snapHelperColor);
-                g2.setStroke(helperStroke);
-                b = new GeneralPath();
-                b.moveTo(p3.x,p3.y);
-                Point pp=mv.getPoint(projectionSource);
-                b.lineTo(pp.x,pp.y);
-                g2.draw(b);
-            }
-
-            if (customBaseHeading >= 0) {
-                g2.setColor(highlightColor);
-                g2.setStroke(highlightStroke);
-                b = new GeneralPath();
-                Point pp1=mv.getPoint(segmentPoint1);
-                Point pp2=mv.getPoint(segmentPoint2);
-                b.moveTo(pp1.x,pp1.y);
-                b.lineTo(pp2.x,pp2.y);
-                g2.draw(b);
-            }
-
-            g2.setColor(rubberLineColor);
-            g2.setStroke(normalStroke);
-            b = new GeneralPath();
-            b.moveTo(p1.x,p1.y);
-            b.lineTo(p3.x,p3.y);
-            g2.draw(b);
-
-            g2.drawString(labelText, p3.x-5, p3.y+20);
-            if (showProjectedPoint) {
-                g2.setStroke(normalStroke);
-                g2.drawOval(p3.x-5, p3.y-5, 10, 10); // projected point
-            }
-
-            g2.setColor(snapHelperColor);
-            g2.setStroke(helperStroke);
-        }
-
-        /* If mouse position is close to line at 15-30-45-... angle, remembers this direction
-         */
-        public void checkAngleSnapping(EastNorth currentEN, double baseHeading, double curHeading) {
-            EastNorth p0 = getCurrentBaseNode().getEastNorth();
-            EastNorth snapPoint = currentEN;
-            double angle = -1;
-
-            double activeBaseHeading = (customBaseHeading>=0)? customBaseHeading : baseHeading;
-
-            if (snapOn && (activeBaseHeading>=0)) {
-                angle = curHeading - activeBaseHeading;
-                if (angle < 0) {
-                    angle+=360;
-                }
-                if (angle > 360) {
-                    angle=0;
-                }
-
-                double nearestAngle;
-                if (fixed) {
-                    nearestAngle = lastAngle; // if direction is fixed use previous angle
-                    active = true;
-                } else {
-                    nearestAngle = getNearestAngle(angle);
-                    if (getAngleDelta(nearestAngle, angle) < snapAngleTolerance) {
-                        active = (customBaseHeading>=0)? true : Math.abs(nearestAngle - 180) > 1e-3;
-                        // if angle is to previous segment, exclude 180 degrees
-                        lastAngle = nearestAngle;
-                    } else {
-                        active=false;
-                    }
-                }
-
-                if (active) {
-                    double phi;
-                    e0 = p0.east();
-                    n0 = p0.north();
-                    buildLabelText((nearestAngle<=180) ? nearestAngle : nearestAngle-360);
-
-                    phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
-                    // (pe,pn) - direction of snapping line
-                    pe = Math.sin(phi);
-                    pn = Math.cos(phi);
-                    double scale = 20 * Main.map.mapView.getDist100Pixel();
-                    dir2 = new EastNorth(e0 + scale * pe, n0 + scale * pn);
-                    snapPoint = getSnapPoint(currentEN);
-                } else {
-                    noSnapNow();
-                }
-            }
-
-            // find out the distance, in metres, between the base point and projected point
-            LatLon mouseLatLon = Main.map.mapView.getProjection().eastNorth2latlon(snapPoint);
-            double distance = getCurrentBaseNode().getCoor().greatCircleDistance(mouseLatLon);
-            double hdg = Math.toDegrees(p0.heading(snapPoint));
-            // heading of segment from current to calculated point, not to mouse position
-
-            if (baseHeading >= 0) { // there is previous line segment with some heading
-                angle = hdg - baseHeading;
-                if (angle < 0) {
-                    angle+=360;
-                }
-                if (angle > 360) {
-                    angle=0;
-                }
-            }
-            showStatusInfo(angle, hdg, distance, isSnapOn());
-        }
-
-        private void buildLabelText(double nearestAngle) {
-            if (showAngle) {
-                if (fixed) {
-                    if (absoluteFix) {
-                        labelText = "=";
-                    } else {
-                        labelText = String.format(fixFmt, (int) nearestAngle);
-                    }
-                } else {
-                    labelText = String.format("%d", (int) nearestAngle);
-                }
-            } else {
-                if (fixed) {
-                    if (absoluteFix) {
-                        labelText = "=";
-                    } else {
-                        labelText = String.format(tr("FIX"), 0);
-                    }
-                } else {
-                    labelText = "";
-                }
-            }
-        }
-
-        public  EastNorth getSnapPoint(EastNorth p) {
-            if (!active)
-                return p;
-            double de=p.east()-e0;
-            double dn=p.north()-n0;
-            double l = de*pe+dn*pn;
-            double delta = Main.map.mapView.getDist100Pixel()/20;
-            if (!absoluteFix && l<delta) {
-                active=false;
-                return p;
-            } //  do not go backward!
-
-            projectionSource=null;
-            if (snapToProjections) {
-                DataSet ds = getCurrentDataSet();
-                Collection<Way> selectedWays = ds.getSelectedWays();
-                if (selectedWays.size()==1) {
-                    Way w = selectedWays.iterator().next();
-                    Collection<EastNorth> pointsToProject = new ArrayList<>();
-                    if (w.getNodesCount()<1000) {
-                        for (Node n: w.getNodes()) {
-                            pointsToProject.add(n.getEastNorth());
-                        }
-                    }
-                    if (customBaseHeading >= 0) {
-                        pointsToProject.add(segmentPoint1);
-                        pointsToProject.add(segmentPoint2);
-                    }
-                    EastNorth enOpt=null;
-                    double dOpt=1e5;
-                    for (EastNorth en: pointsToProject) { // searching for besht projection
-                        double l1 = (en.east()-e0)*pe+(en.north()-n0)*pn;
-                        double d1 = Math.abs(l1-l);
-                        if (d1 < delta && d1 < dOpt) {
-                            l=l1;
-                            enOpt = en;
-                            dOpt = d1;
-                        }
-                    }
-                    if (enOpt!=null) {
-                        projectionSource =  enOpt;
-                    }
-                }
-            }
-            return projected = new EastNorth(e0+l*pe, n0+l*pn);
-        }
-
-
-        public void noSnapNow() {
-            active=false;
-            dir2=null; projected=null;
-            labelText=null;
-        }
-
-        public void setBaseSegment(WaySegment seg) {
-            if (seg==null) return;
-            segmentPoint1=seg.getFirstNode().getEastNorth();
-            segmentPoint2=seg.getSecondNode().getEastNorth();
-
-            double hdg = segmentPoint1.heading(segmentPoint2);
-            hdg=Math.toDegrees(hdg);
-            if (hdg<0) {
-                hdg+=360;
-            }
-            if (hdg>360) {
-                hdg-=360;
-            }
-            customBaseHeading=hdg;
-        }
-
-        private void nextSnapMode() {
-            if (snapOn) {
-                // turn off snapping if we are in fixed mode or no actile snapping line exist
-                if (fixed || !active) {
-                    snapOn = false;
-                    unsetFixedMode();
-                } else {
-                    setFixedMode();
-                }
-            } else {
-                snapOn=true;
-                unsetFixedMode();
-            }
-            checkBox.setState(snapOn);
-            customBaseHeading=-1;
-        }
-
-        private void enableSnapping() {
-            snapOn = true;
-            checkBox.setState(snapOn);
-            customBaseHeading=-1;
-            unsetFixedMode();
-        }
-
-        private void toggleSnapping() {
-            snapOn = !snapOn;
-            checkBox.setState(snapOn);
-            customBaseHeading=-1;
-            unsetFixedMode();
-        }
-
-        public void setFixedMode() {
-            if (active) {
-                fixed=true;
-            }
-        }
-
-
-        public  void unsetFixedMode() {
-            fixed=false;
-            absoluteFix=false;
-            lastAngle=0;
-            active=false;
-        }
-
-        public  boolean isActive() {
-            return active;
-        }
-
-        public  boolean isSnapOn() {
-            return snapOn;
-        }
-
-        private double getNearestAngle(double angle) {
-            double delta,minDelta=1e5, bestAngle=0.0;
-            for (double snapAngle : snapAngles) {
-                delta = getAngleDelta(angle, snapAngle);
-                if (delta < minDelta) {
-                    minDelta = delta;
-                    bestAngle = snapAngle;
-                }
-            }
-            if (Math.abs(bestAngle-360) < 1e-3) {
-                bestAngle=0;
-            }
-            return bestAngle;
-        }
-
-        private double getAngleDelta(double a, double b) {
-            double delta = Math.abs(a-b);
-            if (delta>180)
-                return 360-delta;
-            else
-                return delta;
-        }
-
-        private void unFixOrTurnOff() {
-            if (absoluteFix) {
-                unsetFixedMode();
-            } else {
-                toggleSnapping();
-            }
-        }
-
-        private MouseListener anglePopupListener = new PopupMenuLauncher(new JPopupMenu() {
-            private JCheckBoxMenuItem repeatedCb = new JCheckBoxMenuItem(
+        private final class AnglePopupMenu extends JPopupMenu {
+
+            private final JCheckBoxMenuItem repeatedCb = new JCheckBoxMenuItem(
                     new AbstractAction(tr("Toggle snapping by {0}", getShortcut().getKeyText())) {
-                @Override public void actionPerformed(ActionEvent e) {
+                @Override
+                public void actionPerformed(ActionEvent e) {
                     boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.toggleOnRepeatedA", sel);
@@ -1690,7 +1305,9 @@
                 }
             });
-            private JCheckBoxMenuItem helperCb = new JCheckBoxMenuItem(
+
+            private final JCheckBoxMenuItem helperCb = new JCheckBoxMenuItem(
                     new AbstractAction(tr("Show helper geometry")) {
-                @Override public void actionPerformed(ActionEvent e) {
+                @Override
+                public void actionPerformed(ActionEvent e) {
                     boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.drawConstructionGeometry", sel);
@@ -1701,7 +1318,9 @@
                 }
             });
-            private JCheckBoxMenuItem projectionCb = new JCheckBoxMenuItem(
+
+            private final JCheckBoxMenuItem projectionCb = new JCheckBoxMenuItem(
                     new AbstractAction(tr("Snap to node projections")) {
-                @Override public void actionPerformed(ActionEvent e) {
+                @Override
+                public void actionPerformed(ActionEvent e) {
                     boolean sel=((JCheckBoxMenuItem) e.getSource()).getState();
                     Main.pref.put("draw.anglesnap.projectionsnap", sel);
@@ -1710,5 +1329,6 @@
                 }
             });
-            {
+
+            private AnglePopupMenu() {
                 helperCb.setState(Main.pref.getBoolean("draw.anglesnap.drawConstructionGeometry",true));
                 projectionCb.setState(Main.pref.getBoolean("draw.anglesnap.projectionsnapgvff",true));
@@ -1746,5 +1366,45 @@
                 });
             }
-        }) {
+        }
+
+        private boolean snapOn; // snapping is turned on
+
+        private boolean active; // snapping is active for current mouse position
+        private boolean fixed; // snap angle is fixed
+        private boolean absoluteFix; // snap angle is absolute
+
+        private boolean drawConstructionGeometry;
+        private boolean showProjectedPoint;
+        private boolean showAngle;
+
+        private boolean snapToProjections;
+
+        private EastNorth dir2;
+        private EastNorth projected;
+        private String labelText;
+        private double lastAngle;
+
+        private double customBaseHeading=-1; // angle of base line, if not last segment)
+        private EastNorth segmentPoint1; // remembered first point of base segment
+        private EastNorth segmentPoint2; // remembered second point of base segment
+        private EastNorth projectionSource; // point that we are projecting to the line
+
+        private double[] snapAngles;
+        private double snapAngleTolerance;
+
+        private double pe,pn; // (pe,pn) - direction of snapping line
+        private double e0,n0; // (e0,n0) - origin of snapping line
+
+        private final String fixFmt="%d "+tr("FIX");
+        private Color snapHelperColor;
+        private Color highlightColor;
+
+        private Stroke normalStroke;
+        private Stroke helperStroke;
+        private Stroke highlightStroke;
+
+        private JCheckBoxMenuItem checkBox;
+
+        private MouseListener anglePopupListener = new PopupMenuLauncher(new AnglePopupMenu()) {
             @Override
             public void mouseClicked(MouseEvent e) {
@@ -1756,7 +1416,358 @@
             }
         };
+
+        public void init() {
+            snapOn=false;
+            checkBox.setState(snapOn);
+            fixed=false; absoluteFix=false;
+
+            Collection<String> angles = Main.pref.getCollection("draw.anglesnap.angles",
+                    Arrays.asList("0","30","45","60","90","120","135","150","180"));
+
+            snapAngles = new double[2*angles.size()];
+            int i=0;
+            for (String s: angles) {
+                try {
+                    snapAngles[i] = Double.parseDouble(s); i++;
+                    snapAngles[i] = 360-Double.parseDouble(s); i++;
+                } catch (NumberFormatException e) {
+                    Main.warn("Incorrect number in draw.anglesnap.angles preferences: "+s);
+                    snapAngles[i]=0;i++;
+                    snapAngles[i]=0;i++;
+                }
+            }
+            snapAngleTolerance = Main.pref.getDouble("draw.anglesnap.tolerance", 5.0);
+            drawConstructionGeometry = Main.pref.getBoolean("draw.anglesnap.drawConstructionGeometry", true);
+            showProjectedPoint = Main.pref.getBoolean("draw.anglesnap.drawProjectedPoint", true);
+            snapToProjections = Main.pref.getBoolean("draw.anglesnap.projectionsnap", true);
+
+            showAngle = Main.pref.getBoolean("draw.anglesnap.showAngle", true);
+            useRepeatedShortcut = Main.pref.getBoolean("draw.anglesnap.toggleOnRepeatedA", true);
+
+            normalStroke = rubberLineStroke;
+            snapHelperColor = Main.pref.getColor(marktr("draw angle snap"), Color.ORANGE);
+
+            highlightColor = Main.pref.getColor(marktr("draw angle snap highlight"), ORANGE_TRANSPARENT);
+            highlightStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.highlight","10"));
+            helperStroke = GuiHelper.getCustomizedStroke(Main.pref.get("draw.anglesnap.stroke.helper","1 4"));
+        }
+
+        public void saveAngles(String ... angles) {
+            Main.pref.putCollection("draw.anglesnap.angles", Arrays.asList(angles));
+        }
+
+        public void setMenuCheckBox(JCheckBoxMenuItem checkBox) {
+            this.checkBox = checkBox;
+        }
+
+        public void drawIfNeeded(Graphics2D g2, MapView mv) {
+            if (!snapOn || !active)
+                return;
+            Point p1=mv.getPoint(getCurrentBaseNode());
+            Point p2=mv.getPoint(dir2);
+            Point p3=mv.getPoint(projected);
+            GeneralPath b;
+            if (drawConstructionGeometry) {
+                g2.setColor(snapHelperColor);
+                g2.setStroke(helperStroke);
+
+                b = new GeneralPath();
+                if (absoluteFix) {
+                    b.moveTo(p2.x,p2.y);
+                    b.lineTo(2*p1.x-p2.x,2*p1.y-p2.y); // bi-directional line
+                } else {
+                    b.moveTo(p2.x,p2.y);
+                    b.lineTo(p3.x,p3.y);
+                }
+                g2.draw(b);
+            }
+            if (projectionSource != null) {
+                g2.setColor(snapHelperColor);
+                g2.setStroke(helperStroke);
+                b = new GeneralPath();
+                b.moveTo(p3.x,p3.y);
+                Point pp=mv.getPoint(projectionSource);
+                b.lineTo(pp.x,pp.y);
+                g2.draw(b);
+            }
+
+            if (customBaseHeading >= 0) {
+                g2.setColor(highlightColor);
+                g2.setStroke(highlightStroke);
+                b = new GeneralPath();
+                Point pp1=mv.getPoint(segmentPoint1);
+                Point pp2=mv.getPoint(segmentPoint2);
+                b.moveTo(pp1.x,pp1.y);
+                b.lineTo(pp2.x,pp2.y);
+                g2.draw(b);
+            }
+
+            g2.setColor(rubberLineColor);
+            g2.setStroke(normalStroke);
+            b = new GeneralPath();
+            b.moveTo(p1.x,p1.y);
+            b.lineTo(p3.x,p3.y);
+            g2.draw(b);
+
+            g2.drawString(labelText, p3.x-5, p3.y+20);
+            if (showProjectedPoint) {
+                g2.setStroke(normalStroke);
+                g2.drawOval(p3.x-5, p3.y-5, 10, 10); // projected point
+            }
+
+            g2.setColor(snapHelperColor);
+            g2.setStroke(helperStroke);
+        }
+
+        /* If mouse position is close to line at 15-30-45-... angle, remembers this direction
+         */
+        public void checkAngleSnapping(EastNorth currentEN, double baseHeading, double curHeading) {
+            EastNorth p0 = getCurrentBaseNode().getEastNorth();
+            EastNorth snapPoint = currentEN;
+            double angle = -1;
+
+            double activeBaseHeading = (customBaseHeading>=0)? customBaseHeading : baseHeading;
+
+            if (snapOn && (activeBaseHeading>=0)) {
+                angle = curHeading - activeBaseHeading;
+                if (angle < 0) {
+                    angle+=360;
+                }
+                if (angle > 360) {
+                    angle=0;
+                }
+
+                double nearestAngle;
+                if (fixed) {
+                    nearestAngle = lastAngle; // if direction is fixed use previous angle
+                    active = true;
+                } else {
+                    nearestAngle = getNearestAngle(angle);
+                    if (getAngleDelta(nearestAngle, angle) < snapAngleTolerance) {
+                        active = (customBaseHeading>=0)? true : Math.abs(nearestAngle - 180) > 1e-3;
+                        // if angle is to previous segment, exclude 180 degrees
+                        lastAngle = nearestAngle;
+                    } else {
+                        active=false;
+                    }
+                }
+
+                if (active) {
+                    double phi;
+                    e0 = p0.east();
+                    n0 = p0.north();
+                    buildLabelText((nearestAngle<=180) ? nearestAngle : nearestAngle-360);
+
+                    phi = (nearestAngle + activeBaseHeading) * Math.PI / 180;
+                    // (pe,pn) - direction of snapping line
+                    pe = Math.sin(phi);
+                    pn = Math.cos(phi);
+                    double scale = 20 * Main.map.mapView.getDist100Pixel();
+                    dir2 = new EastNorth(e0 + scale * pe, n0 + scale * pn);
+                    snapPoint = getSnapPoint(currentEN);
+                } else {
+                    noSnapNow();
+                }
+            }
+
+            // find out the distance, in metres, between the base point and projected point
+            LatLon mouseLatLon = Main.map.mapView.getProjection().eastNorth2latlon(snapPoint);
+            double distance = getCurrentBaseNode().getCoor().greatCircleDistance(mouseLatLon);
+            double hdg = Math.toDegrees(p0.heading(snapPoint));
+            // heading of segment from current to calculated point, not to mouse position
+
+            if (baseHeading >= 0) { // there is previous line segment with some heading
+                angle = hdg - baseHeading;
+                if (angle < 0) {
+                    angle+=360;
+                }
+                if (angle > 360) {
+                    angle=0;
+                }
+            }
+            showStatusInfo(angle, hdg, distance, isSnapOn());
+        }
+
+        private void buildLabelText(double nearestAngle) {
+            if (showAngle) {
+                if (fixed) {
+                    if (absoluteFix) {
+                        labelText = "=";
+                    } else {
+                        labelText = String.format(fixFmt, (int) nearestAngle);
+                    }
+                } else {
+                    labelText = String.format("%d", (int) nearestAngle);
+                }
+            } else {
+                if (fixed) {
+                    if (absoluteFix) {
+                        labelText = "=";
+                    } else {
+                        labelText = String.format(tr("FIX"), 0);
+                    }
+                } else {
+                    labelText = "";
+                }
+            }
+        }
+
+        public EastNorth getSnapPoint(EastNorth p) {
+            if (!active)
+                return p;
+            double de=p.east()-e0;
+            double dn=p.north()-n0;
+            double l = de*pe+dn*pn;
+            double delta = Main.map.mapView.getDist100Pixel()/20;
+            if (!absoluteFix && l<delta) {
+                active=false;
+                return p;
+            } //  do not go backward!
+
+            projectionSource=null;
+            if (snapToProjections) {
+                DataSet ds = getCurrentDataSet();
+                Collection<Way> selectedWays = ds.getSelectedWays();
+                if (selectedWays.size()==1) {
+                    Way w = selectedWays.iterator().next();
+                    Collection<EastNorth> pointsToProject = new ArrayList<>();
+                    if (w.getNodesCount()<1000) {
+                        for (Node n: w.getNodes()) {
+                            pointsToProject.add(n.getEastNorth());
+                        }
+                    }
+                    if (customBaseHeading >= 0) {
+                        pointsToProject.add(segmentPoint1);
+                        pointsToProject.add(segmentPoint2);
+                    }
+                    EastNorth enOpt=null;
+                    double dOpt=1e5;
+                    for (EastNorth en: pointsToProject) { // searching for besht projection
+                        double l1 = (en.east()-e0)*pe+(en.north()-n0)*pn;
+                        double d1 = Math.abs(l1-l);
+                        if (d1 < delta && d1 < dOpt) {
+                            l=l1;
+                            enOpt = en;
+                            dOpt = d1;
+                        }
+                    }
+                    if (enOpt!=null) {
+                        projectionSource =  enOpt;
+                    }
+                }
+            }
+            return projected = new EastNorth(e0+l*pe, n0+l*pn);
+        }
+
+        public void noSnapNow() {
+            active=false;
+            dir2=null; projected=null;
+            labelText=null;
+        }
+
+        public void setBaseSegment(WaySegment seg) {
+            if (seg==null) return;
+            segmentPoint1=seg.getFirstNode().getEastNorth();
+            segmentPoint2=seg.getSecondNode().getEastNorth();
+
+            double hdg = segmentPoint1.heading(segmentPoint2);
+            hdg=Math.toDegrees(hdg);
+            if (hdg<0) {
+                hdg+=360;
+            }
+            if (hdg>360) {
+                hdg-=360;
+            }
+            customBaseHeading=hdg;
+        }
+
+        private void nextSnapMode() {
+            if (snapOn) {
+                // turn off snapping if we are in fixed mode or no actile snapping line exist
+                if (fixed || !active) {
+                    snapOn = false;
+                    unsetFixedMode();
+                } else {
+                    setFixedMode();
+                }
+            } else {
+                snapOn=true;
+                unsetFixedMode();
+            }
+            checkBox.setState(snapOn);
+            customBaseHeading=-1;
+        }
+
+        private void enableSnapping() {
+            snapOn = true;
+            checkBox.setState(snapOn);
+            customBaseHeading=-1;
+            unsetFixedMode();
+        }
+
+        private void toggleSnapping() {
+            snapOn = !snapOn;
+            checkBox.setState(snapOn);
+            customBaseHeading=-1;
+            unsetFixedMode();
+        }
+
+        public void setFixedMode() {
+            if (active) {
+                fixed=true;
+            }
+        }
+
+        public  void unsetFixedMode() {
+            fixed=false;
+            absoluteFix=false;
+            lastAngle=0;
+            active=false;
+        }
+
+        public  boolean isActive() {
+            return active;
+        }
+
+        public  boolean isSnapOn() {
+            return snapOn;
+        }
+
+        private double getNearestAngle(double angle) {
+            double delta,minDelta=1e5, bestAngle=0.0;
+            for (double snapAngle : snapAngles) {
+                delta = getAngleDelta(angle, snapAngle);
+                if (delta < minDelta) {
+                    minDelta = delta;
+                    bestAngle = snapAngle;
+                }
+            }
+            if (Math.abs(bestAngle-360) < 1e-3) {
+                bestAngle=0;
+            }
+            return bestAngle;
+        }
+
+        private double getAngleDelta(double a, double b) {
+            double delta = Math.abs(a-b);
+            if (delta>180)
+                return 360-delta;
+            else
+                return delta;
+        }
+
+        private void unFixOrTurnOff() {
+            if (absoluteFix) {
+                unsetFixedMode();
+            } else {
+                toggleSnapping();
+            }
+        }
     }
 
     private class SnapChangeAction extends JosmAction {
+        /**
+         * Constructs a new {@code SnapChangeAction}.
+         */
         public SnapChangeAction() {
             super(tr("Angle snapping"), /* ICON() */ "anglesnap",
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java	(revision 8509)
@@ -174,5 +174,6 @@
     /** {@code true}, if dual alignment mode is enabled. User wants following extrude to be dual aligned. */
     private boolean dualAlignEnabled;
-    /** {@code true}, if dual alignment is active. User is dragging the mouse, required conditions are met. Treat {@link #mode} (extrude/translate/create_new) as dual aligned. */
+    /** {@code true}, if dual alignment is active. User is dragging the mouse, required conditions are met.
+     * Treat {@link #mode} (extrude/translate/create_new) as dual aligned. */
     private boolean dualAlignActive;
     /** Dual alignment reference segments */
@@ -622,5 +623,6 @@
         Node prevNode = getPreviousNode(selectedSegment.lowerIndex);
         boolean nodeOverlapsSegment = prevNode != null && Geometry.segmentsParallel(initialN1en, prevNode.getEastNorth(), initialN1en, newN1en);
-        // segmentAngleZero marks subset of nodeOverlapsSegment. nodeOverlapsSegment is true if angle between segments is 0 or PI, segmentAngleZero only if angle is 0
+        // segmentAngleZero marks subset of nodeOverlapsSegment.
+        // nodeOverlapsSegment is true if angle between segments is 0 or PI, segmentAngleZero only if angle is 0
         boolean segmentAngleZero = prevNode != null && Math.abs(Geometry.getCornerAngle(prevNode.getEastNorth(), initialN1en, newN1en)) < 1e-5;
         boolean hasOtherWays = hasNodeOtherWays(selectedSegment.getFirstNode(), selectedSegment.way);
@@ -927,5 +929,6 @@
             if (newN1en == null || newN2en == null) return bestMovement;
             if (keepSegmentDirection && isOppositeDirection(newN1en, newN2en, initialN1en, initialN2en)) {
-                EastNorth collapsedSegmentPosition = Geometry.getLineLineIntersection(dualAlignSegment1.p1, dualAlignSegment1.p2, dualAlignSegment2.p1, dualAlignSegment2.p2);
+                EastNorth collapsedSegmentPosition = Geometry.getLineLineIntersection(dualAlignSegment1.p1, dualAlignSegment1.p2,
+                        dualAlignSegment2.p1, dualAlignSegment2.p2);
                 newN1en = collapsedSegmentPosition;
                 newN2en = collapsedSegmentPosition;
@@ -1172,9 +1175,12 @@
             // Graphics2D calls 'user space'. Essentially a manhattan distance of manhattan distances.
             // This can be used as a safe length of line to generate which will always go off-viewport.
-            double linelength = Math.abs(widthpoint.getX()) + Math.abs(widthpoint.getY()) + Math.abs(heightpoint.getX()) + Math.abs(heightpoint.getY());
-
-            return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * linelength) , start.getY() + (unitvector.getY() * linelength)));
+            double linelength = Math.abs(widthpoint.getX()) + Math.abs(widthpoint.getY())
+                    + Math.abs(heightpoint.getX()) + Math.abs(heightpoint.getY());
+
+            return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * linelength) , start.getY()
+                    + (unitvector.getY() * linelength)));
         } catch (NoninvertibleTransformException e) {
-            return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * 10) , start.getY() + (unitvector.getY() * 10)));
+            return new Line2D.Double(start, new Point2D.Double(start.getX() + (unitvector.getX() * 10) , start.getY()
+                    + (unitvector.getY() * 10)));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/ParallelWays.java	(revision 8509)
@@ -89,5 +89,5 @@
         }
 
-        // Ugly method of ensuring that the offset isn't inverted. I'm sure there is a better and more elegant way, but I'm starting to get sleepy, so I do this for now.
+        // Ugly method of ensuring that the offset isn't inverted. I'm sure there is a better and more elegant way
         Way refWay = ways.get(refWayIndex);
         boolean refWayReversed = true;
Index: /trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/SelectMembersAction.java	(revision 8509)
@@ -23,5 +23,6 @@
     /**
      * Constructs a new <code>SelectMembersAction</code>.
-     * @param add if <code>true</code>, the members will be added to current selection. If <code>false</code>, the members will replace the current selection.
+     * @param add if <code>true</code>, the members will be added to current selection.
+     * If <code>false</code>, the members will replace the current selection.
      */
     public SelectMembersAction(boolean add) {
Index: /trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/SelectRelationAction.java	(revision 8509)
@@ -20,8 +20,10 @@
     /**
      * Constructs a new <code>SelectRelationAction</code>.
-     * @param add if <code>true</code>, the relation will be added to current selection. If <code>false</code>, the relation will replace the current selection.
+     * @param add if <code>true</code>, the relation will be added to current selection.
+     * If <code>false</code>, the relation will replace the current selection.
      */
     public SelectRelationAction(boolean add) {
-        putValue(SHORT_DESCRIPTION, add ? tr("Add the selected relations to the current selection") : tr("Set the current selection to the list of selected relations"));
+        putValue(SHORT_DESCRIPTION, add ? tr("Add the selected relations to the current selection") :
+            tr("Set the current selection to the list of selected relations"));
         putValue(SMALL_ICON, ImageProvider.get("dialogs", "select"));
         putValue(NAME, add ? tr("Select relation (add)") : tr("Select relation"));
Index: /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java	(revision 8509)
@@ -322,5 +322,6 @@
                     new ToolbarPreferences.ActionDefinition(Main.main.menu.search);
             aDef.getParameters().put(SEARCH_EXPRESSION, initialValues);
-            aDef.setName(Utils.shortenString(initialValues.text, MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY)); // Display search expression as tooltip instead of generic one
+            // Display search expression as tooltip instead of generic one
+            aDef.setName(Utils.shortenString(initialValues.text, MAX_LENGTH_SEARCH_EXPRESSION_DISPLAY));
             // parametrized action definition is now composed
             ActionParser actionParser = new ToolbarPreferences.ActionParser(null);
@@ -348,5 +349,7 @@
                 .addKeyword("<i>key</i>=", null, tr("matches if ''key'' exists"))
                 .addKeyword("<i>key</i>><i>value</i>", null, tr("matches if ''key'' is greater than ''value'' (analogously, less than)"))
-                .addKeyword("\"key\"=\"value\"", "\"\"=\"\"", tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."), "\"addr:street\"")
+                .addKeyword("\"key\"=\"value\"", "\"\"=\"\"",
+                        tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."),
+                        "\"addr:street\"")
                 , GBC.eol());
         right.add(new SearchKeywordRow(hcbSearchString)
@@ -373,6 +376,8 @@
                 .addKeyword("id:", "id:", tr("objects with given ID"), "id:0 (new objects)")
                 .addKeyword("version:", "version:", tr("objects with given version"), "version:0 (objects without an assigned version)")
-                .addKeyword("changeset:", "changeset:", tr("objects with given changeset ID"), "changeset:0 (objects without an assigned changeset)")
-                .addKeyword("timestamp:", "timestamp:", tr("objects with last modification timestamp within range"), "timestamp:2012/", "timestamp:2008/2011-02-04T12")
+                .addKeyword("changeset:", "changeset:", tr("objects with given changeset ID"),
+                        "changeset:0 (objects without an assigned changeset)")
+                .addKeyword("timestamp:", "timestamp:", tr("objects with last modification timestamp within range"), "timestamp:2012/",
+                        "timestamp:2008/2011-02-04T12")
                 , GBC.eol());
             right.add(new SearchKeywordRow(hcbSearchString)
@@ -404,5 +409,6 @@
                 .addKeyword("allinview", "allinview ", tr("objects (and all its way nodes / relation members) in current view"))
                 .addKeyword("indownloadedarea", "indownloadedarea ", tr("objects in downloaded area"))
-                .addKeyword("allindownloadedarea", "allindownloadedarea ", tr("objects (and all its way nodes / relation members) in downloaded area"))
+                .addKeyword("allindownloadedarea", "allindownloadedarea ",
+                        tr("objects (and all its way nodes / relation members) in downloaded area"))
                 , GBC.eol());
         }
Index: /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	(revision 8509)
@@ -166,5 +166,6 @@
             } else {
                 /* I18n: plural form for objects, but value < 2 not possible! */
-                text = trn("Set {0}={1} for {2} object", "Set {0}={1} for {2} objects", objects.size(), entry.getKey(), entry.getValue(), objects.size());
+                text = trn("Set {0}={1} for {2} object", "Set {0}={1} for {2} objects",
+                        objects.size(), entry.getKey(), entry.getValue(), objects.size());
             }
         } else {
Index: /trunk/src/org/openstreetmap/josm/command/PurgeCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/command/PurgeCommand.java	(revision 8509)
@@ -124,5 +124,6 @@
             if (data != null) {
                 if (ds.getPrimitiveById(osm) != osm)
-                    throw new AssertionError(String.format("Primitive %s has been made incomplete when purging, but it cannot be found on undo.", osm));
+                    throw new AssertionError(
+                            String.format("Primitive %s has been made incomplete when purging, but it cannot be found on undo.", osm));
                 osm.load(data);
             } else {
Index: /trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/command/conflict/TagConflictResolveCommand.java	(revision 8509)
@@ -58,11 +58,14 @@
             case NODE:
                 /* for correct i18n of plural forms - see #9110 */
-                return trn("Resolve {0} tag conflict in node {1}", "Resolve {0} tag conflicts in node {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
+                return trn("Resolve {0} tag conflict in node {1}", "Resolve {0} tag conflicts in node {1}",
+                        getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
             case WAY:
                 /* for correct i18n of plural forms - see #9110 */
-                return trn("Resolve {0} tag conflict in way {1}", "Resolve {0} tag conflicts in way {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
+                return trn("Resolve {0} tag conflict in way {1}", "Resolve {0} tag conflicts in way {1}",
+                        getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
             case RELATION:
                 /* for correct i18n of plural forms - see #9110 */
-                return trn("Resolve {0} tag conflict in relation {1}", "Resolve {0} tag conflicts in relation {1}", getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
+                return trn("Resolve {0} tag conflict in relation {1}", "Resolve {0} tag conflicts in relation {1}",
+                        getNumDecidedConflicts(), getNumDecidedConflicts(), conflict.getMy().getId());
         }
         return "";
Index: /trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java	(revision 8509)
@@ -180,5 +180,6 @@
                         RoleCorrection roleCorrection = roleCorrections.get(i);
                         if (roleTableMap.get(primitive).getCorrectionTableModel().getApply(i)) {
-                            commands.add(new ChangeRelationMemberRoleCommand(roleCorrection.relation, roleCorrection.position, roleCorrection.newRole));
+                            commands.add(new ChangeRelationMemberRoleCommand(
+                                    roleCorrection.relation, roleCorrection.position, roleCorrection.newRole));
                         }
                     }
Index: /trunk/src/org/openstreetmap/josm/data/Bounds.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/Bounds.java	(revision 8509)
@@ -176,5 +176,6 @@
         String[] components = asString.split(separator);
         if (components.length != 4)
-            throw new IllegalArgumentException(MessageFormat.format("Exactly four doubles expected in string, got {0}: {1}", components.length, asString));
+            throw new IllegalArgumentException(
+                    MessageFormat.format("Exactly four doubles expected in string, got {0}: {1}", components.length, asString));
         double[] values = new double[4];
         for (int i=0; i<4; i++) {
Index: /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java	(revision 8509)
@@ -180,7 +180,9 @@
         if (!opts.isEmpty()) {
             String[] options = opts.split(";");
-            answer = JOptionPane.showOptionDialog(Main.parent, text, "Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, 0);
+            answer = JOptionPane.showOptionDialog(Main.parent, text, "Question",
+                    JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, 0);
         } else {
-            answer = JOptionPane.showOptionDialog(Main.parent, text, "Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, 2);
+            answer = JOptionPane.showOptionDialog(Main.parent, text, "Question",
+                    JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, 2);
         }
         if (answer==null) return -1; else return answer;
@@ -229,5 +231,6 @@
      * Export specified preferences keys to configuration file
      * @param filename - name of file
-     * @param append - will the preferences be appended to existing ones when file is imported later. Elsewhere preferences from file will replace existing keys.
+     * @param append - will the preferences be appended to existing ones when file is imported later.
+     * Elsewhere preferences from file will replace existing keys.
      * @param keys - collection of preferences key names to save
      */
@@ -1042,5 +1045,6 @@
      * @throws ScriptException if the evaluation fails
      */
-    public static void loadPrefsToJS(ScriptEngine engine, Preferences tmpPref, String whereToPutInJS, boolean includeDefaults) throws ScriptException {
+    public static void loadPrefsToJS(ScriptEngine engine, Preferences tmpPref, String whereToPutInJS, boolean includeDefaults)
+            throws ScriptException {
         Map<String, String> stringMap =  new TreeMap<>();
         Map<String, List<String>> listMap = new TreeMap<>();
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 8509)
@@ -871,8 +871,10 @@
         if (prefDir.exists()) {
             if(!prefDir.isDirectory()) {
-                Main.warn(tr("Failed to initialize preferences. Preference directory ''{0}'' is not a directory.", prefDir.getAbsoluteFile()));
+                Main.warn(tr("Failed to initialize preferences. Preference directory ''{0}'' is not a directory.",
+                        prefDir.getAbsoluteFile()));
                 JOptionPane.showMessageDialog(
                         Main.parent,
-                        tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' is not a directory.</html>", prefDir.getAbsoluteFile()),
+                        tr("<html>Failed to initialize preferences.<br>Preference directory ''{0}'' is not a directory.</html>",
+                                prefDir.getAbsoluteFile()),
                         tr("Error"),
                         JOptionPane.ERROR_MESSAGE
@@ -882,8 +884,10 @@
         } else {
             if (!prefDir.mkdirs()) {
-                Main.warn(tr("Failed to initialize preferences. Failed to create missing preference directory: {0}", prefDir.getAbsoluteFile()));
+                Main.warn(tr("Failed to initialize preferences. Failed to create missing preference directory: {0}",
+                        prefDir.getAbsoluteFile()));
                 JOptionPane.showMessageDialog(
                         Main.parent,
-                        tr("<html>Failed to initialize preferences.<br>Failed to create missing preference directory: {0}</html>",prefDir.getAbsoluteFile()),
+                        tr("<html>Failed to initialize preferences.<br>Failed to create missing preference directory: {0}</html>",
+                                prefDir.getAbsoluteFile()),
                         tr("Error"),
                         JOptionPane.ERROR_MESSAGE
@@ -908,5 +912,6 @@
             JOptionPane.showMessageDialog(
                     Main.parent,
-                    tr("<html>Failed to initialize preferences.<br>Failed to reset preference file to default: {0}</html>",getPreferenceFile().getAbsoluteFile()),
+                    tr("<html>Failed to initialize preferences.<br>Failed to reset preference file to default: {0}</html>",
+                            getPreferenceFile().getAbsoluteFile()),
                     tr("Error"),
                     JOptionPane.ERROR_MESSAGE
@@ -921,5 +926,6 @@
             JOptionPane.showMessageDialog(
                     Main.parent,
-                    tr("<html>Preferences file had errors.<br> Making backup of old one to <br>{0}<br> and creating a new default preference file.</html>", backupFile.getAbsoluteFile()),
+                    tr("<html>Preferences file had errors.<br> Making backup of old one to <br>{0}<br> and creating a new default preference file.</html>",
+                            backupFile.getAbsoluteFile()),
                     tr("Error"),
                     JOptionPane.ERROR_MESSAGE
@@ -1646,5 +1652,6 @@
 
     protected void throwException(String msg) {
-        throw new RuntimeException(msg + tr(" (at line {0}, column {1})", parser.getLocation().getLineNumber(), parser.getLocation().getColumnNumber()));
+        throw new RuntimeException(msg + tr(" (at line {0}, column {1})",
+                parser.getLocation().getLineNumber(), parser.getLocation().getColumnNumber()));
     }
 
@@ -1711,5 +1718,6 @@
                 b.append("    <map>\n");
                 for (Entry<String, String> e : struct.entrySet()) {
-                    b.append("      <tag key='").append(XmlWriter.encode(e.getKey())).append("' value='").append(XmlWriter.encode(e.getValue())).append("'/>\n");
+                    b.append("      <tag key='").append(XmlWriter.encode(e.getKey()))
+                     .append("' value='").append(XmlWriter.encode(e.getValue())).append("'/>\n");
                 }
                 b.append("    </map>\n");
Index: /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 8509)
@@ -73,6 +73,5 @@
         jcsLog.setLevel(Level.INFO);
         jcsLog.setUseParentHandlers(false);
-        //Logger.getLogger("org.apache.common").setUseParentHandlers(false);
-        // we need a separate handler from Main's, as we  downgrade LEVEL.INFO to DEBUG level
+        // we need a separate handler from Main's, as we downgrade LEVEL.INFO to DEBUG level
         jcsLog.addHandler(new Handler() {
             @Override
@@ -100,22 +99,20 @@
         });
 
-
-        CompositeCacheManager cm  = CompositeCacheManager.getUnconfiguredInstance();
         // this could be moved to external file
         Properties props = new Properties();
         // these are default common to all cache regions
         // use of auxiliary cache and sizing of the caches is done with giving proper geCache(...) params
-        props.setProperty("jcs.default.cacheattributes",                            org.apache.commons.jcs.engine.CompositeCacheAttributes.class.getCanonicalName());
-        props.setProperty("jcs.default.cacheattributes.MaxObjects",                 DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString());
-        props.setProperty("jcs.default.cacheattributes.UseMemoryShrinker",          "true");
-        props.setProperty("jcs.default.cacheattributes.DiskUsagePatternName",       "UPDATE"); // store elements on disk on put
-        props.setProperty("jcs.default.elementattributes",                          CacheEntryAttributes.class.getCanonicalName());
-        props.setProperty("jcs.default.elementattributes.IsEternal",                "false");
-        props.setProperty("jcs.default.elementattributes.MaxLife",                  Long.toString(maxObjectTTL));
-        props.setProperty("jcs.default.elementattributes.IdleTime",                 Long.toString(maxObjectTTL));
-        props.setProperty("jcs.default.elementattributes.IsSpool",                  "true");
+        props.setProperty("jcs.default.cacheattributes",                      CompositeCacheAttributes.class.getCanonicalName());
+        props.setProperty("jcs.default.cacheattributes.MaxObjects",           DEFAULT_MAX_OBJECTS_IN_MEMORY.get().toString());
+        props.setProperty("jcs.default.cacheattributes.UseMemoryShrinker",    "true");
+        props.setProperty("jcs.default.cacheattributes.DiskUsagePatternName", "UPDATE"); // store elements on disk on put
+        props.setProperty("jcs.default.elementattributes",                    CacheEntryAttributes.class.getCanonicalName());
+        props.setProperty("jcs.default.elementattributes.IsEternal",          "false");
+        props.setProperty("jcs.default.elementattributes.MaxLife",            Long.toString(maxObjectTTL));
+        props.setProperty("jcs.default.elementattributes.IdleTime",           Long.toString(maxObjectTTL));
+        props.setProperty("jcs.default.elementattributes.IsSpool",            "true");
+        CompositeCacheManager cm = CompositeCacheManager.getUnconfiguredInstance();
         cm.configure(props);
         cacheManager = cm;
-
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java	(revision 8509)
@@ -288,5 +288,6 @@
             expires = Math.min(expires, attributes.getCreateTime() + EXPIRE_TIME_SERVER_LIMIT);
             if (now > expires) {
-                log.log(Level.FINE, "JCS - Object {0} has expired -> valid to {1}, now is: {2}", new Object[]{getUrl(), Long.toString(expires), Long.toString(now)});
+                log.log(Level.FINE, "JCS - Object {0} has expired -> valid to {1}, now is: {2}",
+                        new Object[]{getUrl(), Long.toString(expires), Long.toString(now)});
                 return false;
             }
Index: /trunk/src/org/openstreetmap/josm/data/imagery/Shape.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/Shape.java	(revision 8509)
@@ -27,5 +27,6 @@
         String[] components = asString.split(separator);
         if (components.length % 2 != 0)
-            throw new IllegalArgumentException(MessageFormat.format("Even number of doubles expected in string, got {0}: {1}", components.length, asString));
+            throw new IllegalArgumentException(MessageFormat.format("Even number of doubles expected in string, got {0}: {1}",
+                    components.length, asString));
         for (int i=0; i<components.length; i+=2) {
             addPoint(components[i], components[i+1]);
Index: /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java	(revision 8509)
@@ -80,5 +80,6 @@
      * @throws IOException      when cache initialization fails
      */
-    public TMSCachedTileLoader(TileLoaderListener listener, String name, int connectTimeout, int readTimeout, Map<String, String> headers, String cacheDir) throws IOException {
+    public TMSCachedTileLoader(TileLoaderListener listener, String name, int connectTimeout, int readTimeout,
+            Map<String, String> headers, String cacheDir) throws IOException {
         this.cache = JCSCacheManager.getCache(name,
                 200, // use fairly small memory cache, as cached objects are quite big, as they contain BufferedImages
Index: /trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/WmsCache.java	(revision 8509)
@@ -98,5 +98,6 @@
     private int totalFileSize;
     private boolean totalFileSizeDirty; // Some file was missing - size needs to be recalculated
-    // No need for hashCode/equals on CacheEntry, object identity is enough. Comparing by values can lead to error - CacheEntry for wrong projection could be found
+    // No need for hashCode/equals on CacheEntry, object identity is enough.
+    // Comparing by values can lead to error - CacheEntry for wrong projection could be found
     private Map<CacheEntry, SoftReference<BufferedImage>> memoryCache = new HashMap<>();
     private Set<ProjectionBounds> areaToCache;
@@ -458,5 +459,6 @@
     }
 
-    private String generateFileName(ProjectionEntries projectionEntries, double pixelPerDegree, Projection projection, double east, double north, String mimeType) {
+    private String generateFileName(ProjectionEntries projectionEntries, double pixelPerDegree, Projection projection,
+            double east, double north, String mimeType) {
         LatLon ll1 = projection.eastNorth2latlon(new EastNorth(east, north));
         LatLon ll2 = projection.eastNorth2latlon(new EastNorth(east + 100 / pixelPerDegree, north));
@@ -490,5 +492,6 @@
         FILENAME_LOOP:
             while (true) {
-                String result = String.format("%s_%." + precisionLat + "f_%." + precisionLon +"f%s.%s", zoom, ll1.lat(), ll1.lon(), counter==0?"":"_" + counter, extension);
+                String result = String.format("%s_%." + precisionLat + "f_%." + precisionLon +"f%s.%s",
+                        zoom, ll1.lat(), ll1.lon(), counter==0?"":"_" + counter, extension);
                 for (CacheEntry entry: projectionEntries.entries) {
                     if (entry.filename.equals(result)) {
@@ -511,6 +514,6 @@
      * @throws IOException if any I/O error occurs
      */
-    public synchronized void saveToCache(BufferedImage img, InputStream imageData, Projection projection, double pixelPerDegree, double east, double north)
-            throws IOException {
+    public synchronized void saveToCache(BufferedImage img, InputStream imageData, Projection projection, double pixelPerDegree,
+            double east, double north) throws IOException {
         ProjectionEntries projectionEntries = getProjectionEntries(projection);
         CacheEntry entry = findEntry(projectionEntries, pixelPerDegree, east, north);
Index: /trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DataSetMerger.java	(revision 8509)
@@ -268,5 +268,6 @@
             OsmPrimitive targetMember = getMergeTarget(sourceMember.getMember());
             if (targetMember == null)
-                throw new IllegalStateException(tr("Missing merge target of type {0} with id {1}", sourceMember.getType(), sourceMember.getUniqueId()));
+                throw new IllegalStateException(tr("Missing merge target of type {0} with id {1}",
+                        sourceMember.getType(), sourceMember.getUniqueId()));
             RelationMember newMember = new RelationMember(sourceMember.getRole(), targetMember);
             newMembers.add(newMember);
@@ -312,5 +313,6 @@
             // take. We take target.
             //
-        } else if (!target.isModified() && !source.isModified() && target.isVisible() != source.isVisible() && target.getVersion() == source.getVersion())
+        } else if (!target.isModified() && !source.isModified() && target.isVisible() != source.isVisible()
+                && target.getVersion() == source.getVersion())
             // Same version, but different "visible" attribute and neither of them are modified.
             // It indicates a serious problem in datasets.
Index: /trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java	(revision 8509)
@@ -369,5 +369,6 @@
         }
 
-        private static List<PolygonLevel> processOuterWay(int level, List<JoinedPolygon> boundaryWays, final List<PolygonLevel> result, JoinedPolygon outerWay) {
+        private static List<PolygonLevel> processOuterWay(int level, List<JoinedPolygon> boundaryWays,
+                final List<PolygonLevel> result, JoinedPolygon outerWay) {
             Pair<Boolean, List<JoinedPolygon>> p = findInnerWaysCandidates(outerWay, boundaryWays);
             if (p == null) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 8509)
@@ -164,5 +164,6 @@
      * Constructs an identical clone of the argument.
      * @param clone The node to clone
-     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}. If {@code false}, does nothing
+     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}.
+     * If {@code false}, does nothing
      */
     public Node(Node clone, boolean clearMetadata) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java	(revision 8509)
@@ -345,5 +345,6 @@
     protected void writeUnlock(boolean locked) {
         if (locked) {
-            // It shouldn't be possible for dataset to become null because method calling setDataset would need write lock which is owned by this thread
+            // It shouldn't be possible for dataset to become null because
+            // method calling setDataset would need write lock which is owned by this thread
             dataSet.endUpdate();
         }
@@ -1141,7 +1142,9 @@
             CheckParameterUtil.ensureParameterNotNull(other, "other");
             if (other.isNew() ^ isNew())
-                throw new DataIntegrityProblemException(tr("Cannot merge because either of the participating primitives is new and the other is not"));
+                throw new DataIntegrityProblemException(
+                        tr("Cannot merge because either of the participating primitives is new and the other is not"));
             if (!other.isNew() && other.getId() != id)
-                throw new DataIntegrityProblemException(tr("Cannot merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId()));
+                throw new DataIntegrityProblemException(
+                        tr("Cannot merge primitives with different ids. This id is {0}, the other is {1}", id, other.getId()));
 
             setKeys(other.getKeys());
Index: /trunk/src/org/openstreetmap/josm/data/osm/Relation.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Relation.java	(revision 8509)
@@ -187,5 +187,6 @@
      * Constructs an identical clone of the argument.
      * @param clone The relation to clone
-     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}. If {@code false}, does nothing
+     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}.
+     * If {@code false}, does nothing
      */
     public Relation(Relation clone, boolean clearMetadata) {
@@ -490,5 +491,7 @@
             for (RelationMember rm: members) {
                 if (rm.getMember().getDataSet() != dataSet)
-                    throw new DataIntegrityProblemException(String.format("Relation member must be part of the same dataset as relation(%s, %s)", getPrimitiveId(), rm.getMember().getPrimitiveId()));
+                    throw new DataIntegrityProblemException(
+                            String.format("Relation member must be part of the same dataset as relation(%s, %s)",
+                                    getPrimitiveId(), rm.getMember().getPrimitiveId()));
             }
             if (Main.pref.getBoolean("debug.checkDeleteReferenced", true)) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/Way.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Way.java	(revision 8509)
@@ -187,5 +187,6 @@
      * Replies the ordered {@link List} of chunks of this way. Each chunk is replied as a {@link Pair} of {@link Node nodes}.
      * @param sort If true, the nodes of each pair are sorted as defined by {@link Pair#sort}.
-     *             If false, Pair.a and Pair.b are in the way order (i.e for a given Pair(n), Pair(n-1).b == Pair(n).a, Pair(n).b == Pair(n+1).a, etc.)
+     *             If false, Pair.a and Pair.b are in the way order
+     *             (i.e for a given Pair(n), Pair(n-1).b == Pair(n).a, Pair(n).b == Pair(n+1).a, etc.)
      * @return The ordered list of chunks of this way.
      * @since 3348
@@ -234,5 +235,6 @@
      * Contructs a new {@code Way} from an existing {@code Way}.
      * @param original The original {@code Way} to be identically cloned. Must not be null
-     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}. If {@code false}, does nothing
+     * @param clearMetadata If {@code true}, clears the OSM id and other metadata as defined by {@link #clearOsmMetadata}.
+     * If {@code false}, does nothing
      * @since 2410
      */
@@ -597,5 +599,6 @@
                 if (n.isDeleted())
                     throw new DataIntegrityProblemException("Deleted node referenced: " + toString(),
-                            "<html>" + tr("Deleted node referenced by {0}", DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(this)) + "</html>");
+                            "<html>" + tr("Deleted node referenced by {0}",
+                                    DefaultNameFormatter.getInstance().formatAsHtmlUnorderedList(this)) + "</html>");
             }
             if (Main.pref.getBoolean("debug.checkNullCoor", true)) {
Index: /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java	(revision 8509)
@@ -29,119 +29,9 @@
     private static final DatasetEventManager instance = new DatasetEventManager();
 
-    public enum FireMode {
-        /**
-         * Fire in calling thread immediately.
-         */
-        IMMEDIATELY,
-        /**
-         * Fire in event dispatch thread.
-         */
-        IN_EDT,
-        /**
-         * Fire in event dispatch thread. If more than one event arrived when event queue is checked, merged them to
-         * one event
-         */
-        IN_EDT_CONSOLIDATED}
-
-    private static class ListenerInfo {
-        private final DataSetListener listener;
-        private final boolean consolidate;
-
-        public ListenerInfo(DataSetListener listener, boolean consolidate) {
-            this.listener = listener;
-            this.consolidate = consolidate;
-        }
-
-        @Override
-        public int hashCode() {
-            return listener.hashCode();
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            return o instanceof ListenerInfo && ((ListenerInfo)o).listener == listener;
-        }
-    }
-
-    public static DatasetEventManager getInstance() {
-        return instance;
-    }
-
-    private final Queue<AbstractDatasetChangedEvent> eventsInEDT = new LinkedBlockingQueue<>();
-    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<>();
-    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<>();
-    private final DataSetListener myListener = new DataSetListenerAdapter(this);
-
-    /**
-     * Constructs a new {@code DatasetEventManager}.
-     */
-    public DatasetEventManager() {
-        MapView.addEditLayerChangeListener(this);
-    }
-
-    /**
-     * Register listener, that will receive events from currently active dataset
-     * @param listener the listener to be registered
-     * @param fireMode If {@link FireMode#IN_EDT} or {@link FireMode#IN_EDT_CONSOLIDATED},
-     * listener will be notified in event dispatch thread instead of thread that caused
-     * the dataset change
-     */
-    public void addDatasetListener(DataSetListener listener, FireMode fireMode) {
-        if (fireMode == FireMode.IN_EDT || fireMode == FireMode.IN_EDT_CONSOLIDATED) {
-            inEDTListeners.addIfAbsent(new ListenerInfo(listener, fireMode == FireMode.IN_EDT_CONSOLIDATED));
-        } else {
-            normalListeners.addIfAbsent(new ListenerInfo(listener, false));
-        }
-    }
-
-    public void removeDatasetListener(DataSetListener listener) {
-        ListenerInfo searchListener = new ListenerInfo(listener, false);
-        inEDTListeners.remove(searchListener);
-        normalListeners.remove(searchListener);
-    }
-
-    @Override
-    public void editLayerChanged(OsmDataLayer oldLayer, OsmDataLayer newLayer) {
-        if (oldLayer != null) {
-            oldLayer.data.removeDataSetListener(myListener);
-        }
-
-        if (newLayer != null) {
-            newLayer.data.addDataSetListener(myListener);
-            processDatasetEvent(new DataChangedEvent(newLayer.data));
-        } else {
-            processDatasetEvent(new DataChangedEvent(null));
-        }
-    }
-
-    private void fireEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {
-        for (ListenerInfo listener: listeners) {
-            if (!listener.consolidate) {
-                event.fire(listener.listener);
-            }
-        }
-    }
-
-    private void fireConsolidatedEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {
-        for (ListenerInfo listener: listeners) {
-            if (listener.consolidate) {
-                event.fire(listener.listener);
-            }
-        }
-    }
-
-    @Override
-    public void processDatasetEvent(AbstractDatasetChangedEvent event) {
-        fireEvents(normalListeners, event);
-        eventsInEDT.add(event);
-        SwingUtilities.invokeLater(edtRunnable);
-    }
-
-    private final Runnable edtRunnable = new Runnable() {
+    private final class EdtRunnable implements Runnable {
         @Override
         public void run() {
             while (!eventsInEDT.isEmpty()) {
-                List<AbstractDatasetChangedEvent> events = new ArrayList<>();
-                events.addAll(eventsInEDT);
+                List<AbstractDatasetChangedEvent> events = new ArrayList<>(eventsInEDT);
 
                 DataSet dataSet = null;
@@ -192,5 +82,4 @@
                             consolidatedEvent = new DataChangedEvent(dataSet, new ArrayList<>(Arrays.asList(consolidatedEvent)));
                         }
-
                     }
                 }
@@ -200,4 +89,114 @@
             }
         }
-    };
+    }
+
+    public enum FireMode {
+        /**
+         * Fire in calling thread immediately.
+         */
+        IMMEDIATELY,
+        /**
+         * Fire in event dispatch thread.
+         */
+        IN_EDT,
+        /**
+         * Fire in event dispatch thread. If more than one event arrived when event queue is checked, merged them to
+         * one event
+         */
+        IN_EDT_CONSOLIDATED}
+
+    private static class ListenerInfo {
+        private final DataSetListener listener;
+        private final boolean consolidate;
+
+        public ListenerInfo(DataSetListener listener, boolean consolidate) {
+            this.listener = listener;
+            this.consolidate = consolidate;
+        }
+
+        @Override
+        public int hashCode() {
+            return listener.hashCode();
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            return o instanceof ListenerInfo && ((ListenerInfo)o).listener == listener;
+        }
+    }
+
+    public static DatasetEventManager getInstance() {
+        return instance;
+    }
+
+    private final Queue<AbstractDatasetChangedEvent> eventsInEDT = new LinkedBlockingQueue<>();
+    private final CopyOnWriteArrayList<ListenerInfo> inEDTListeners = new CopyOnWriteArrayList<>();
+    private final CopyOnWriteArrayList<ListenerInfo> normalListeners = new CopyOnWriteArrayList<>();
+    private final DataSetListener myListener = new DataSetListenerAdapter(this);
+    private final Runnable edtRunnable = new EdtRunnable();
+
+    /**
+     * Constructs a new {@code DatasetEventManager}.
+     */
+    public DatasetEventManager() {
+        MapView.addEditLayerChangeListener(this);
+    }
+
+    /**
+     * Register listener, that will receive events from currently active dataset
+     * @param listener the listener to be registered
+     * @param fireMode If {@link FireMode#IN_EDT} or {@link FireMode#IN_EDT_CONSOLIDATED},
+     * listener will be notified in event dispatch thread instead of thread that caused
+     * the dataset change
+     */
+    public void addDatasetListener(DataSetListener listener, FireMode fireMode) {
+        if (fireMode == FireMode.IN_EDT || fireMode == FireMode.IN_EDT_CONSOLIDATED) {
+            inEDTListeners.addIfAbsent(new ListenerInfo(listener, fireMode == FireMode.IN_EDT_CONSOLIDATED));
+        } else {
+            normalListeners.addIfAbsent(new ListenerInfo(listener, false));
+        }
+    }
+
+    public void removeDatasetListener(DataSetListener listener) {
+        ListenerInfo searchListener = new ListenerInfo(listener, false);
+        inEDTListeners.remove(searchListener);
+        normalListeners.remove(searchListener);
+    }
+
+    @Override
+    public void editLayerChanged(OsmDataLayer oldLayer, OsmDataLayer newLayer) {
+        if (oldLayer != null) {
+            oldLayer.data.removeDataSetListener(myListener);
+        }
+
+        if (newLayer != null) {
+            newLayer.data.addDataSetListener(myListener);
+            processDatasetEvent(new DataChangedEvent(newLayer.data));
+        } else {
+            processDatasetEvent(new DataChangedEvent(null));
+        }
+    }
+
+    private void fireEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {
+        for (ListenerInfo listener: listeners) {
+            if (!listener.consolidate) {
+                event.fire(listener.listener);
+            }
+        }
+    }
+
+    private void fireConsolidatedEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {
+        for (ListenerInfo listener: listeners) {
+            if (listener.consolidate) {
+                event.fire(listener.listener);
+            }
+        }
+    }
+
+    @Override
+    public void processDatasetEvent(AbstractDatasetChangedEvent event) {
+        fireEvents(normalListeners, event);
+        eventsInEDT.add(event);
+        SwingUtilities.invokeLater(edtRunnable);
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/history/HistoryNode.java	(revision 8509)
@@ -50,5 +50,6 @@
      * @since 5440
      */
-    public HistoryNode(long id, long version, boolean visible, User user, long changesetId, Date timestamp, LatLon coords, boolean checkHistoricParams) {
+    public HistoryNode(long id, long version, boolean visible, User user, long changesetId, Date timestamp, LatLon coords,
+            boolean checkHistoricParams) {
         super(id, version, visible, user, changesetId, timestamp, checkHistoricParams);
         setCoords(coords);
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/LineClip.java	(revision 8509)
@@ -38,5 +38,6 @@
             return false;
         }
-        return cohenSutherland(p1.x, p1.y, p2.x, p2.y, clipBounds.x , clipBounds.y, clipBounds.x + clipBounds.width, clipBounds.y + clipBounds.height);
+        return cohenSutherland(p1.x, p1.y, p2.x, p2.y, clipBounds.x , clipBounds.y,
+                clipBounds.x + clipBounds.width, clipBounds.y + clipBounds.height);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java	(revision 8509)
@@ -128,5 +128,6 @@
             activateDefault();
         } else if (!AbstractMapRenderer.class.isAssignableFrom(c)) {
-            Main.error(tr("Can''t activate map renderer class ''{0}'', because it isn''t a subclass of ''{1}''.", rendererClassName, AbstractMapRenderer.class.getName()));
+            Main.error(tr("Can''t activate map renderer class ''{0}'', because it isn''t a subclass of ''{1}''.",
+                    rendererClassName, AbstractMapRenderer.class.getName()));
             Main.error(tr("Activating the standard map renderer instead."));
             activateDefault();
@@ -260,5 +261,6 @@
      * @see AbstractMapRenderer#AbstractMapRenderer(Graphics2D, NavigatableComponent, boolean)
      */
-    public AbstractMapRenderer createActiveRenderer(Graphics2D g, NavigatableComponent viewport, boolean isInactiveMode) throws MapRendererFactoryException{
+    public AbstractMapRenderer createActiveRenderer(Graphics2D g, NavigatableComponent viewport, boolean isInactiveMode)
+            throws MapRendererFactoryException{
         try {
             Constructor<?> c = activeRenderer.getConstructor(new Class<?>[]{Graphics2D.class, NavigatableComponent.class, boolean.class});
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 8509)
@@ -1086,6 +1086,5 @@
         long dx, dy;
 
-        // find half segments that are long enough to draw text on
-        // (don't draw text over the cross hair in the center of each segment)
+        // find half segments that are long enough to draw text on (don't draw text over the cross hair in the center of each segment)
         List<Double> longHalfSegmentStart = new ArrayList<>(); // start point of half segment (as length along the way)
         List<Double> longHalfSegmentEnd = new ArrayList<>(); // end point of half segment (as length along the way)
@@ -1139,6 +1138,5 @@
         if (!longHalfSegmentStart.isEmpty()) {
             if (way.getNodesCount() == 2) {
-                // For 2 node ways, the two half segments are exactly
-                // the same size and distance from the center.
+                // For 2 node ways, the two half segments are exactly the same size and distance from the center.
                 // Prefer the first one for consistency.
                 longHalfsegmentQuality.set(0, longHalfsegmentQuality.get(0) + 0.5);
@@ -1214,6 +1212,5 @@
             }
         }
-        // only works for text that is completely left-to-right or completely
-        // right-to-left, not bi-directional text
+        // only works for text that is completely left-to-right or completely right-to-left, not bi-directional text
         GlyphVector gv = text.font.layoutGlyphVector(frc, chars, 0, chars.length, dirFlag);
 
Index: /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 8509)
@@ -125,5 +125,6 @@
     /**
      * Constructs a new {@code CustomProjection} with given parameters.
-     * @param pref String containing projection parameters (ex: "+proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-8,-5,2,85")
+     * @param pref String containing projection parameters
+     * (ex: "+proj=tmerc +lon_0=-3 +k_0=0.9996 +x_0=500000 +ellps=WGS84 +datum=WGS84 +bounds=-8,-5,2,85")
      */
     public CustomProjection(String pref) {
Index: /trunk/src/org/openstreetmap/josm/data/projection/datum/SevenParameterDatum.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/datum/SevenParameterDatum.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/projection/datum/SevenParameterDatum.java	(revision 8509)
@@ -33,5 +33,6 @@
      * @param s scale change in parts per million
      */
-    public SevenParameterDatum(String name, String proj4Id, Ellipsoid ellps, double dx, double dy, double dz, double rx, double ry, double rz, double s) {
+    public SevenParameterDatum(String name, String proj4Id, Ellipsoid ellps, double dx, double dy, double dz,
+            double rx, double ry, double rz, double s) {
         super(name, proj4Id, ellps);
         this.dx = dx;
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/SwissObliqueMercator.java	(revision 8509)
@@ -23,8 +23,10 @@
  * Projection for the SwissGrid CH1903 / L03, see <a href="https://en.wikipedia.org/wiki/Swiss_coordinate_system">Wikipedia article</a>.<br>
  *
- * Calculations were originally based on <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf">
+ * Calculations were originally based on
+ * <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.12749.DownloadFile.tmp/ch1903wgs84en.pdf">
  * simple formula</a>.<br>
  *
- * August 2010 update to <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf">
+ * August 2010 update to
+ * <a href="http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/switzerland.parsysrelated1.37696.downloadList.97912.DownloadFile.tmp/swissprojectionen.pdf">
  * this formula (rigorous formulas)</a>.
  */
Index: /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/routines/UrlValidator.java	(revision 8509)
@@ -64,4 +64,5 @@
  *  </pre>
  *
+ * @version $Revision: 1640269 $ $Date: 2014-11-18 02:28:56 UTC (Tue, 18 Nov 2014) $
  * @see
  * <a href="http://www.ietf.org/rfc/rfc2396.txt">
@@ -69,5 +70,4 @@
  * </a>
  *
- * @version $Revision: 1640269 $ $Date: 2014-11-18 02:28:56 UTC (Tue, 18 Nov 2014) $
  * @since Validator 1.4
  */
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 8509)
@@ -102,5 +102,6 @@
             // <restriction-value> @ <condition>[;<restriction-value> @ <condition>]
             final List<ConditionalValue> r = new ArrayList<>();
-            final Pattern part = Pattern.compile("([^@\\p{Space}][^@]*?)" + "\\s*@\\s*" + "(\\([^)\\p{Space}][^)]+?\\)|[^();\\p{Space}][^();]*?)\\s*");
+            final Pattern part = Pattern.compile("([^@\\p{Space}][^@]*?)"
+                    + "\\s*@\\s*" + "(\\([^)\\p{Space}][^)]+?\\)|[^();\\p{Space}][^();]*?)\\s*");
             final Matcher m = Pattern.compile("(" + part + ")(;\\s*" + part + ")*").matcher(value);
             if (!m.matches()) {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/Highways.java	(revision 8509)
@@ -102,5 +102,6 @@
     public void visit(Way w) {
         if (w.isUsable()) {
-            if (w.hasKey("highway") && CLASSIFIED_HIGHWAYS.contains(w.get("highway")) && w.hasKey("junction") && "roundabout".equals(w.get("junction"))) {
+            if (w.hasKey("highway") && CLASSIFIED_HIGHWAYS.contains(w.get("highway"))
+                    && w.hasKey("junction") && "roundabout".equals(w.get("junction"))) {
                 testWrongRoundabout(w);
             }
@@ -248,5 +249,6 @@
             String context = value.substring(index+1);
             if (!KNOWN_SOURCE_MAXSPEED_CONTEXTS.contains(context)) {
-                errors.add(new TestError(this, Severity.WARNING, tr("Unknown source:maxspeed context: {0}", context), SOURCE_MAXSPEED_UNKNOWN_CONTEXT, p));
+                errors.add(new TestError(this, Severity.WARNING,
+                        tr("Unknown source:maxspeed context: {0}", context), SOURCE_MAXSPEED_UNKNOWN_CONTEXT, p));
             }
             // TODO: Check coherence of context against maxspeed
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 8509)
@@ -148,11 +148,12 @@
     abstract static class FixCommand {
         /**
-         * Creates the fixing {@link Command} for the given primitive. The {@code matchingSelector} is used to
-         * evaluate placeholders (cf. {@link org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck#insertArguments(Selector, String, OsmPrimitive)}).
+         * Creates the fixing {@link Command} for the given primitive. The {@code matchingSelector} is used to evaluate placeholders
+         * (cf. {@link org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.TagCheck#insertArguments(Selector, String, OsmPrimitive)}).
          */
         abstract Command createCommand(final OsmPrimitive p, final Selector matchingSelector);
 
         private static void checkObject(final Object obj) {
-            CheckParameterUtil.ensureThat(obj instanceof Expression || obj instanceof String, "instance of Exception or String expected, but got " + obj);
+            CheckParameterUtil.ensureThat(obj instanceof Expression || obj instanceof String,
+                    "instance of Exception or String expected, but got " + obj);
         }
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 8509)
@@ -198,5 +198,6 @@
                         addError(r, new TestError(this, Severity.WARNING,
                                 trn("Multipolygon relation should be tagged with area tags and not the outer way",
-                                        "Multipolygon relation should be tagged with area tags and not the outer ways", polygon.getOuterWays().size()),
+                                        "Multipolygon relation should be tagged with area tags and not the outer ways",
+                                        polygon.getOuterWays().size()),
                            NO_STYLE_POLYGON, r));
                     }
@@ -211,5 +212,6 @@
                             l.add(r);
                             l.add(wInner);
-                            addError(r, new TestError(this, Severity.OTHER, tr("With the currently used mappaint style the style for inner way equals the multipolygon style"),
+                            addError(r, new TestError(this, Severity.OTHER,
+                                    tr("With the currently used mappaint style the style for inner way equals the multipolygon style"),
                                     INNER_STYLE_MISMATCH, l, Collections.singletonList(wInner)));
                         }
@@ -263,8 +265,10 @@
                     highlights.add(pdInner.getNodes());
                     if (outside) {
-                        addError(r, new TestError(this, Severity.WARNING, tr("Multipolygon inner way is outside"), INNER_WAY_OUTSIDE, Collections.singletonList(r), highlights));
+                        addError(r, new TestError(this, Severity.WARNING, tr("Multipolygon inner way is outside"),
+                                INNER_WAY_OUTSIDE, Collections.singletonList(r), highlights));
                     } else {
                         highlights.add(outerWay.getNodes());
-                        addError(r, new TestError(this, Severity.WARNING, tr("Intersection between multipolygon ways"), CROSSING_WAYS, Collections.singletonList(r), highlights));
+                        addError(r, new TestError(this, Severity.WARNING, tr("Intersection between multipolygon ways"),
+                                CROSSING_WAYS, Collections.singletonList(r), highlights));
                     }
                 }
@@ -277,5 +281,6 @@
             if (rm.isWay()) {
                 if (!(rm.hasRole("inner", "outer") || !rm.hasRole())) {
-                    addError(r, new TestError(this, Severity.WARNING, tr("No useful role for multipolygon member"), WRONG_MEMBER_ROLE, rm.getMember()));
+                    addError(r, new TestError(this, Severity.WARNING, tr("No useful role for multipolygon member"),
+                            WRONG_MEMBER_ROLE, rm.getMember()));
                 }
             } else {
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java	(revision 8509)
@@ -442,5 +442,6 @@
     public void visit(Way w) {
         if (w.getNodesCount() > 0 // do not consider empty ways
-                && !w.hasKey("addr:interpolation") // ignore addr:interpolation ways as they are not physical features and most of the time very near the associated highway, which is perfectly normal, see #9332
+                && !w.hasKey("addr:interpolation") // ignore addr:interpolation ways as they are not physical features and most of
+                                                   // the time very near the associated highway, which is perfectly normal, see #9332
                 && !w.hasTag("highway", "platform") && !w.hasTag("railway", "platform") // similarly for public transport platforms
                 ) {
Index: /trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java	(revision 8509)
@@ -19,5 +19,6 @@
  * @author imi
  */
-//TODO This class used to be in JOSM but it was removed. MultipleNameVisitor depends on it so I copied it here, but MultipleNameVisitor should be refactored instead of using this class
+//TODO This class used to be in JOSM but it was removed. MultipleNameVisitor depends on it so I copied it here,
+// but MultipleNameVisitor should be refactored instead of using this class
 public class NameVisitor extends AbstractVisitor {
 
Index: /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java	(revision 8509)
@@ -157,5 +157,6 @@
      * @see JOptionPane#ERROR_MESSAGE
      */
-    public static boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title, int optionType, int messageType, int trueOption) throws HeadlessException {
+    public static boolean showConfirmationDialog(String preferenceKey, Component parent, Object message, String title,
+            int optionType, int messageType, int trueOption) throws HeadlessException {
         int ret = getDialogReturnValue(preferenceKey);
         if (isYesOrNo(ret))
Index: /trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 8509)
@@ -34,5 +34,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.OpenFileAction;
-import org.openstreetmap.josm.gui.FileDrop.TransferableObject;
 
 /**
@@ -128,139 +127,5 @@
         if (supportsDnD()) {
             // Make a drop listener
-            dropListener = new DropTargetListener() {
-                @Override
-                public void dragEnter(DropTargetDragEvent evt) {
-                    Main.trace("FileDrop: dragEnter event.");
-
-                    // Is this an acceptable drag event?
-                    if (isDragOk(evt)) {
-                        // If it's a Swing component, set its border
-                        if (c instanceof JComponent) {
-                           JComponent jc = (JComponent) c;
-                            normalBorder = jc.getBorder();
-                            Main.trace("FileDrop: normal border saved.");
-                            jc.setBorder(dragBorder);
-                            Main.trace("FileDrop: drag border set.");
-                        }
-
-                        // Acknowledge that it's okay to enter
-                        evt.acceptDrag(DnDConstants.ACTION_COPY);
-                        Main.trace("FileDrop: event accepted.");
-                    } else {
-                        // Reject the drag event
-                        evt.rejectDrag();
-                        Main.trace("FileDrop: event rejected.");
-                    }
-                }
-
-                @Override
-                public void dragOver(DropTargetDragEvent evt) {
-                    // This is called continually as long as the mouse is over the drag target.
-                }
-
-                @Override
-                public void drop(DropTargetDropEvent evt) {
-                   Main.trace("FileDrop: drop event.");
-                    try {
-                        // Get whatever was dropped
-                        Transferable tr = evt.getTransferable();
-
-                        // Is it a file list?
-                        if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
-
-                            // Say we'll take it.
-                            evt.acceptDrop(DnDConstants.ACTION_COPY);
-                            Main.trace("FileDrop: file list accepted.");
-
-                            // Get a useful list
-                            List<?> fileList = (List<?>)tr.getTransferData(DataFlavor.javaFileListFlavor);
-
-                            // Convert list to array
-                            final File[] files = fileList.toArray(new File[fileList.size()]);
-
-                            // Alert listener to drop.
-                            if (listener != null) {
-                                listener.filesDropped(files);
-                            }
-
-                            // Mark that drop is completed.
-                            evt.getDropTargetContext().dropComplete(true);
-                            Main.trace("FileDrop: drop complete.");
-                        } else {
-                            // this section will check for a reader flavor.
-                            // Thanks, Nathan!
-                            // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-                            DataFlavor[] flavors = tr.getTransferDataFlavors();
-                            boolean handled = false;
-                            for (DataFlavor flavor : flavors) {
-                                if (flavor.isRepresentationClassReader()) {
-                                    // Say we'll take it.
-                                    evt.acceptDrop(DnDConstants.ACTION_COPY);
-                                    Main.trace("FileDrop: reader accepted.");
-
-                                    Reader reader = flavor.getReaderForText(tr);
-
-                                    BufferedReader br = new BufferedReader(reader);
-
-                                    if (listener != null) {
-                                        listener.filesDropped(createFileArray(br));
-                                    }
-
-                                    // Mark that drop is completed.
-                                    evt.getDropTargetContext().dropComplete(true);
-                                    Main.trace("FileDrop: drop complete.");
-                                    handled = true;
-                                    break;
-                                }
-                            }
-                            if (!handled) {
-                                Main.trace("FileDrop: not a file list or reader - abort.");
-                                evt.rejectDrop();
-                            }
-                            // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
-                        }
-                    } catch (IOException | UnsupportedFlavorException e) {
-                        Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:");
-                        Main.error(e);
-                        try {
-                            evt.rejectDrop();
-                        } catch (InvalidDnDOperationException ex) {
-                            // Catch InvalidDnDOperationException to fix #11259
-                            Main.error(ex);
-                        }
-                    } finally {
-                        // If it's a Swing component, reset its border
-                        if (c instanceof JComponent) {
-                           JComponent jc = (JComponent) c;
-                            jc.setBorder(normalBorder);
-                            Main.debug("FileDrop: normal border restored.");
-                        }
-                    }
-                }
-
-                @Override
-                public void dragExit(DropTargetEvent evt) {
-                    Main.debug("FileDrop: dragExit event.");
-                    // If it's a Swing component, reset its border
-                    if (c instanceof JComponent) {
-                        JComponent jc = (JComponent) c;
-                        jc.setBorder(normalBorder);
-                        Main.debug("FileDrop: normal border restored.");
-                    }
-                }
-
-                @Override
-                public void dropActionChanged(DropTargetDragEvent evt) {
-                    Main.debug("FileDrop: dropActionChanged event.");
-                    // Is this an acceptable drag event?
-                    if (isDragOk(evt)) {
-                        evt.acceptDrag(DnDConstants.ACTION_COPY);
-                        Main.debug("FileDrop: event accepted.");
-                    } else {
-                        evt.rejectDrag();
-                        Main.debug("FileDrop: event rejected.");
-                    }
-                }
-            };
+            dropListener = new DropListener(listener, dragBorder, c);
 
             // Make the component (and possibly children) drop targets
@@ -428,4 +293,150 @@
 
     /* ********  I N N E R   I N T E R F A C E   L I S T E N E R  ******** */
+
+    private final class DropListener implements DropTargetListener {
+        private final Listener listener;
+        private final Border dragBorder;
+        private final Component c;
+
+        private DropListener(Listener listener, Border dragBorder, Component c) {
+            this.listener = listener;
+            this.dragBorder = dragBorder;
+            this.c = c;
+        }
+
+        @Override
+        public void dragEnter(DropTargetDragEvent evt) {
+            Main.trace("FileDrop: dragEnter event.");
+
+            // Is this an acceptable drag event?
+            if (isDragOk(evt)) {
+                // If it's a Swing component, set its border
+                if (c instanceof JComponent) {
+                   JComponent jc = (JComponent) c;
+                    normalBorder = jc.getBorder();
+                    Main.trace("FileDrop: normal border saved.");
+                    jc.setBorder(dragBorder);
+                    Main.trace("FileDrop: drag border set.");
+                }
+
+                // Acknowledge that it's okay to enter
+                evt.acceptDrag(DnDConstants.ACTION_COPY);
+                Main.trace("FileDrop: event accepted.");
+            } else {
+                // Reject the drag event
+                evt.rejectDrag();
+                Main.trace("FileDrop: event rejected.");
+            }
+        }
+
+        @Override
+        public void dragOver(DropTargetDragEvent evt) {
+            // This is called continually as long as the mouse is over the drag target.
+        }
+
+        @Override
+        public void drop(DropTargetDropEvent evt) {
+           Main.trace("FileDrop: drop event.");
+            try {
+                // Get whatever was dropped
+                Transferable tr = evt.getTransferable();
+
+                // Is it a file list?
+                if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
+
+                    // Say we'll take it.
+                    evt.acceptDrop(DnDConstants.ACTION_COPY);
+                    Main.trace("FileDrop: file list accepted.");
+
+                    // Get a useful list
+                    List<?> fileList = (List<?>)tr.getTransferData(DataFlavor.javaFileListFlavor);
+
+                    // Convert list to array
+                    final File[] files = fileList.toArray(new File[fileList.size()]);
+
+                    // Alert listener to drop.
+                    if (listener != null) {
+                        listener.filesDropped(files);
+                    }
+
+                    // Mark that drop is completed.
+                    evt.getDropTargetContext().dropComplete(true);
+                    Main.trace("FileDrop: drop complete.");
+                } else {
+                    // this section will check for a reader flavor.
+                    // Thanks, Nathan!
+                    // BEGIN 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
+                    DataFlavor[] flavors = tr.getTransferDataFlavors();
+                    boolean handled = false;
+                    for (DataFlavor flavor : flavors) {
+                        if (flavor.isRepresentationClassReader()) {
+                            // Say we'll take it.
+                            evt.acceptDrop(DnDConstants.ACTION_COPY);
+                            Main.trace("FileDrop: reader accepted.");
+
+                            Reader reader = flavor.getReaderForText(tr);
+
+                            BufferedReader br = new BufferedReader(reader);
+
+                            if (listener != null) {
+                                listener.filesDropped(createFileArray(br));
+                            }
+
+                            // Mark that drop is completed.
+                            evt.getDropTargetContext().dropComplete(true);
+                            Main.trace("FileDrop: drop complete.");
+                            handled = true;
+                            break;
+                        }
+                    }
+                    if (!handled) {
+                        Main.trace("FileDrop: not a file list or reader - abort.");
+                        evt.rejectDrop();
+                    }
+                    // END 2007-09-12 Nathan Blomquist -- Linux (KDE/Gnome) support added.
+                }
+            } catch (IOException | UnsupportedFlavorException e) {
+                Main.warn("FileDrop: "+e.getClass().getSimpleName()+" - abort:");
+                Main.error(e);
+                try {
+                    evt.rejectDrop();
+                } catch (InvalidDnDOperationException ex) {
+                    // Catch InvalidDnDOperationException to fix #11259
+                    Main.error(ex);
+                }
+            } finally {
+                // If it's a Swing component, reset its border
+                if (c instanceof JComponent) {
+                   JComponent jc = (JComponent) c;
+                    jc.setBorder(normalBorder);
+                    Main.debug("FileDrop: normal border restored.");
+                }
+            }
+        }
+
+        @Override
+        public void dragExit(DropTargetEvent evt) {
+            Main.debug("FileDrop: dragExit event.");
+            // If it's a Swing component, reset its border
+            if (c instanceof JComponent) {
+                JComponent jc = (JComponent) c;
+                jc.setBorder(normalBorder);
+                Main.debug("FileDrop: normal border restored.");
+            }
+        }
+
+        @Override
+        public void dropActionChanged(DropTargetDragEvent evt) {
+            Main.debug("FileDrop: dropActionChanged event.");
+            // Is this an acceptable drag event?
+            if (isDragOk(evt)) {
+                evt.acceptDrag(DnDConstants.ACTION_COPY);
+                Main.debug("FileDrop: event accepted.");
+            } else {
+                evt.rejectDrag();
+                Main.debug("FileDrop: event rejected.");
+            }
+        }
+    }
 
     /**
@@ -512,5 +523,5 @@
          */
         public static final DataFlavor DATA_FLAVOR =
-            new DataFlavor(FileDrop.TransferableObject.class, MIME_TYPE);
+            new DataFlavor(TransferableObject.class, MIME_TYPE);
 
         private Fetcher fetcher;
Index: /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 8509)
@@ -335,5 +335,6 @@
      * @param helpTopic the help topic. Can be null.
      */
-    public static void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title, final int messageType, final String helpTopic)  {
+    public static void showMessageDialogInEDT(final Component parentComponent, final Object msg, final String title,
+            final int messageType, final String helpTopic)  {
         GuiHelper.runInEDT(new Runnable() {
             @Override
Index: /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java	(revision 8509)
@@ -106,5 +106,6 @@
         CheckParameterUtil.ensureParameterNotNull(userName, "userName");
         if (userName.trim().isEmpty())
-            throw new IllegalArgumentException(MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
+            throw new IllegalArgumentException(
+                    MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));
         this.userName = userName;
         userInfo = null;
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 8509)
@@ -482,5 +482,6 @@
             try {
                 // Check for insecure certificates to remove.
-                // This is Windows-dependant code but it can't go to preStartupHook (need i18n) neither startupHook (need to be called before remote control)
+                // This is Windows-dependant code but it can't go to preStartupHook (need i18n)
+                // neither startupHook (need to be called before remote control)
                 PlatformHookWindows.removeInsecureCertificates();
             } catch (NoSuchAlgorithmException | CertificateException | KeyStoreException | IOException e) {
@@ -498,5 +499,6 @@
 
         if (Main.pref.getBoolean("debug.edt-checker.enable", Version.getInstance().isLocalBuild())) {
-            // Repaint manager is registered so late for a reason - there is lots of violation during startup process but they don't seem to break anything and are difficult to fix
+            // Repaint manager is registered so late for a reason - there is lots of violation during startup process
+            // but they don't seem to break anything and are difficult to fix
             info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console");
             RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager());
Index: /trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 8509)
@@ -702,5 +702,7 @@
             modeChanged = newMapMode != mapMode;
             if (newMapMode != null) {
-                selectMapMode(newMapMode, newLayer); // it would be nice to select first supported mode when layer is first selected, but it don't work well with for example editgpx layer
+                // it would be nice to select first supported mode when layer is first selected,
+                // but it don't work well with for example editgpx layer
+                selectMapMode(newMapMode, newLayer);
             } else if (mapMode != null) {
                 mapMode.exitMode(); // if new mode is null - simply exit from previous mode
@@ -726,5 +728,4 @@
         });
     }
-
 
     private MapMode getLastMapMode(Layer newLayer) {
Index: /trunk/src/org/openstreetmap/josm/gui/MapMover.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/MapMover.java	(revision 8509)
@@ -119,10 +119,12 @@
             if (!Main.isPlatformOsx()) {
                 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
-                    Shortcut.registerShortcut("view:zoominalternate", tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.CTRL).getKeyStroke(),
+                    Shortcut.registerShortcut("view:zoominalternate",
+                            tr("Map: {0}", tr("Zoom in")), KeyEvent.VK_COMMA, Shortcut.CTRL).getKeyStroke(),
                     "MapMover.Zoomer.in");
                 contentPane.getActionMap().put("MapMover.Zoomer.in", new ZoomerAction(","));
 
                 contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
-                    Shortcut.registerShortcut("view:zoomoutalternate", tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.CTRL).getKeyStroke(),
+                    Shortcut.registerShortcut("view:zoomoutalternate",
+                            tr("Map: {0}", tr("Zoom out")), KeyEvent.VK_PERIOD, Shortcut.CTRL).getKeyStroke(),
                     "MapMover.Zoomer.out");
                 contentPane.getActionMap().put("MapMover.Zoomer.out", new ZoomerAction("."));
Index: /trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 8509)
@@ -228,10 +228,107 @@
 
     /**
-     * The collector class that waits for notification and then update
-     * the display objects.
+     * The collector class that waits for notification and then update the display objects.
      *
      * @author imi
      */
     private final class Collector implements Runnable {
+        private final class CollectorWorker implements Runnable {
+            private final MouseState ms;
+
+            private CollectorWorker(MouseState ms) {
+                this.ms = ms;
+            }
+
+            @Override
+            public void run() {
+                // Freeze display when holding down CTRL
+                if ((ms.modifiers & MouseEvent.CTRL_DOWN_MASK) != 0) {
+                    // update the information popup's labels though, because the selection might have changed from the outside
+                    popupUpdateLabels();
+                    return;
+                }
+
+                // This try/catch is a hack to stop the flooding bug reports about this.
+                // The exception needed to handle with in the first place, means that this
+                // access to the data need to be restarted, if the main thread modifies the data.
+                DataSet ds = null;
+                // The popup != null check is required because a left-click produces several events as well,
+                // which would make this variable true. Of course we only want the popup to show
+                // if the middle mouse button has been pressed in the first place
+                boolean mouseNotMoved = oldMousePos != null
+                        && oldMousePos.equals(ms.mousePos);
+                boolean isAtOldPosition = mouseNotMoved && popup != null;
+                boolean middleMouseDown = (ms.modifiers & MouseEvent.BUTTON2_DOWN_MASK) != 0;
+                try {
+                    ds = mv.getCurrentDataSet();
+                    if (ds != null) {
+                        // This is not perfect, if current dataset was changed during execution, the lock would be useless
+                        if(isAtOldPosition && middleMouseDown) {
+                            // Write lock is necessary when selecting in popupCycleSelection
+                            // locks can not be upgraded -> if do read lock here and write lock later
+                            // (in OsmPrimitive.updateFlags) then always occurs deadlock (#5814)
+                            ds.beginUpdate();
+                        } else {
+                            ds.getReadLock().lock();
+                        }
+                    }
+
+                    // Set the text label in the bottom status bar
+                    // "if mouse moved only" was added to stop heap growing
+                    if (!mouseNotMoved) {
+                        statusBarElementUpdate(ms);
+                    }
+
+                    // Popup Information
+                    // display them if the middle mouse button is pressed and keep them until the mouse is moved
+                    if (middleMouseDown || isAtOldPosition) {
+                        Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, OsmPrimitive.isUsablePredicate);
+
+                        final JPanel c = new JPanel(new GridBagLayout());
+                        final JLabel lbl = new JLabel(
+                                "<html>"+tr("Middle click again to cycle through.<br>"+
+                                        "Hold CTRL to select directly from this list with the mouse.<hr>")+"</html>",
+                                        null,
+                                        JLabel.HORIZONTAL
+                                );
+                        lbl.setHorizontalAlignment(JLabel.LEFT);
+                        c.add(lbl, GBC.eol().insets(2, 0, 2, 0));
+
+                        // Only cycle if the mouse has not been moved and the middle mouse button has been pressed at least
+                        // twice (the reason for this is the popup != null check for isAtOldPosition, see above.
+                        // This is a nice side effect though, because it does not change selection of the first middle click)
+                        if (isAtOldPosition && middleMouseDown) {
+                            // Hand down mouse modifiers so the SHIFT mod can be handled correctly (see function)
+                            popupCycleSelection(osms, ms.modifiers);
+                        }
+
+                        // These labels may need to be updated from the outside so collect them
+                        List<JLabel> lbls = new ArrayList<>(osms.size());
+                        for (final OsmPrimitive osm : osms) {
+                            JLabel l = popupBuildPrimitiveLabels(osm);
+                            lbls.add(l);
+                            c.add(l, GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 2));
+                        }
+
+                        popupShowPopup(popupCreatePopup(c, ms), lbls);
+                    } else {
+                        popupHidePopup();
+                    }
+
+                    oldMousePos = ms.mousePos;
+                } catch (ConcurrentModificationException x) {
+                    Main.warn(x);
+                } finally {
+                    if (ds != null) {
+                        if(isAtOldPosition && middleMouseDown) {
+                            ds.endUpdate();
+                        } else {
+                            ds.getReadLock().unlock();
+                        }
+                    }
+                }
+            }
+        }
+
         /**
          * the mouse position of the previous iteration. This is used to show
@@ -285,99 +382,5 @@
 
                     try {
-                        EventQueue.invokeAndWait(new Runnable() {
-
-                            @Override
-                            public void run() {
-                                // Freeze display when holding down CTRL
-                                if ((ms.modifiers & MouseEvent.CTRL_DOWN_MASK) != 0) {
-                                    // update the information popup's labels though, because
-                                    // the selection might have changed from the outside
-                                    popupUpdateLabels();
-                                    return;
-                                }
-
-                                // This try/catch is a hack to stop the flooding bug reports about this.
-                                // The exception needed to handle with in the first place, means that this
-                                // access to the data need to be restarted, if the main thread modifies
-                                // the data.
-                                DataSet ds = null;
-                                // The popup != null check is required because a left-click
-                                // produces several events as well, which would make this
-                                // variable true. Of course we only want the popup to show
-                                // if the middle mouse button has been pressed in the first place
-                                boolean mouseNotMoved = oldMousePos != null
-                                        && oldMousePos.equals(ms.mousePos);
-                                boolean isAtOldPosition = mouseNotMoved && popup != null;
-                                boolean middleMouseDown = (ms.modifiers & MouseEvent.BUTTON2_DOWN_MASK) != 0;
-                                try {
-                                    ds = mv.getCurrentDataSet();
-                                    if (ds != null) {
-                                        // This is not perfect, if current dataset was changed during execution, the lock would be useless
-                                        if(isAtOldPosition && middleMouseDown) {
-                                            // Write lock is necessary when selecting in popupCycleSelection
-                                            // locks can not be upgraded -> if do read lock here and write lock later (in OsmPrimitive.updateFlags)
-                                            // then always occurs deadlock (#5814)
-                                            ds.beginUpdate();
-                                        } else {
-                                            ds.getReadLock().lock();
-                                        }
-                                    }
-
-                                    // Set the text label in the bottom status bar
-                                    // "if mouse moved only" was added to stop heap growing
-                                    if (!mouseNotMoved) {
-                                        statusBarElementUpdate(ms);
-                                    }
-
-                                    // Popup Information
-                                    // display them if the middle mouse button is pressed and keep them until the mouse is moved
-                                    if (middleMouseDown || isAtOldPosition) {
-                                        Collection<OsmPrimitive> osms = mv.getAllNearest(ms.mousePos, OsmPrimitive.isUsablePredicate);
-
-                                        final JPanel c = new JPanel(new GridBagLayout());
-                                        final JLabel lbl = new JLabel(
-                                                "<html>"+tr("Middle click again to cycle through.<br>"+
-                                                        "Hold CTRL to select directly from this list with the mouse.<hr>")+"</html>",
-                                                        null,
-                                                        JLabel.HORIZONTAL
-                                                );
-                                        lbl.setHorizontalAlignment(JLabel.LEFT);
-                                        c.add(lbl, GBC.eol().insets(2, 0, 2, 0));
-
-                                        // Only cycle if the mouse has not been moved and the middle mouse button has been pressed at least
-                                        // twice (the reason for this is the popup != null check for isAtOldPosition, see above.
-                                        // This is a nice side effect though, because it does not change selection of the first middle click)
-                                        if (isAtOldPosition && middleMouseDown) {
-                                            // Hand down mouse modifiers so the SHIFT mod can be handled correctly (see function)
-                                            popupCycleSelection(osms, ms.modifiers);
-                                        }
-
-                                        // These labels may need to be updated from the outside so collect them
-                                        List<JLabel> lbls = new ArrayList<>(osms.size());
-                                        for (final OsmPrimitive osm : osms) {
-                                            JLabel l = popupBuildPrimitiveLabels(osm);
-                                            lbls.add(l);
-                                            c.add(l, GBC.eol().fill(GBC.HORIZONTAL).insets(2, 0, 2, 2));
-                                        }
-
-                                        popupShowPopup(popupCreatePopup(c, ms), lbls);
-                                    } else {
-                                        popupHidePopup();
-                                    }
-
-                                    oldMousePos = ms.mousePos;
-                                } catch (ConcurrentModificationException x) {
-                                    Main.warn(x);
-                                } finally {
-                                    if (ds != null) {
-                                        if(isAtOldPosition && middleMouseDown) {
-                                            ds.endUpdate();
-                                        } else {
-                                            ds.getReadLock().unlock();
-                                        }
-                                    }
-                                }
-                            }
-                        });
+                        EventQueue.invokeAndWait(new CollectorWorker(ms));
                     } catch (InterruptedException e) {
                         // Occurs frequently during JOSM shutdown, log set to trace only
Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 8509)
@@ -76,5 +76,6 @@
  * @author imi
  */
-public class MapView extends NavigatableComponent implements PropertyChangeListener, PreferenceChangedListener, OsmDataLayer.LayerStateChangeListener {
+public class MapView extends NavigatableComponent
+implements PropertyChangeListener, PreferenceChangedListener, OsmDataLayer.LayerStateChangeListener {
 
     /**
@@ -599,5 +600,6 @@
 
         if (!canUseBuffer || nonChangedLayersBuffer == null) {
-            if (null == nonChangedLayersBuffer || nonChangedLayersBuffer.getWidth() != getWidth() || nonChangedLayersBuffer.getHeight() != getHeight()) {
+            if (null == nonChangedLayersBuffer
+                    || nonChangedLayersBuffer.getWidth() != getWidth() || nonChangedLayersBuffer.getHeight() != getHeight()) {
                 nonChangedLayersBuffer = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_3BYTE_BGR);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/OsmPrimitivRenderer.java	(revision 8509)
@@ -43,5 +43,6 @@
      */
     @Override
-    public Component getListCellRendererComponent(JList<? extends OsmPrimitive> list, OsmPrimitive value, int index, boolean isSelected, boolean cellHasFocus) {
+    public Component getListCellRendererComponent(JList<? extends OsmPrimitive> list, OsmPrimitive value, int index,
+            boolean isSelected, boolean cellHasFocus) {
         Component def = defaultListCellRenderer.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
         return renderer(def, value);
Index: /trunk/src/org/openstreetmap/josm/gui/SplashScreen.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/SplashScreen.java	(revision 8509)
@@ -240,4 +240,7 @@
         }
 
+        /**
+         * @deprecated Use {@link #finishTask(String)} instead.
+         */
         @Override
         @Deprecated
Index: /trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/bbox/SourceButton.java	(revision 8509)
@@ -102,9 +102,11 @@
 
                 g.setColor(new Color(0, 0, 139, 179));
-                g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(), sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING, 10, 10);
+                g.fillRoundRect(0, 0, barWidth + shrinkImage.getIconWidth(),
+                        sources.length * LAYER_HEIGHT + TOP_PADDING + BOTTOM_PADDING, 10, 10);
                 for (int i=0; i<sources.length; i++) {
                     g.setColor(Color.WHITE);
                     g.fillOval(LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + 6, radioButtonSize, radioButtonSize);
-                    g.drawString(sources[i].getName(), LEFT_PADDING + radioButtonSize + LEFT_PADDING, TOP_PADDING + i * LAYER_HEIGHT + g.getFontMetrics().getHeight());
+                    g.drawString(sources[i].getName(), LEFT_PADDING + radioButtonSize + LEFT_PADDING,
+                            TOP_PADDING + i * LAYER_HEIGHT + g.getFontMetrics().getHeight());
                     if (currentMap == i) {
                         g.setColor(Color.BLACK);
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ConflictResolver.java	(revision 8509)
@@ -178,5 +178,6 @@
             } else {
                 tabbedPane.setTitleAt(1, trn("Tags({0} conflict)", "Tags({0} conflicts)", newValue, newValue));
-                tabbedPane.setToolTipTextAt(1, trn("{0} pending tag conflict to be resolved", "{0} pending tag conflicts to be resolved", newValue, newValue));
+                tabbedPane.setToolTipTextAt(1,
+                        trn("{0} pending tag conflict to be resolved", "{0} pending tag conflicts to be resolved", newValue, newValue));
                 tabbedPane.setIconAt(1, mergeIncomplete);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java	(revision 8509)
@@ -276,5 +276,6 @@
         gc.gridy = 0;
         lblMergedVersion = new JLabel(tr("Merged version"));
-        lblMergedVersion.setToolTipText(tr("List of merged elements. They will replace the list of my elements when the merge decisions are applied."));
+        lblMergedVersion.setToolTipText(
+                tr("List of merged elements. They will replace the list of my elements when the merge decisions are applied."));
         add(lblMergedVersion, gc);
 
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/pair/PairTable.java	(revision 8509)
@@ -16,5 +16,6 @@
     private final transient ListMergeModel<? extends PrimitiveId> model;
 
-    public PairTable(String name, ListMergeModel<? extends PrimitiveId> model, OsmPrimitivesTableModel dm, TableColumnModel cm, ListSelectionModel sm) {
+    public PairTable(String name, ListMergeModel<? extends PrimitiveId> model,
+            OsmPrimitivesTableModel dm, TableColumnModel cm, ListSelectionModel sm) {
         super(dm, cm, sm);
         this.model = model;
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 8509)
@@ -86,5 +86,6 @@
         gc.gridy = 0;
         JLabel lblMergedVersion = new JLabel(tr("Merged version"));
-        lblMergedVersion.setToolTipText(tr("Properties in the merged element. They will replace properties in my elements when merge decisions are applied."));
+        lblMergedVersion.setToolTipText(
+                tr("Properties in the merged element. They will replace properties in my elements when merge decisions are applied."));
         add(lblMergedVersion, gc);
 
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 8509)
@@ -319,5 +319,6 @@
 
             final Integer keepResolutions = numberOfKeepResolutions.get(r);
-            final Collection<Relation> resolvedRelations = Utils.firstNonNull(resolvedRelationsPerPrimitive.get(p), Collections.<Relation>emptyList());
+            final Collection<Relation> resolvedRelations = Utils.firstNonNull(
+                    resolvedRelationsPerPrimitive.get(p), Collections.<Relation>emptyList());
             if (keepResolutions <= Utils.filter(resolvedRelations, Predicates.equalTo(r)).size()) {
                 // old relation contains one primitive more often than the current resolution => keep the current member
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueCellRenderer.java	(revision 8509)
@@ -117,8 +117,10 @@
             break;
         case KEEP_ONE:
-            toolTipText = tr("Value ''{0}'' is going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
+            toolTipText = tr("Value ''{0}'' is going to be applied for key ''{1}''",
+                    decision.getChosenValue(), decision.getKey());
             break;
         case SUM_ALL_NUMERIC:
-            toolTipText = tr("All numeric values sumed as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
+            toolTipText = tr("All numeric values sumed as ''{0}'' are going to be applied for key ''{1}''",
+                    decision.getChosenValue(), decision.getKey());
             break;
         case KEEP_NONE:
@@ -126,5 +128,6 @@
             break;
         case KEEP_ALL:
-            toolTipText = tr("All values joined as ''{0}'' are going to be applied for key ''{1}''", decision.getChosenValue(), decision.getKey());
+            toolTipText = tr("All values joined as ''{0}'' are going to be applied for key ''{1}''",
+                    decision.getChosenValue(), decision.getKey());
             break;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java	(revision 8509)
@@ -57,5 +57,6 @@
             throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' must not be empty.", "tags"));
         if (tags.getKeys().size() != 1)
-            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.", "tags", tags.getKeys().size()));
+            throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.",
+                    "tags", tags.getKeys().size()));
         this.tags = tags;
         autoDecide();
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 8509)
@@ -161,5 +161,6 @@
      * @param targetStatistics histogram of paste targets, number of primitives of each type in the paste target
      */
-    public void populate(TagCollection tagsForAllPrimitives, Map<OsmPrimitiveType, Integer> sourceStatistics, Map<OsmPrimitiveType,Integer> targetStatistics) {
+    public void populate(TagCollection tagsForAllPrimitives, Map<OsmPrimitiveType, Integer> sourceStatistics,
+            Map<OsmPrimitiveType,Integer> targetStatistics) {
         mode = Mode.RESOLVING_ONE_TAGCOLLECTION_ONLY;
         tagsForAllPrimitives = tagsForAllPrimitives == null? new TagCollection() : tagsForAllPrimitives;
@@ -203,5 +204,6 @@
      * @param targetStatistics histogram of paste targets, number of primitives of each type in the paste target
      */
-    public void populate(TagCollection tagsForNodes, TagCollection tagsForWays, TagCollection tagsForRelations, Map<OsmPrimitiveType,Integer> sourceStatistics, Map<OsmPrimitiveType, Integer> targetStatistics) {
+    public void populate(TagCollection tagsForNodes, TagCollection tagsForWays, TagCollection tagsForRelations,
+            Map<OsmPrimitiveType,Integer> sourceStatistics, Map<OsmPrimitiveType, Integer> targetStatistics) {
         tagsForNodes = (tagsForNodes == null) ? new TagCollection() : tagsForNodes;
         tagsForWays = (tagsForWays == null) ? new TagCollection() : tagsForWays;
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java	(revision 8509)
@@ -22,5 +22,6 @@
         RelationMember member = relation.getMember(pos);
         if (member == null)
-            throw new IndexOutOfBoundsException(tr("Position {0} is out of range. Current number of members is {1}.", pos, relation.getMembersCount()));
+            throw new IndexOutOfBoundsException(
+                    tr("Position {0} is out of range. Current number of members is {1}.", pos, relation.getMembersCount()));
         this.relation = relation;
         this.pos  = pos;
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecisionRenderer.java	(revision 8509)
@@ -14,5 +14,6 @@
 import org.openstreetmap.josm.gui.widgets.JosmComboBox;
 
-public class RelationMemberConflictDecisionRenderer extends JLabel implements TableCellRenderer, ListCellRenderer<RelationMemberConflictDecisionType> {
+public class RelationMemberConflictDecisionRenderer extends JLabel
+implements TableCellRenderer, ListCellRenderer<RelationMemberConflictDecisionType> {
 
     private JosmComboBox<RelationMemberConflictDecisionType> cbDecisionTypes;
Index: /trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java	(revision 8509)
@@ -264,5 +264,6 @@
             values.remove("");
             if (values.size() == 1) {
-                // TODO: Do not suggest to keep the single value in order to avoid long highways to become tunnels+bridges+... (only if both primitives are tagged)
+                // TODO: Do not suggest to keep the single value in order to avoid long highways to become tunnels+bridges+...
+                // (only if both primitives are tagged)
                 decision.keepOne(values.get(0));
             } else {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java	(revision 8509)
@@ -138,5 +138,6 @@
     private static class CommandCellRenderer extends DefaultTreeCellRenderer {
         @Override
-        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row,
+                boolean hasFocus) {
             super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
             DefaultMutableTreeNode v = (DefaultMutableTreeNode)value;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 8509)
@@ -110,9 +110,12 @@
             msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>1 relation</strong>.</html>");
         } else if (numObjectsToDelete == 1 && numParentRelations > 1) {
-            msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>", numParentRelations);
+            msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>",
+                    numParentRelations);
         } else if (numObjectsToDelete > 1 && numParentRelations == 1) {
-            msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>", numParentRelations);
+            msg = tr("<html>Please confirm to remove <strong>1 object</strong> from <strong>{0} relations</strong>.</html>",
+                    numParentRelations);
         } else {
-            msg = tr("<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>", numObjectsToDelete,numParentRelations);
+            msg = tr("<html>Please confirm to remove <strong>{0} objects</strong> from <strong>{1} relations</strong>.</html>",
+                    numObjectsToDelete,numParentRelations);
         }
         htmlPanel.getEditorPane().setText(msg);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 8509)
@@ -635,5 +635,6 @@
      */
 
-    public final class ActivateLayerAction extends AbstractAction implements IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction{
+    public final class ActivateLayerAction extends AbstractAction
+    implements IEnabledStateUpdating, MapView.LayerChangeListener, MultikeyShortcutAction{
         private transient Layer layer;
         private transient Shortcut multikeyShortcut;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/OsmIdSelectionDialog.java	(revision 8509)
@@ -162,5 +162,6 @@
      */
     protected void restorePrimitivesHistory(HistoryComboBox cbHistory) {
-        java.util.List<String> cmtHistory = new LinkedList<>(Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
+        java.util.List<String> cmtHistory = new LinkedList<>(
+                Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
         // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         Collections.reverse(cmtHistory);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 8509)
@@ -271,5 +271,7 @@
             model.setSelectedRelations(relations);
             Integer i = model.getVisibleRelationIndex(relations.iterator().next());
-            if (i != null) { // Not all relations have to be in the list (for example when the relation list is hidden, it's not updated with new relations)
+            if (i != null) {
+                // Not all relations have to be in the list
+                // (for example when the relation list is hidden, it's not updated with new relations)
                 displaylist.scrollRectToVisible(displaylist.getCellBounds(i, i));
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java	(revision 8509)
@@ -471,5 +471,6 @@
      *
      */
-    private static class SelectionListModel extends AbstractListModel<OsmPrimitive> implements EditLayerChangeListener, SelectionChangedListener, DataSetListener{
+    private static class SelectionListModel extends AbstractListModel<OsmPrimitive>
+    implements EditLayerChangeListener, SelectionChangedListener, DataSetListener {
 
         private static final int SELECTION_HISTORY_SIZE = 10;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 8509)
@@ -223,5 +223,6 @@
      * @param prefClass the preferences settings class, or null if not applicable
      */
-    public ToggleDialog(String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight, boolean defShow, Class<? extends PreferenceSetting> prefClass) {
+    public ToggleDialog(String name, String iconName, String tooltip, Shortcut shortcut, int preferredHeight, boolean defShow,
+            Class<? extends PreferenceSetting> prefClass) {
         super(new BorderLayout());
         this.preferencePrefix = iconName;
@@ -867,5 +868,6 @@
 
     @SafeVarargs
-    protected final Component createLayout(Component data, boolean scroll, Collection<SideButton> firstButtons, Collection<SideButton>... nextButtons) {
+    protected final Component createLayout(Component data, boolean scroll, Collection<SideButton> firstButtons,
+            Collection<SideButton>... nextButtons) {
         if (scroll) {
             data = new JScrollPane(data);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java	(revision 8509)
@@ -69,5 +69,6 @@
         super(tr("Downloading changeset content"), false /* don't ignore exceptions */);
         if (changesetId <= 0)
-            throw new IllegalArgumentException(MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
+            throw new IllegalArgumentException(
+                    MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
         init(Collections.singleton(changesetId));
     }
@@ -95,5 +96,6 @@
         super(parent, tr("Downloading changeset content"), false /* don't ignore exceptions */);
         if (changesetId <= 0)
-            throw new IllegalArgumentException(MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
+            throw new IllegalArgumentException(
+                    MessageFormat.format("Expected integer value > 0 for parameter ''{0}'', got ''{1}''", "changesetId", changesetId));
         init(Collections.singleton(changesetId));
     }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetListCellRenderer.java	(revision 8509)
@@ -51,5 +51,6 @@
 
     @Override
-    public Component getListCellRendererComponent(JList<? extends Changeset> list, Changeset cs, int index, boolean isSelected, boolean cellHasFocus) {
+    public Component getListCellRendererComponent(JList<? extends Changeset> list, Changeset cs, int index, boolean isSelected,
+            boolean cellHasFocus) {
         renderColors(isSelected);
         renderLabel(cs);
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/BasicChangesetQueryPanel.java	(revision 8509)
@@ -104,5 +104,6 @@
         gc.weightx = 1.0;
         pnl.add(cbMyChangesetsOnly = new JCheckBox(tr("Download my changesets only")), gc);
-        cbMyChangesetsOnly.setToolTipText(tr("<html>Select to restrict the query to your changesets only.<br>Unselect to include all changesets in the query.</html>"));
+        cbMyChangesetsOnly.setToolTipText(
+                tr("<html>Select to restrict the query to your changesets only.<br>Unselect to include all changesets in the query.</html>"));
 
         // grab remaining space
@@ -191,5 +192,6 @@
                 q = BasicQuery.valueOf(BasicQuery.class, value);
             } catch(IllegalArgumentException e) {
-                Main.warn(tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.","changeset-query.basic.query", value));
+                Main.warn(tr("Unexpected value for preference ''{0}'', got ''{1}''. Resetting to default query.",
+                        "changeset-query.basic.query", value));
                 q = BasicQuery.MOST_RECENT_CHANGESETS;
             }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 8509)
@@ -117,5 +117,6 @@
  * @author imi
  */
-public class PropertiesDialog extends ToggleDialog implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetListenerAdapter.Listener {
+public class PropertiesDialog extends ToggleDialog
+implements SelectionChangedListener, MapView.EditLayerChangeListener, DataSetListenerAdapter.Listener {
 
     /**
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 8509)
@@ -685,6 +685,8 @@
             int count = 1;
             // We store the maximum number (9) of recent tags to allow dynamic change of number of tags shown in the preferences.
-            // This implies to iterate in descending order, as the oldest elements will only be removed after we reach the maximum number and not the number of tags to show.
-            // However, as Set does not allow to iterate in descending order, we need to copy its elements into a List we can access in reverse order.
+            // This implies to iterate in descending order, as the oldest elements will only be removed after we reach the maximum
+            // number and not the number of tags to show.
+            // However, as Set does not allow to iterate in descending order, we need to copy its elements into a List we can access
+            // in reverse order.
             List<Tag> tags = new LinkedList<>(recentTags.keySet());
             for (int i = tags.size()-1; i >= 0 && count <= tagsToShow; i--, count++) {
@@ -704,5 +706,6 @@
                     }
                 };
-                Shortcut scShift = Shortcut.registerShortcut(actionShortcutShiftKey, tr("Apply recent tag {0}", count), KeyEvent.VK_0+count, Shortcut.CTRL_SHIFT);
+                Shortcut scShift = Shortcut.registerShortcut(actionShortcutShiftKey, tr("Apply recent tag {0}", count),
+                        KeyEvent.VK_0+count, Shortcut.CTRL_SHIFT);
                 final JosmAction actionShift = new JosmAction(actionShortcutShiftKey, null, tr("Use this tag again"), scShift, false) {
                     @Override
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java	(revision 8509)
@@ -77,5 +77,6 @@
             for (Relation relation: relations) {
                 i++;
-                getProgressMonitor().setCustomText(tr("({0}/{1}): Downloading relation ''{2}''...", i,relations.size(),relation.getDisplayName(DefaultNameFormatter.getInstance())));
+                getProgressMonitor().setCustomText(tr("({0}/{1}): Downloading relation ''{2}''...", i, relations.size(),
+                        relation.getDisplayName(DefaultNameFormatter.getInstance())));
                 synchronized (this) {
                     if (canceled) return;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 8509)
@@ -997,5 +997,6 @@
 
             if (enabled) {
-                putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to {0} objects in the current selection",memberTableModel.getChildPrimitives(getLayer().data.getSelected()).size()));
+                putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to {0} objects in the current selection",
+                        memberTableModel.getChildPrimitives(getLayer().data.getSelected()).size()));
             } else {
                 putValue(SHORT_DESCRIPTION, tr("Select relation members which refer to objects in the current selection"));
@@ -1012,5 +1013,4 @@
         public void tableChanged(TableModelEvent e) {
             updateEnabledState();
-
         }
     }
@@ -1762,5 +1762,6 @@
 
                 if (hasNewInOtherLayer) {
-                    JOptionPane.showMessageDialog(Main.parent, tr("Members from paste buffer cannot be added because they are not included in current layer"));
+                    JOptionPane.showMessageDialog(Main.parent,
+                            tr("Members from paste buffer cannot be added because they are not included in current layer"));
                     return;
                 }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTableModel.java	(revision 8509)
@@ -44,5 +44,6 @@
 import org.openstreetmap.josm.gui.widgets.OsmPrimitivesTableModel;
 
-public class MemberTableModel extends AbstractTableModel implements TableModelListener, SelectionChangedListener, DataSetListener, OsmPrimitivesTableModel {
+public class MemberTableModel extends AbstractTableModel
+implements TableModelListener, SelectionChangedListener, DataSetListener, OsmPrimitivesTableModel {
 
     /**
@@ -409,5 +410,6 @@
 
     private void addMembersAtIndex(List<? extends OsmPrimitive> primitives, int index) {
-        final Collection<TaggingPreset> presets = TaggingPreset.getMatchingPresets(EnumSet.of(TaggingPresetType.RELATION), presetHandler.getSelection().iterator().next().getKeys(), false);
+        final Collection<TaggingPreset> presets = TaggingPreset.getMatchingPresets(EnumSet.of(TaggingPresetType.RELATION),
+                presetHandler.getSelection().iterator().next().getKeys(), false);
         if (primitives == null)
             return;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTreeCellRenderer.java	(revision 8509)
@@ -66,5 +66,6 @@
             boolean leaf, int row, boolean hasFocus) {
 
-        // Hackish fix for #7056 - if name template for duplicated relation contains tags from parent, template will fail because getReffers doesn't work on primitives not yet in dataset
+        // Hackish fix for #7056 - if name template for duplicated relation contains tags from parent,
+        // template will fail because getReffers doesn't work on primitives not yet in dataset
         if (!tree.isRootVisible() && tree.getModel().getRoot() == value)
             return this;
@@ -75,4 +76,3 @@
         return this;
     }
-
 }
Index: /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BookmarkList.java	(revision 8509)
@@ -225,5 +225,6 @@
 
         @Override
-        public Component getListCellRendererComponent(JList<? extends Bookmark> list, Bookmark value, int index, boolean isSelected, boolean cellHasFocus) {
+        public Component getListCellRendererComponent(JList<? extends Bookmark> list, Bookmark value, int index, boolean isSelected,
+                boolean cellHasFocus) {
             renderColor(isSelected);
             setText(value.getName());
Index: /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 8509)
@@ -155,5 +155,6 @@
 
         cbStartup = new JCheckBox(tr("Open this dialog on startup"));
-        cbStartup.setToolTipText(tr("<html>Autostart ''Download from OSM'' dialog every time JOSM is started.<br>You can open it manually from File menu or toolbar.</html>"));
+        cbStartup.setToolTipText(
+                tr("<html>Autostart ''Download from OSM'' dialog every time JOSM is started.<br>You can open it manually from File menu or toolbar.</html>"));
         cbStartup.addActionListener(new ActionListener() {
             @Override
@@ -168,5 +169,6 @@
 
         if (!ExpertToggleAction.isExpert()) {
-            JLabel infoLabel  = new JLabel(tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
+            JLabel infoLabel  = new JLabel(
+                    tr("Use left click&drag to select area, arrows or right mouse button to scroll map, wheel or +/- to zoom."));
             pnl.add(infoLabel,GBC.eol().anchor(GBC.SOUTH).insets(0,0,0,0));
         }
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java	(revision 8509)
@@ -300,8 +300,10 @@
             throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive."));
         if (reference.getId() != history.getId())
-            throw new IllegalArgumentException(tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(),  history.getId()));
+            throw new IllegalArgumentException(
+                    tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(),  history.getId()));
         HistoryOsmPrimitive primitive = history.getByVersion(reference.getVersion());
         if (primitive == null)
-            throw new IllegalArgumentException(tr("Failed to set reference. Reference version {0} not available in history.", reference.getVersion()));
+            throw new IllegalArgumentException(
+                    tr("Failed to set reference. Reference version {0} not available in history.", reference.getVersion()));
 
         this.reference = reference;
@@ -330,8 +332,10 @@
             throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive."));
         if (current.getId() != history.getId())
-            throw new IllegalArgumentException(tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(),  history.getId()));
+            throw new IllegalArgumentException(
+                    tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(),  history.getId()));
         HistoryOsmPrimitive primitive = history.getByVersion(current.getVersion());
         if (primitive == null)
-            throw new IllegalArgumentException(tr("Failed to set current primitive. Current version {0} not available in history.", current.getVersion()));
+            throw new IllegalArgumentException(
+                    tr("Failed to set current primitive. Current version {0} not available in history.", current.getVersion()));
         this.current = current;
         initTagTableModels();
Index: /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/AbstractUploadTask.java	(revision 8509)
@@ -64,5 +64,6 @@
         OsmPrimitive p = layer.data.getPrimitiveById(id, type);
         if (p == null)
-            throw new IllegalStateException(tr("Failed to update primitive with id {0} because current edit layer does not include such a primitive", id));
+            throw new IllegalStateException(
+                    tr("Failed to update primitive with id {0} because current edit layer does not include such a primitive", id));
         Main.worker.execute(new UpdatePrimitivesTask(layer, Collections.singleton(p)));
     }
Index: /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/ChangesetCellRenderer.java	(revision 8509)
@@ -47,5 +47,6 @@
 
     @Override
-    public Component getListCellRendererComponent(JList<? extends Changeset> list, Changeset cs, int index, boolean isSelected, boolean cellHasFocus) {
+    public Component getListCellRendererComponent(JList<? extends Changeset> list, Changeset cs, int index, boolean isSelected,
+            boolean cellHasFocus) {
         if (isSelected) {
             setForeground(UIManager.getColor("List.selectionForeground"));
Index: /trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 8509)
@@ -75,5 +75,6 @@
         gc.weighty = 0.0;
         gc.insets = new Insets(0, 0, 5, 0);
-        add(new JMultilineLabel(tr("Please decide what changeset the data is uploaded to and whether to close the changeset after the next upload.")), gc);
+        add(new JMultilineLabel(
+                tr("Please decide what changeset the data is uploaded to and whether to close the changeset after the next upload.")), gc);
 
         gc.gridwidth = 4;
Index: /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/CredentialDialog.java	(revision 8509)
@@ -44,5 +44,6 @@
 public class CredentialDialog extends JDialog {
 
-    public static CredentialDialog getOsmApiCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
+    public static CredentialDialog getOsmApiCredentialDialog(String username, String password, String host,
+            String saveUsernameAndPasswordCheckboxText) {
         CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
         if (Objects.equals(OsmApi.getOsmApi().getHost(), host)) {
@@ -55,5 +56,6 @@
     }
 
-    public static CredentialDialog getHttpProxyCredentialDialog(String username, String password, String host, String saveUsernameAndPasswordCheckboxText) {
+    public static CredentialDialog getHttpProxyCredentialDialog(String username, String password, String host,
+            String saveUsernameAndPasswordCheckboxText) {
         CredentialDialog dialog = new CredentialDialog(saveUsernameAndPasswordCheckboxText);
         dialog.prepareForProxyCredentials(username, password);
@@ -311,6 +313,9 @@
             lblHeading.setText(
                     "<html>" + tr("Authenticating at the HTTP proxy ''{0}'' failed. Please enter a valid username and a valid password.",
-                            Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST) + ":" + Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT)) + "</html>");
-            lblWarning.setText("<html>" + tr("Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.") + "</html>");
+                            Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_HOST) + ":" +
+                            Main.pref.get(ProxyPreferencesPanel.PROXY_HTTP_PORT)) + "</html>");
+            lblWarning.setText("<html>" +
+                    tr("Warning: depending on the authentication method the proxy server uses the password may be transferred unencrypted.")
+                    + "</html>");
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java	(revision 8509)
@@ -139,5 +139,6 @@
             }
         } catch(MalformedURLException e) {
-            String msg = tr("Cannot download file ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", file.getName(), address);
+            String msg = tr("Cannot download file ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.",
+                    file.getName(), address);
             Main.warn(msg);
             throw new DownloadException(msg, e);
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java	(revision 8509)
@@ -94,6 +94,6 @@
         if (p.isDeleted()) {
             // we tried to delete an already deleted primitive.
-            //
-            Main.warn(tr("Object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.", p.getDisplayName(DefaultNameFormatter.getInstance())));
+            Main.warn(tr("Object ''{0}'' is already deleted on the server. Skipping this object and retrying to upload.",
+                    p.getDisplayName(DefaultNameFormatter.getInstance())));
             processedPrimitives.addAll(writer.getProcessedPrimitives());
             processedPrimitives.add(p);
@@ -101,7 +101,6 @@
             return;
         }
-        // exception was thrown because we tried to *update* an already deleted
-        // primitive. We can't resolve this automatically. Re-throw exception,
-        // a conflict is going to be created later.
+        // exception was thrown because we tried to *update* an already deleted primitive. We can't resolve this automatically.
+        // Re-throw exception, a conflict is going to be created later.
         throw e;
     }
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 8509)
@@ -89,5 +89,6 @@
                 );
             } else if (numRequests > 1){
-                msg = tr("Uploading <strong>{0} objects</strong> to <strong>1 changeset</strong> using <strong>{1} requests</strong>", numObjects, numRequests);
+                msg = tr("Uploading <strong>{0} objects</strong> to <strong>1 changeset</strong> using <strong>{1} requests</strong>",
+                        numObjects, numRequests);
             }
             msg = msg + " (<a href=\"urn:advanced-configuration\">" + tr("advanced configuration") + "</a>)";
@@ -98,5 +99,6 @@
                         numObjects, maxChunkSize, OsmApi.getOsmApi().getBaseUrl());
             } else if (numRequests > 1){
-                msg = tr("Uploading <strong>{0} objects</strong> to <strong>multiple changesets</strong> using <strong>{1} requests</strong>", numObjects, numRequests);
+                msg = tr("Uploading <strong>{0} objects</strong> to <strong>multiple changesets</strong> using <strong>{1} requests</strong>",
+                        numObjects, numRequests);
                 msg = msg + " (<a href=\"urn:advanced-configuration\">" + tr("advanced configuration") + "</a>)";
             }
Index: /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 8509)
@@ -189,9 +189,13 @@
         gc.anchor = GridBagConstraints.FIRST_LINE_START;
         gc.weightx = 1.0;
-        pnlMultiChangesetPolicyPanel.add(lblMultiChangesetPoliciesHeader = new JMultilineLabel(tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>", numUploadedObjects)), gc);
+        pnlMultiChangesetPolicyPanel.add(lblMultiChangesetPoliciesHeader = new JMultilineLabel(
+                tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>",
+                        numUploadedObjects)), gc);
         gc.gridy = 1;
-        pnlMultiChangesetPolicyPanel.add(rbFillOneChangeset = new JRadioButton(tr("Fill up one changeset and return to the Upload Dialog")),gc);
-        gc.gridy = 2;
-        pnlMultiChangesetPolicyPanel.add(rbUseMultipleChangesets = new JRadioButton(tr("Open and use as many new changesets as necessary")),gc);
+        pnlMultiChangesetPolicyPanel.add(rbFillOneChangeset = new JRadioButton(
+                tr("Fill up one changeset and return to the Upload Dialog")), gc);
+        gc.gridy = 2;
+        pnlMultiChangesetPolicyPanel.add(rbUseMultipleChangesets = new JRadioButton(
+                tr("Open and use as many new changesets as necessary")), gc);
 
         ButtonGroup bgMultiChangesetPolicies = new ButtonGroup();
@@ -329,5 +333,7 @@
             lblNumRequests.get(UploadStrategy.SINGLE_REQUEST_STRATEGY).setVisible(false);
 
-            lblMultiChangesetPoliciesHeader.setText(tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>", numUploadedObjects));
+            lblMultiChangesetPoliciesHeader.setText(
+                    tr("<html>There are <strong>multiple changesets</strong> necessary in order to upload {0} objects. Which strategy do you want to use?</html>",
+                            numUploadedObjects));
             if (!rbFillOneChangeset.isSelected() && !rbUseMultipleChangesets.isSelected()) {
                 rbUseMultipleChangesets.setSelected(true);
@@ -410,5 +416,6 @@
                     setErrorFeedback(tfChunkSize, tr("Illegal chunk size <= 0. Please enter an integer > 1"));
                 } else if (maxChunkSize > 0 && chunkSize > maxChunkSize) {
-                    setErrorFeedback(tfChunkSize, tr("Chunk size {0} exceeds max. changeset size {1} for server ''{2}''", chunkSize, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()));
+                    setErrorFeedback(tfChunkSize, tr("Chunk size {0} exceeds max. changeset size {1} for server ''{2}''",
+                            chunkSize, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()));
                 } else {
                     clearErrorFeedback(tfChunkSize, tr("Please enter an integer > 1"));
@@ -416,8 +423,10 @@
 
                 if (maxChunkSize > 0 && chunkSize > maxChunkSize) {
-                    setErrorFeedback(tfChunkSize, tr("Chunk size {0} exceeds max. changeset size {1} for server ''{2}''", chunkSize, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()));
+                    setErrorFeedback(tfChunkSize, tr("Chunk size {0} exceeds max. changeset size {1} for server ''{2}''",
+                            chunkSize, maxChunkSize, OsmApi.getOsmApi().getBaseUrl()));
                 }
             } catch(NumberFormatException e) {
-                setErrorFeedback(tfChunkSize, tr("Value ''{0}'' is not a number. Please enter an integer > 1", tfChunkSize.getText().trim()));
+                setErrorFeedback(tfChunkSize, tr("Value ''{0}'' is not a number. Please enter an integer > 1",
+                        tfChunkSize.getText().trim()));
             } finally {
                 updateNumRequestsLabels();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/NoteLayer.java	(revision 8509)
@@ -146,5 +146,6 @@
 
             g.setColor(ColorHelper.html2color(Main.pref.get("color.selected")));
-            g.drawRect(p.x - (NotesDialog.ICON_SMALL_SIZE / 2), p.y - NotesDialog.ICON_SMALL_SIZE, NotesDialog.ICON_SMALL_SIZE - 1, NotesDialog.ICON_SMALL_SIZE - 1);
+            g.drawRect(p.x - (NotesDialog.ICON_SMALL_SIZE / 2), p.y - NotesDialog.ICON_SMALL_SIZE,
+                    NotesDialog.ICON_SMALL_SIZE - 1, NotesDialog.ICON_SMALL_SIZE - 1);
 
             int tx = p.x + (NotesDialog.ICON_SMALL_SIZE / 2) + 5;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 8509)
@@ -908,5 +908,6 @@
                             new String[] {tr("Reject Conflicts and Save"), tr("Cancel")}
                     );
-                    dialog.setContent(tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?"));
+                    dialog.setContent(
+                            tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?"));
                     dialog.setButtonIcons(new String[] {"save", "cancel"});
                     return dialog.showDialog().getValue();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java	(revision 8509)
@@ -129,4 +129,62 @@
     }
 
+    private final class ShowTileInfoAction extends AbstractAction {
+        private ShowTileInfoAction() {
+            super(tr("Show Tile Info"));
+        }
+
+        private String getSizeString(int size) {
+            return new StringBuilder().append(size).append("x").append(size).toString();
+        }
+
+        private JTextField createTextField(String text) {
+            JTextField ret = new JTextField(text);
+            ret.setEditable(false);
+            ret.setBorder(BorderFactory.createEmptyBorder());
+            return ret;
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent ae) {
+            if (clickedTile != null) {
+                ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Tile Info"), new String[]{tr("OK")});
+                JPanel panel = new JPanel(new GridBagLayout());
+                Rectangle displaySize = tileToRect(clickedTile);
+                String url = "";
+                try {
+                    url = clickedTile.getUrl();
+                } catch (IOException e) {
+                    // silence exceptions
+                }
+
+                String[][] content = {
+                        {"Tile name", clickedTile.getKey()},
+                        {"Tile url", url},
+                        {"Tile size", getSizeString(clickedTile.getTileSource().getTileSize()) },
+                        {"Tile display size", new StringBuilder().append(displaySize.width).append("x").append(displaySize.height).toString()},
+                };
+
+                for (String[] entry: content) {
+                    panel.add(new JLabel(tr(entry[0]) + ":"), GBC.std());
+                    panel.add(GBC.glue(5,0), GBC.std());
+                    panel.add(createTextField(entry[1]), GBC.eol().fill(GBC.HORIZONTAL));
+                }
+
+                for (Entry<String, String> e: clickedTile.getMetadata().entrySet()) {
+                    panel.add(new JLabel(tr("Metadata ") + tr(e.getKey()) + ":"), GBC.std());
+                    panel.add(GBC.glue(5,0), GBC.std());
+                    String value = e.getValue();
+                    if ("lastModification".equals(e.getKey()) || "expirationTime".equals(e.getKey())) {
+                        value = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.parseLong(value)));
+                    }
+                    panel.add(createTextField(value), GBC.eol().fill(GBC.HORIZONTAL));
+                }
+                ed.setIcon(JOptionPane.INFORMATION_MESSAGE);
+                ed.setContent(panel);
+                ed.showDialog();
+            }
+        }
+    }
+
     /**
      * Interface for creating TileLoaders, ie. classes responsible for loading tiles on map
@@ -537,59 +595,5 @@
         }));
 
-        tileOptionMenu.add(new JMenuItem(new AbstractAction(
-                tr("Show Tile Info")) {
-            private String getSizeString(int size) {
-                StringBuilder ret = new StringBuilder();
-                return ret.append(size).append("x").append(size).toString();
-            }
-
-            private JTextField createTextField(String text) {
-                JTextField ret = new JTextField(text);
-                ret.setEditable(false);
-                ret.setBorder(BorderFactory.createEmptyBorder());
-                return ret;
-            }
-            @Override
-            public void actionPerformed(ActionEvent ae) {
-                if (clickedTile != null) {
-                    ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Tile Info"), new String[]{tr("OK")});
-                    JPanel panel = new JPanel(new GridBagLayout());
-                    Rectangle displaySize = tileToRect(clickedTile);
-                    String url = "";
-                    try {
-                        url = clickedTile.getUrl();
-                    } catch (IOException e) {
-                        // silence exceptions
-                    }
-
-                    String[][] content = {
-                            {"Tile name", clickedTile.getKey()},
-                            {"Tile url", url},
-                            {"Tile size", getSizeString(clickedTile.getTileSource().getTileSize()) },
-                            {"Tile display size", new StringBuilder().append(displaySize.width).append("x").append(displaySize.height).toString()},
-                    };
-
-                    for (String[] entry: content) {
-                        panel.add(new JLabel(tr(entry[0]) + ":"), GBC.std());
-                        panel.add(GBC.glue(5,0), GBC.std());
-                        panel.add(createTextField(entry[1]), GBC.eol().fill(GBC.HORIZONTAL));
-                    }
-
-                    for (Entry<String, String> e: clickedTile.getMetadata().entrySet()) {
-                        panel.add(new JLabel(tr("Metadata ") + tr(e.getKey()) + ":"), GBC.std());
-                        panel.add(GBC.glue(5,0), GBC.std());
-                        String value = e.getValue();
-                        if ("lastModification".equals(e.getKey()) || "expirationTime".equals(e.getKey())) {
-                            value = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(Long.parseLong(value)));
-                        }
-                        panel.add(createTextField(value), GBC.eol().fill(GBC.HORIZONTAL));
-
-                    }
-                    ed.setIcon(JOptionPane.INFORMATION_MESSAGE);
-                    ed.setContent(panel);
-                    ed.showDialog();
-                }
-            }
-        }));
+        tileOptionMenu.add(new JMenuItem(new ShowTileInfoAction()));
 
         tileOptionMenu.add(new JMenuItem(new AbstractAction(
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 8509)
@@ -105,4 +105,103 @@
     }
 
+    private final class SyncDialogWindowListener extends WindowAdapter {
+        private static final int CANCEL = -1;
+        private static final int DONE = 0;
+        private static final int AGAIN = 1;
+        private static final int NOTHING = 2;
+
+        private int checkAndSave() {
+            if (syncDialog.isVisible())
+                // nothing happened: JOSM was minimized or similar
+                return NOTHING;
+            int answer = syncDialog.getValue();
+            if(answer != 1)
+                return CANCEL;
+
+            // Parse values again, to display an error if the format is not recognized
+            try {
+                timezone = parseTimezone(tfTimezone.getText().trim());
+            } catch (ParseException e) {
+                JOptionPane.showMessageDialog(Main.parent, e.getMessage(),
+                        tr("Invalid timezone"), JOptionPane.ERROR_MESSAGE);
+                return AGAIN;
+            }
+
+            try {
+                delta = parseOffset(tfOffset.getText().trim());
+            } catch (ParseException e) {
+                JOptionPane.showMessageDialog(Main.parent, e.getMessage(),
+                        tr("Invalid offset"), JOptionPane.ERROR_MESSAGE);
+                return AGAIN;
+            }
+
+            if (lastNumMatched == 0 && new ExtendedDialog(
+                        Main.parent,
+                        tr("Correlate images with GPX track"),
+                        new String[] {tr("OK"), tr("Try Again")}).
+                        setContent(tr("No images could be matched!")).
+                        setButtonIcons(new String[] {"ok", "dialogs/refresh"}).
+                        showDialog().getValue() == 2)
+                return AGAIN;
+            return DONE;
+        }
+
+        @Override
+        public void windowDeactivated(WindowEvent e) {
+            int result = checkAndSave();
+            switch (result) {
+            case NOTHING:
+                break;
+            case CANCEL:
+                if (yLayer != null) {
+                    for (ImageEntry ie : yLayer.data) {
+                        ie.tmp = null;
+                    }
+                    yLayer.updateBufferAndRepaint();
+                }
+                break;
+            case AGAIN:
+                actionPerformed(null);
+                break;
+            case DONE:
+                Main.pref.put("geoimage.timezone", formatTimezone(timezone));
+                Main.pref.put("geoimage.delta", Long.toString(delta * 1000));
+                Main.pref.put("geoimage.showThumbs", yLayer.useThumbs);
+
+                yLayer.useThumbs = cbShowThumbs.isSelected();
+                yLayer.startLoadThumbs();
+
+                // Search whether an other layer has yet defined some bounding box.
+                // If none, we'll zoom to the bounding box of the layer with the photos.
+                boolean boundingBoxedLayerFound = false;
+                for (Layer l: Main.map.mapView.getAllLayers()) {
+                    if (l != yLayer) {
+                        BoundingXYVisitor bbox = new BoundingXYVisitor();
+                        l.visitBoundingBox(bbox);
+                        if (bbox.getBounds() != null) {
+                            boundingBoxedLayerFound = true;
+                            break;
+                        }
+                    }
+                }
+                if (!boundingBoxedLayerFound) {
+                    BoundingXYVisitor bbox = new BoundingXYVisitor();
+                    yLayer.visitBoundingBox(bbox);
+                    Main.map.mapView.zoomTo(bbox);
+                }
+
+                for (ImageEntry ie : yLayer.data) {
+                    ie.applyTmp();
+                }
+
+                yLayer.updateBufferAndRepaint();
+
+                break;
+            default:
+                throw new IllegalStateException();
+            }
+        }
+    }
+
     private static class GpxDataWrapper {
         private String name;
@@ -663,101 +762,5 @@
         syncDialog.setContentPane(outerPanel);
         syncDialog.pack();
-        syncDialog.addWindowListener(new WindowAdapter() {
-            private static final int CANCEL = -1;
-            private static final int DONE = 0;
-            private static final int AGAIN = 1;
-            private static final int NOTHING = 2;
-            private int checkAndSave() {
-                if (syncDialog.isVisible())
-                    // nothing happened: JOSM was minimized or similar
-                    return NOTHING;
-                int answer = syncDialog.getValue();
-                if(answer != 1)
-                    return CANCEL;
-
-                // Parse values again, to display an error if the format is not recognized
-                try {
-                    timezone = parseTimezone(tfTimezone.getText().trim());
-                } catch (ParseException e) {
-                    JOptionPane.showMessageDialog(Main.parent, e.getMessage(),
-                            tr("Invalid timezone"), JOptionPane.ERROR_MESSAGE);
-                    return AGAIN;
-                }
-
-                try {
-                    delta = parseOffset(tfOffset.getText().trim());
-                } catch (ParseException e) {
-                    JOptionPane.showMessageDialog(Main.parent, e.getMessage(),
-                            tr("Invalid offset"), JOptionPane.ERROR_MESSAGE);
-                    return AGAIN;
-                }
-
-                if (lastNumMatched == 0 && new ExtendedDialog(
-                            Main.parent,
-                            tr("Correlate images with GPX track"),
-                            new String[] {tr("OK"), tr("Try Again")}).
-                            setContent(tr("No images could be matched!")).
-                            setButtonIcons(new String[] {"ok", "dialogs/refresh"}).
-                            showDialog().getValue() == 2)
-                    return AGAIN;
-                return DONE;
-            }
-
-            @Override
-            public void windowDeactivated(WindowEvent e) {
-                int result = checkAndSave();
-                switch (result) {
-                case NOTHING:
-                    break;
-                case CANCEL:
-                    if (yLayer != null) {
-                        for (ImageEntry ie : yLayer.data) {
-                            ie.tmp = null;
-                        }
-                        yLayer.updateBufferAndRepaint();
-                    }
-                    break;
-                case AGAIN:
-                    actionPerformed(null);
-                    break;
-                case DONE:
-                    Main.pref.put("geoimage.timezone", formatTimezone(timezone));
-                    Main.pref.put("geoimage.delta", Long.toString(delta * 1000));
-                    Main.pref.put("geoimage.showThumbs", yLayer.useThumbs);
-
-                    yLayer.useThumbs = cbShowThumbs.isSelected();
-                    yLayer.startLoadThumbs();
-
-                    // Search whether an other layer has yet defined some bounding box.
-                    // If none, we'll zoom to the bounding box of the layer with the photos.
-                    boolean boundingBoxedLayerFound = false;
-                    for (Layer l: Main.map.mapView.getAllLayers()) {
-                        if (l != yLayer) {
-                            BoundingXYVisitor bbox = new BoundingXYVisitor();
-                            l.visitBoundingBox(bbox);
-                            if (bbox.getBounds() != null) {
-                                boundingBoxedLayerFound = true;
-                                break;
-                            }
-                        }
-                    }
-                    if (!boundingBoxedLayerFound) {
-                        BoundingXYVisitor bbox = new BoundingXYVisitor();
-                        yLayer.visitBoundingBox(bbox);
-                        Main.map.mapView.zoomTo(bbox);
-                    }
-
-                    for (ImageEntry ie : yLayer.data) {
-                        ie.applyTmp();
-                    }
-
-                    yLayer.updateBufferAndRepaint();
-
-                    break;
-                default:
-                    throw new IllegalStateException();
-                }
-            }
-        });
+        syncDialog.addWindowListener(new SyncDialogWindowListener());
         syncDialog.showDialog();
     }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java	(revision 8509)
@@ -107,5 +107,6 @@
         btnDelete.getActionMap().put(DELETE_TEXT, delAction);
 
-        ImageAction delFromDiskAction = new ImageAction(COMMAND_REMOVE_FROM_DISK, ImageProvider.get("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk"));
+        ImageAction delFromDiskAction = new ImageAction(COMMAND_REMOVE_FROM_DISK,
+                ImageProvider.get("dialogs", "geoimage/deletefromdisk"), tr("Delete image file from disk"));
         JButton btnDeleteFromDisk = new JButton(delFromDiskAction);
         btnDeleteFromDisk.setPreferredSize(buttonDim);
@@ -149,11 +150,14 @@
         );
 
-        JToggleButton tbCentre = new JToggleButton(new ImageAction(COMMAND_CENTERVIEW, ImageProvider.get("dialogs", "centreview"), tr("Center view")));
+        JToggleButton tbCentre = new JToggleButton(new ImageAction(COMMAND_CENTERVIEW,
+                ImageProvider.get("dialogs", "centreview"), tr("Center view")));
         tbCentre.setPreferredSize(buttonDim);
 
-        JButton btnZoomBestFit = new JButton(new ImageAction(COMMAND_ZOOM, ImageProvider.get("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1")));
+        JButton btnZoomBestFit = new JButton(new ImageAction(COMMAND_ZOOM,
+                ImageProvider.get("dialogs", "zoom-best-fit"), tr("Zoom best fit and 1:1")));
         btnZoomBestFit.setPreferredSize(buttonDim);
 
-        btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE, ImageProvider.get("dialogs", "collapse"), tr("Move dialog to the side pane")));
+        btnCollapse = new JButton(new ImageAction(COMMAND_COLLAPSE,
+                ImageProvider.get("dialogs", "collapse"), tr("Move dialog to the side pane")));
         btnCollapse.setPreferredSize(new Dimension(20,20));
         btnCollapse.setAlignmentY(Component.TOP_ALIGNMENT);
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityAction.java	(revision 8509)
@@ -253,5 +253,6 @@
         msg.add(dateFilter, GBC.eol().insets(0,0,10,0).fill(GBC.HORIZONTAL));
 
-        msg.add(new JLabel(tr("<html>Select all tracks that you want to be displayed. You can drag select a " + "range of tracks or use CTRL+Click to select specific ones. The map is updated live in the " + "background. Open the URLs by double clicking them.</html>")), GBC.eop().fill(GBC.HORIZONTAL));
+        msg.add(new JLabel(tr("<html>Select all tracks that you want to be displayed. You can drag select a range of tracks or use CTRL+Click to select specific ones. The map is updated live in the background. Open the URLs by double clicking them.</html>")),
+                GBC.eop().fill(GBC.HORIZONTAL));
         // build table
         final boolean[] trackVisibilityBackup = layer.trackVisibility.clone();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ConvertToDataLayerAction.java	(revision 8509)
@@ -43,7 +43,10 @@
     public void actionPerformed(ActionEvent e) {
         JPanel msg = new JPanel(new GridBagLayout());
-        msg.add(new JLabel(tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:</html>")), GBC.eol());
+        msg.add(new JLabel(
+                tr("<html>Upload of unprocessed GPS data as map data is considered harmful.<br>If you want to upload traces, look here:</html>")),
+                GBC.eol());
         msg.add(new UrlLabel(Main.getOSMWebsite() + "/traces", 2), GBC.eop());
-        if (!ConditionalOptionPaneUtil.showConfirmationDialog("convert_to_data", Main.parent, msg, tr("Warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, JOptionPane.OK_OPTION)) {
+        if (!ConditionalOptionPaneUtil.showConfirmationDialog("convert_to_data", Main.parent, msg, tr("Warning"),
+                JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, JOptionPane.OK_OPTION)) {
             return;
         }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/CustomizeDrawingAction.java	(revision 8509)
@@ -88,5 +88,6 @@
             scrollpane.setPreferredSize(new Dimension(panel.getPreferredSize().width, Math.min(panel.getPreferredSize().height, 450)));
         }
-        int answer = JOptionPane.showConfirmDialog(Main.parent, scrollpane, tr("Customize track drawing"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
+        int answer = JOptionPane.showConfirmDialog(Main.parent, scrollpane, tr("Customize track drawing"),
+                JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
         if (answer == JOptionPane.CANCEL_OPTION || answer == JOptionPane.CLOSED_OPTION) {
             return;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportAudioAction.java	(revision 8509)
@@ -58,6 +58,8 @@
 
     private void warnCantImportIntoServerLayer(GpxLayer layer) {
-        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" + "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>", layer.getName());
-        HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"), JOptionPane.WARNING_MESSAGE, ht("/Action/ImportAudio#CantImportIntoGpxLayerFromServer"));
+        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>Because its way points do not include a timestamp we cannot correlate them with audio data.</html>",
+                layer.getName());
+        HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"),
+                JOptionPane.WARNING_MESSAGE, ht("/Action/ImportAudio#CantImportIntoGpxLayerFromServer"));
     }
 
@@ -79,5 +81,6 @@
             }
         };
-        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, true, null, filter, JFileChooser.FILES_ONLY, "markers.lastaudiodirectory");
+        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true, true, null, filter,
+                JFileChooser.FILES_ONLY, "markers.lastaudiodirectory");
         if (fc != null) {
             File[] sel = fc.getSelectedFiles();
Index: /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/gpx/ImportImagesAction.java	(revision 8509)
@@ -34,6 +34,8 @@
 
     private void warnCantImportIntoServerLayer(GpxLayer layer) {
-        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" + "Because its way points do not include a timestamp we cannot correlate them with images.</html>", layer.getName());
-        HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"), JOptionPane.WARNING_MESSAGE, ht("/Action/ImportImages#CantImportIntoGpxLayerFromServer"));
+        String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>Because its way points do not include a timestamp we cannot correlate them with images.</html>",
+                layer.getName());
+        HelpAwareOptionPane.showOptionDialog(Main.parent, msg, tr("Import not possible"),
+                JOptionPane.WARNING_MESSAGE, ht("/Action/ImportImages#CantImportIntoGpxLayerFromServer"));
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java	(revision 8509)
@@ -184,6 +184,5 @@
             public Marker createMarker(WayPoint wpt, File relativePath, MarkerLayer parentLayer, double time, double offset) {
                 String uri = null;
-                // cheapest way to check whether "link" object exists and is a non-empty
-                // collection of GpxLink objects...
+                // cheapest way to check whether "link" object exists and is a non-empty collection of GpxLink objects...
                 Collection<GpxLink> links = wpt.<GpxLink>getCollection(GpxConstants.META_LINKS);
                 if (links != null) {
@@ -206,4 +205,5 @@
                 }
 
+                String urlString = url == null ? "" : url.toString();
                 if (url == null) {
                     String symbolName = wpt.getString("symbol");
@@ -212,11 +212,10 @@
                     }
                     return new Marker(wpt.getCoor(), wpt, symbolName, parentLayer, time, offset);
-                } else if (url.toString().endsWith(".wav")) {
+                } else if (urlString.endsWith(".wav")) {
                     AudioMarker audioMarker = new AudioMarker(wpt.getCoor(), wpt, url, parentLayer, time, offset);
                     Extensions exts = (Extensions) wpt.get(GpxConstants.META_EXTENSIONS);
                     if (exts != null && exts.containsKey("offset")) {
                         try {
-                            double syncOffset = Double.parseDouble(exts.get("sync-offset"));
-                            audioMarker.syncOffset = syncOffset;
+                            audioMarker.syncOffset = Double.parseDouble(exts.get("sync-offset"));
                         } catch (NumberFormatException nfe) {
                             Main.warn(nfe);
@@ -224,5 +223,5 @@
                     }
                     return audioMarker;
-                } else if (url.toString().endsWith(".png") || url.toString().endsWith(".jpg") || url.toString().endsWith(".jpeg") || url.toString().endsWith(".gif")) {
+                } else if (urlString.endsWith(".png") || urlString.endsWith(".jpg") || urlString.endsWith(".jpeg") || urlString.endsWith(".gif")) {
                     return new ImageMarker(wpt.getCoor(), url, parentLayer, time, offset);
                 } else {
@@ -280,5 +279,6 @@
     private boolean erroneous = false;
 
-    public Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String iconName, MarkerLayer parentLayer, double time, double offset) {
+    public Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String iconName, MarkerLayer parentLayer,
+            double time, double offset) {
         this(ll, dataProvider, null, iconName, parentLayer, time, offset);
     }
@@ -288,5 +288,6 @@
     }
 
-    private Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String text, String iconName, MarkerLayer parentLayer, double time, double offset) {
+    private Marker(LatLon ll, TemplateEngineDataProvider dataProvider, String text, String iconName, MarkerLayer parentLayer,
+            double time, double offset) {
         timeFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
         setCoor(ll);
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java	(revision 8509)
@@ -87,5 +87,6 @@
     public VerticalTextAlignment vAlign;
 
-    public BoxTextElemStyle(Cascade c, TextElement text, BoxProvider boxProvider, Rectangle box, HorizontalTextAlignment hAlign, VerticalTextAlignment vAlign) {
+    public BoxTextElemStyle(Cascade c, TextElement text, BoxProvider boxProvider, Rectangle box,
+            HorizontalTextAlignment hAlign, VerticalTextAlignment vAlign) {
         super(c, 5f);
         CheckParameterUtil.ensureParameterNotNull(text);
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java	(revision 8509)
@@ -55,5 +55,6 @@
     }
 
-    protected LineElemStyle(Cascade c, float default_major_z_index, BasicStroke line, Color color, BasicStroke dashesLine, Color dashesBackground, float offset, float realWidth) {
+    protected LineElemStyle(Cascade c, float default_major_z_index, BasicStroke line, Color color, BasicStroke dashesLine,
+            Color dashesBackground, float offset, float realWidth) {
         super(c, default_major_z_index);
         this.line = line;
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java	(revision 8509)
@@ -92,5 +92,6 @@
 
     public static final StyleList DEFAULT_NODE_STYLELIST = new StyleList(NodeElemStyle.SIMPLE_NODE_ELEMSTYLE);
-    public static final StyleList DEFAULT_NODE_STYLELIST_TEXT = new StyleList(NodeElemStyle.SIMPLE_NODE_ELEMSTYLE, BoxTextElemStyle.SIMPLE_NODE_TEXT_ELEMSTYLE);
+    public static final StyleList DEFAULT_NODE_STYLELIST_TEXT = new StyleList(NodeElemStyle.SIMPLE_NODE_ELEMSTYLE,
+            BoxTextElemStyle.SIMPLE_NODE_TEXT_ELEMSTYLE);
 
     protected NodeElemStyle(Cascade c, MapImage mapImage, Symbol symbol, float default_major_z_index, RotationAngle rotationAngle) {
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/StyleCache.java	(revision 8509)
@@ -25,5 +25,6 @@
     private final List<StyleList> data;
 
-    private static final Storage<StyleCache> internPool = new Storage<>(); // TODO: clean up the intern pool from time to time (after purge or layer removal)
+    // TODO: clean up the intern pool from time to time (after purge or layer removal)
+    private static final Storage<StyleCache> internPool = new Storage<>();
 
     public static final StyleCache EMPTY_STYLECACHE = (new StyleCache()).intern();
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java	(revision 8509)
@@ -69,5 +69,6 @@
      * @since 6867
      */
-    public static final String MAPCSS_STYLE_MIME_TYPES = "text/x-mapcss, text/mapcss, text/css; q=0.9, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
+    public static final String MAPCSS_STYLE_MIME_TYPES =
+            "text/x-mapcss, text/mapcss, text/css; q=0.9, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
 
     // all rules
@@ -521,5 +522,6 @@
             backgroundColorOverride = c.get("background-color", null, Color.class);
             if (backgroundColorOverride != null) {
-                Main.warn(tr("Detected deprecated ''{0}'' in ''{1}'' which will be removed shortly. Use ''{2}'' instead.", "canvas{background-color}", url, "fill-color"));
+                Main.warn(tr("Detected deprecated ''{0}'' in ''{1}'' which will be removed shortly. Use ''{2}'' instead.",
+                        "canvas{background-color}", url, "fill-color"));
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java	(revision 8509)
@@ -257,5 +257,6 @@
             public void visit(Way w) {
                 if (e.child == null && left.matches(new Environment(w))) {
-                    if (e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
+                    if (e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals(
+                            Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
                         e.child = w;
                     }
@@ -274,5 +275,6 @@
                 if (e.child == null && left.matches(new Environment(n))) {
                     if (e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())
-                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {
+                            || e.osm instanceof Relation && (
+                                    (Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {
                         e.child = n;
                     }
@@ -283,6 +285,9 @@
             public void visit(Way w) {
                 if (e.child == null && left.matches(new Environment(w))) {
-                    if (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
-                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
+                    if (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(
+                            Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
+                            || e.osm instanceof Relation && (
+                                    (Relation) e.osm).isMultipolygon()
+                                    && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
                         e.child = w;
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java	(revision 8509)
@@ -40,5 +40,6 @@
      * @since 6867
      */
-    public static final String XML_STYLE_MIME_TYPES = "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
+    public static final String XML_STYLE_MIME_TYPES =
+            "application/xml, text/xml, text/plain; q=0.8, application/zip, application/octet-stream; q=0.5";
 
     protected final Map<String, IconPrototype> icons = new HashMap<>();
@@ -91,5 +92,6 @@
             logError(e);
         } catch (SAXParseException e) {
-            Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}", url, e.getLineNumber(), e.getColumnNumber(), e.getMessage()));
+            Main.warn(tr("Failed to parse Mappaint styles from ''{0}''. Error was: [{1}:{2}] {3}",
+                    url, e.getLineNumber(), e.getColumnNumber(), e.getMessage()));
             Main.error(e);
             logError(e);
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorizationUI.java	(revision 8509)
@@ -94,5 +94,6 @@
         HtmlPanel pnlMessage = new HtmlPanel();
         HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
-        kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+        kit.getStyleSheet().addRule(
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
         kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
         pnlMessage.setText("<html><body><p class=\"warning-body\">"
@@ -143,5 +144,6 @@
         pnlMessage = new HtmlPanel();
         kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
-        kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+        kit.getStyleSheet().addRule(
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
         kit.getStyleSheet().addRule("ol {margin-left: 1cm}");
         pnlMessage.setText("<html><body>"
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java	(revision 8509)
@@ -427,5 +427,6 @@
     }
 
-    protected void sendAuthorisationRequest(SessionId sessionId, OAuthToken requestToken, OsmPrivileges privileges) throws OsmOAuthAuthorizationException {
+    protected void sendAuthorisationRequest(SessionId sessionId, OAuthToken requestToken, OsmPrivileges privileges)
+            throws OsmOAuthAuthorizationException {
         Map<String, String> parameters = new HashMap<>();
         fetchOAuthToken(sessionId, requestToken);
@@ -492,6 +493,6 @@
      *
      * @param requestToken the request token. Must not be null.
-     * @param osmUserName the OSM user name. Must not be null.
-     * @param osmPassword the OSM password. Must not be null.
+     * @param userName the OSM user name. Must not be null.
+     * @param password the OSM password. Must not be null.
      * @param privileges the set of privileges. Must not be null.
      * @param monitor a progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null
@@ -503,8 +504,9 @@
      * @throws OsmTransferCanceledException if the task is canceled by the user
      */
-    public void authorise(OAuthToken requestToken, String osmUserName, String osmPassword, OsmPrivileges privileges, ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCanceledException{
+    public void authorise(OAuthToken requestToken, String userName, String password, OsmPrivileges privileges, ProgressMonitor monitor)
+            throws OsmOAuthAuthorizationException, OsmTransferCanceledException {
         CheckParameterUtil.ensureParameterNotNull(requestToken, "requestToken");
-        CheckParameterUtil.ensureParameterNotNull(osmUserName, "osmUserName");
-        CheckParameterUtil.ensureParameterNotNull(osmPassword, "osmPassword");
+        CheckParameterUtil.ensureParameterNotNull(userName, "userName");
+        CheckParameterUtil.ensureParameterNotNull(password, "password");
         CheckParameterUtil.ensureParameterNotNull(privileges, "privileges");
 
@@ -517,11 +519,11 @@
             monitor.indeterminateSubTask(tr("Initializing a session at the OSM website..."));
             SessionId sessionId = fetchOsmWebsiteSessionId();
-            sessionId.userName = osmUserName;
+            sessionId.userName = userName;
             if (canceled)
                 throw new OsmTransferCanceledException("Authorization canceled");
             monitor.worked(1);
 
-            monitor.indeterminateSubTask(tr("Authenticating the session for user ''{0}''...", osmUserName));
-            authenticateOsmSession(sessionId, osmUserName, osmPassword);
+            monitor.indeterminateSubTask(tr("Authenticating the session for user ''{0}''...", userName));
+            authenticateOsmSession(sessionId, userName, password);
             if (canceled)
                 throw new OsmTransferCanceledException("Authorization canceled");
Index: /trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java	(revision 8509)
@@ -113,8 +113,10 @@
 
             if (connection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
-                throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED, tr("Retrieving user details with Access Token Key ''{0}'' was rejected.", token.getKey()), null);
+                throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,
+                        tr("Retrieving user details with Access Token Key ''{0}'' was rejected.", token.getKey()), null);
 
             if (connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN)
-                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null);
+                throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN,
+                        tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null);
 
             if (connection.getResponseCode() != HttpURLConnection.HTTP_OK)
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8509)
@@ -73,4 +73,109 @@
 public final class PreferenceTabbedPane extends JTabbedPane implements MouseWheelListener, ExpertModeChangeListener, ChangeListener {
 
+    private final class PluginDownloadAfterTask implements Runnable {
+        private final PluginPreference preference;
+        private final PluginDownloadTask task;
+        private final List<PluginInformation> toDownload;
+
+        private PluginDownloadAfterTask(PluginPreference preference, PluginDownloadTask task,
+                List<PluginInformation> toDownload) {
+            this.preference = preference;
+            this.task = task;
+            this.toDownload = toDownload;
+        }
+
+        @Override
+        public void run() {
+            boolean requiresRestart = false;
+
+            for (PreferenceSetting setting : settingsInitialized) {
+                if (setting.ok()) {
+                    requiresRestart = true;
+                }
+            }
+
+            // build the messages. We only display one message, including the status information from the plugin download task
+            // and - if necessary - a hint to restart JOSM
+            //
+            StringBuilder sb = new StringBuilder();
+            sb.append("<html>");
+            if (task != null && !task.isCanceled()) {
+                PluginHandler.refreshLocalUpdatedPluginInfo(task.getDownloadedPlugins());
+                sb.append(PluginPreference.buildDownloadSummary(task));
+            }
+            if (requiresRestart) {
+                sb.append(tr("You have to restart JOSM for some settings to take effect."));
+                sb.append("<br/><br/>");
+                sb.append(tr("Would you like to restart now?"));
+            }
+            sb.append("</html>");
+
+            // display the message, if necessary
+            //
+            if (requiresRestart) {
+                final ButtonSpec[] options = RestartAction.getButtonSpecs();
+                if (0 == HelpAwareOptionPane.showOptionDialog(
+                        Main.parent,
+                        sb.toString(),
+                        tr("Restart"),
+                        JOptionPane.INFORMATION_MESSAGE,
+                        null, /* no special icon */
+                        options,
+                        options[0],
+                        null /* no special help */
+                        )) {
+                    Main.main.menu.restart.actionPerformed(null);
+                }
+            } else if (task != null && !task.isCanceled()) {
+                JOptionPane.showMessageDialog(
+                        Main.parent,
+                        sb.toString(),
+                        tr("Warning"),
+                        JOptionPane.WARNING_MESSAGE
+                        );
+            }
+
+            // load the plugins that can be loaded at runtime
+            List<PluginInformation> newPlugins = preference.getNewlyActivatedPlugins();
+            if (newPlugins != null) {
+                Collection<PluginInformation> downloadedPlugins = null;
+                if (task != null && !task.isCanceled()) {
+                    downloadedPlugins = task.getDownloadedPlugins();
+                }
+                List<PluginInformation> toLoad = new ArrayList<>();
+                for (PluginInformation pi : newPlugins) {
+                    if (toDownload.contains(pi) && downloadedPlugins != null && !downloadedPlugins.contains(pi)) {
+                        continue; // failed download
+                    }
+                    if (pi.canloadatruntime) {
+                        toLoad.add(pi);
+                    }
+                }
+                // check if plugin dependences can also be loaded
+                Collection<PluginInformation> allPlugins = new HashSet<>(toLoad);
+                for (PluginProxy proxy : PluginHandler.pluginList) {
+                    allPlugins.add(proxy.getPluginInformation());
+                }
+                boolean removed;
+                do {
+                    removed = false;
+                    Iterator<PluginInformation> it = toLoad.iterator();
+                    while (it.hasNext()) {
+                        if (!PluginHandler.checkRequiredPluginsPreconditions(null, allPlugins, it.next(), requiresRestart)) {
+                            it.remove();
+                            removed = true;
+                        }
+                    }
+                } while (removed);
+
+                if (!toLoad.isEmpty()) {
+                    PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null);
+                }
+            }
+
+            Main.parent.repaint();
+        }
+    }
+
     /**
      * Allows PreferenceSettings to do validation of entered values when ok was pressed.
@@ -304,6 +409,5 @@
      */
     public void savePreferences() {
-        // create a task for downloading plugins if the user has activated, yet not downloaded,
-        // new plugins
+        // create a task for downloading plugins if the user has activated, yet not downloaded, new plugins
         //
         final PluginPreference preference = getPluginPreference();
@@ -318,98 +422,5 @@
         // this is the task which will run *after* the plugins are downloaded
         //
-        final Runnable continuation = new Runnable() {
-            @Override
-            public void run() {
-                boolean requiresRestart = false;
-
-                for (PreferenceSetting setting : settingsInitialized) {
-                    if (setting.ok()) {
-                        requiresRestart = true;
-                    }
-                }
-
-                // build the messages. We only display one message, including the status
-                // information from the plugin download task and - if necessary - a hint
-                // to restart JOSM
-                //
-                StringBuilder sb = new StringBuilder();
-                sb.append("<html>");
-                if (task != null && !task.isCanceled()) {
-                    PluginHandler.refreshLocalUpdatedPluginInfo(task.getDownloadedPlugins());
-                    sb.append(PluginPreference.buildDownloadSummary(task));
-                }
-                if (requiresRestart) {
-                    sb.append(tr("You have to restart JOSM for some settings to take effect."));
-                    sb.append("<br/><br/>");
-                    sb.append(tr("Would you like to restart now?"));
-                }
-                sb.append("</html>");
-
-                // display the message, if necessary
-                //
-                if (requiresRestart) {
-                    final ButtonSpec[] options = RestartAction.getButtonSpecs();
-                    if (0 == HelpAwareOptionPane.showOptionDialog(
-                            Main.parent,
-                            sb.toString(),
-                            tr("Restart"),
-                            JOptionPane.INFORMATION_MESSAGE,
-                            null, /* no special icon */
-                            options,
-                            options[0],
-                            null /* no special help */
-                            )) {
-                        Main.main.menu.restart.actionPerformed(null);
-                    }
-                } else if (task != null && !task.isCanceled()) {
-                    JOptionPane.showMessageDialog(
-                            Main.parent,
-                            sb.toString(),
-                            tr("Warning"),
-                            JOptionPane.WARNING_MESSAGE
-                            );
-                }
-
-                // load the plugins that can be loaded at runtime
-                List<PluginInformation> newPlugins = preference.getNewlyActivatedPlugins();
-                if (newPlugins != null) {
-                    Collection<PluginInformation> downloadedPlugins = null;
-                    if (task != null && !task.isCanceled()) {
-                        downloadedPlugins = task.getDownloadedPlugins();
-                    }
-                    List<PluginInformation> toLoad = new ArrayList<>();
-                    for (PluginInformation pi : newPlugins) {
-                        if (toDownload.contains(pi) && downloadedPlugins != null && !downloadedPlugins.contains(pi)) {
-                            continue; // failed download
-                        }
-                        if (pi.canloadatruntime) {
-                            toLoad.add(pi);
-                        }
-                    }
-                    // check if plugin dependences can also be loaded
-                    Collection<PluginInformation> allPlugins = new HashSet<>(toLoad);
-                    for (PluginProxy proxy : PluginHandler.pluginList) {
-                        allPlugins.add(proxy.getPluginInformation());
-                    }
-                    boolean removed;
-                    do {
-                        removed = false;
-                        Iterator<PluginInformation> it = toLoad.iterator();
-                        while (it.hasNext()) {
-                            if (!PluginHandler.checkRequiredPluginsPreconditions(null, allPlugins, it.next(), requiresRestart)) {
-                                it.remove();
-                                removed = true;
-                            }
-                        }
-                    } while (removed);
-
-                    if (!toLoad.isEmpty()) {
-                        PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null);
-                    }
-                }
-
-                Main.parent.repaint();
-            }
-        };
+        final Runnable continuation = new PluginDownloadAfterTask(preference, task, toDownload);
 
         if (task != null) {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 8509)
@@ -491,4 +491,107 @@
     public class Settings extends DefaultTabPreferenceSetting {
 
+        private final class SelectedListTransferHandler extends TransferHandler {
+            @Override
+            @SuppressWarnings("unchecked")
+            protected Transferable createTransferable(JComponent c) {
+                List<ActionDefinition> actions = new ArrayList<>();
+                for (ActionDefinition o: ((JList<ActionDefinition>)c).getSelectedValuesList()) {
+                    actions.add(o);
+                }
+                return new ActionTransferable(actions);
+            }
+
+            @Override
+            public int getSourceActions(JComponent c) {
+                return TransferHandler.MOVE;
+            }
+
+            @Override
+            public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
+                for (DataFlavor f : transferFlavors) {
+                    if (ACTION_FLAVOR.equals(f))
+                        return true;
+                }
+                return false;
+            }
+
+            @Override
+            public void exportAsDrag(JComponent comp, InputEvent e, int action) {
+                super.exportAsDrag(comp, e, action);
+                movingComponent = "list";
+            }
+
+            @Override
+            public boolean importData(JComponent comp, Transferable t) {
+                try {
+                    int dropIndex = selectedList.locationToIndex(selectedList.getMousePosition(true));
+                    @SuppressWarnings("unchecked")
+                    List<ActionDefinition> draggedData = (List<ActionDefinition>) t.getTransferData(ACTION_FLAVOR);
+
+                    Object leadItem = dropIndex >= 0 ? selected.elementAt(dropIndex) : null;
+                    int dataLength = draggedData.size();
+
+                    if (leadItem != null) {
+                        for (Object o: draggedData) {
+                            if (leadItem.equals(o))
+                                return false;
+                        }
+                    }
+
+                    int dragLeadIndex = -1;
+                    boolean localDrop = "list".equals(movingComponent);
+
+                    if (localDrop) {
+                        dragLeadIndex = selected.indexOf(draggedData.get(0));
+                        for (Object o: draggedData) {
+                            selected.removeElement(o);
+                        }
+                    }
+                    int[] indices = new int[dataLength];
+
+                    if (localDrop) {
+                        int adjustedLeadIndex = selected.indexOf(leadItem);
+                        int insertionAdjustment = dragLeadIndex <= adjustedLeadIndex ? 1 : 0;
+                        for (int i = 0; i < dataLength; i++) {
+                            selected.insertElementAt(draggedData.get(i), adjustedLeadIndex + insertionAdjustment + i);
+                            indices[i] = adjustedLeadIndex + insertionAdjustment + i;
+                        }
+                    } else {
+                        for (int i = 0; i < dataLength; i++) {
+                            selected.add(dropIndex, draggedData.get(i));
+                            indices[i] = dropIndex + i;
+                        }
+                    }
+                    selectedList.clearSelection();
+                    selectedList.setSelectedIndices(indices);
+                    movingComponent = "";
+                    return true;
+                } catch (Exception e) {
+                    Main.error(e);
+                }
+                return false;
+            }
+
+            @Override
+            protected void exportDone(JComponent source, Transferable data, int action) {
+                if ("list".equals(movingComponent)) {
+                    try {
+                        List<?> draggedData = (List<?>) data.getTransferData(ACTION_FLAVOR);
+                        boolean localDrop = selected.contains(draggedData.get(0));
+                        if (localDrop) {
+                            int[] indices = selectedList.getSelectedIndices();
+                            Arrays.sort(indices);
+                            for (int i = indices.length - 1; i >= 0; i--) {
+                                selected.remove(indices[i]);
+                            }
+                        }
+                    } catch (Exception e) {
+                        Main.error(e);
+                    }
+                    movingComponent = "";
+                }
+            }
+        }
+
         private final class Move implements ActionListener {
             @Override
@@ -662,106 +765,5 @@
 
             selectedList.setDragEnabled(true);
-            selectedList.setTransferHandler(new TransferHandler() {
-                @Override
-                @SuppressWarnings("unchecked")
-                protected Transferable createTransferable(JComponent c) {
-                    List<ActionDefinition> actions = new ArrayList<>();
-                    for (ActionDefinition o: ((JList<ActionDefinition>)c).getSelectedValuesList()) {
-                        actions.add(o);
-                    }
-                    return new ActionTransferable(actions);
-                }
-
-                @Override
-                public int getSourceActions(JComponent c) {
-                    return TransferHandler.MOVE;
-                }
-
-                @Override
-                public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
-                    for (DataFlavor f : transferFlavors) {
-                        if (ACTION_FLAVOR.equals(f))
-                            return true;
-                    }
-                    return false;
-                }
-
-                @Override
-                public void exportAsDrag(JComponent comp, InputEvent e, int action) {
-                    super.exportAsDrag(comp, e, action);
-                    movingComponent = "list";
-                }
-
-                @Override
-                public boolean importData(JComponent comp, Transferable t) {
-                    try {
-                        int dropIndex = selectedList.locationToIndex(selectedList.getMousePosition(true));
-                        @SuppressWarnings("unchecked")
-                        List<ActionDefinition> draggedData = (List<ActionDefinition>) t.getTransferData(ACTION_FLAVOR);
-
-                        Object leadItem = dropIndex >= 0 ? selected.elementAt(dropIndex) : null;
-                        int dataLength = draggedData.size();
-
-                        if (leadItem != null) {
-                            for (Object o: draggedData) {
-                                if (leadItem.equals(o))
-                                    return false;
-                            }
-                        }
-
-                        int dragLeadIndex = -1;
-                        boolean localDrop = "list".equals(movingComponent);
-
-                        if (localDrop) {
-                            dragLeadIndex = selected.indexOf(draggedData.get(0));
-                            for (Object o: draggedData) {
-                                selected.removeElement(o);
-                            }
-                        }
-                        int[] indices = new int[dataLength];
-
-                        if (localDrop) {
-                            int adjustedLeadIndex = selected.indexOf(leadItem);
-                            int insertionAdjustment = dragLeadIndex <= adjustedLeadIndex ? 1 : 0;
-                            for (int i = 0; i < dataLength; i++) {
-                                selected.insertElementAt(draggedData.get(i), adjustedLeadIndex + insertionAdjustment + i);
-                                indices[i] = adjustedLeadIndex + insertionAdjustment + i;
-                            }
-                        } else {
-                            for (int i = 0; i < dataLength; i++) {
-                                selected.add(dropIndex, draggedData.get(i));
-                                indices[i] = dropIndex + i;
-                            }
-                        }
-                        selectedList.clearSelection();
-                        selectedList.setSelectedIndices(indices);
-                        movingComponent = "";
-                        return true;
-                    } catch (Exception e) {
-                        Main.error(e);
-                    }
-                    return false;
-                }
-
-                @Override
-                protected void exportDone(JComponent source, Transferable data, int action) {
-                    if ("list".equals(movingComponent)) {
-                        try {
-                            List<?> draggedData = (List<?>) data.getTransferData(ACTION_FLAVOR);
-                            boolean localDrop = selected.contains(draggedData.get(0));
-                            if (localDrop) {
-                                int[] indices = selectedList.getSelectedIndices();
-                                Arrays.sort(indices);
-                                for (int i = indices.length - 1; i >= 0; i--) {
-                                    selected.remove(indices[i]);
-                                }
-                            }
-                        } catch (Exception e) {
-                            Main.error(e);
-                        }
-                        movingComponent = "";
-                    }
-                }
-            });
+            selectedList.setTransferHandler(new SelectedListTransferHandler());
 
             actionsTree.setTransferHandler(new TransferHandler() {
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/advanced/ExportProfileAction.java	(revision 8509)
@@ -74,5 +74,6 @@
             }
         };
-        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(false, false, title, filter, JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
+        AbstractFileChooser fc = DiskAccessAction.createAndOpenFileChooser(false, false, title, filter,
+                JFileChooser.FILES_ONLY, "customsettings.lastDirectory");
         if (fc != null) {
             File sel = fc.getSelectedFile();
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/audio/AudioPreference.java	(revision 8509)
@@ -65,5 +65,6 @@
         // audioTraceVisible
         markerAudioTraceVisible.setSelected(Main.pref.getBoolean("marker.traceaudio", true));
-        markerAudioTraceVisible.setToolTipText(tr("Display a moving icon representing the point on the synchronized track where the audio currently playing was recorded."));
+        markerAudioTraceVisible.setToolTipText(
+                tr("Display a moving icon representing the point on the synchronized track where the audio currently playing was recorded."));
         audio.add(markerAudioTraceVisible, GBC.eol().insets(0,0,0,0));
 
@@ -87,15 +88,18 @@
         // audioMarkersFromNamedTrackpoints
         audioMarkersFromNamedTrackpoints.setSelected(Main.pref.getBoolean("marker.audiofromnamedtrackpoints", false));
-        audioMarkersFromNamedTrackpoints.setToolTipText(tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
+        audioMarkersFromNamedTrackpoints.setToolTipText(
+                tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
         audio.add(audioMarkersFromNamedTrackpoints, GBC.eol().insets(10,0,0,0));
 
         // audioMarkersFromWavTimestamps
         audioMarkersFromWavTimestamps.setSelected(Main.pref.getBoolean("marker.audiofromwavtimestamps", false));
-        audioMarkersFromWavTimestamps.setToolTipText(tr("Create audio markers at the position on the track corresponding to the modified time of each audio WAV file imported."));
+        audioMarkersFromWavTimestamps.setToolTipText(
+                tr("Create audio markers at the position on the track corresponding to the modified time of each audio WAV file imported."));
         audio.add(audioMarkersFromWavTimestamps, GBC.eol().insets(10,0,0,0));
 
         // audioMarkersFromStart
         audioMarkersFromStart.setSelected(Main.pref.getBoolean("marker.audiofromstart"));
-        audioMarkersFromStart.setToolTipText(tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
+        audioMarkersFromStart.setToolTipText(
+                tr("Automatically create audio markers from trackpoints (rather than explicit waypoints) with names or descriptions."));
         audio.add(audioMarkersFromStart, GBC.eol().insets(10,0,0,0));
 
@@ -111,5 +115,6 @@
 
         audioLeadIn.setText(Main.pref.get("audio.leadin", "1.0"));
-        audioLeadIn.setToolTipText(tr("Playback starts this number of seconds before (or after, if negative) the audio track position requested"));
+        audioLeadIn.setToolTipText(
+                tr("Playback starts this number of seconds before (or after, if negative) the audio track position requested"));
         audio.add(new JLabel(tr("Lead-in time (seconds)")), GBC.std());
         audio.add(audioLeadIn, GBC.eol().fill(GBC.HORIZONTAL).insets(5,0,0,5));
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/DisplayPreference.java	(revision 8509)
@@ -29,5 +29,6 @@
 
     private DisplayPreference() {
-        super(/* ICON(preferences/) */ "display", tr("Display Settings"), tr("Various settings that influence the visual representation of the whole program."), false, new JTabbedPane());
+        super(/* ICON(preferences/) */ "display", tr("Display Settings"),
+                tr("Various settings that influence the visual representation of the whole program."), false, new JTabbedPane());
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java	(revision 8509)
@@ -247,5 +247,6 @@
         colorTypeVelocity.setToolTipText(tr("Colors points and track segments by velocity."));
         colorTypeDirection.setToolTipText(tr("Colors points and track segments by direction."));
-        colorTypeDilution.setToolTipText(tr("Colors points and track segments by dilution of position (HDOP). Your capture device needs to log that information."));
+        colorTypeDilution.setToolTipText(
+                tr("Colors points and track segments by dilution of position (HDOP). Your capture device needs to log that information."));
         colorTypeTime.setToolTipText(tr("Colors points and track segments by its timestamp."));
 
@@ -476,5 +477,6 @@
             parser.parse();
         } catch (ParseError e) {
-            JOptionPane.showMessageDialog(Main.parent, tr("Incorrect waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
+            JOptionPane.showMessageDialog(Main.parent,
+                    tr("Incorrect waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
             waypointLabelPattern.requestFocus();
             return false;
@@ -484,5 +486,6 @@
             parser.parse();
         } catch (ParseError e) {
-            JOptionPane.showMessageDialog(Main.parent, tr("Incorrect audio waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
+            JOptionPane.showMessageDialog(Main.parent,
+                    tr("Incorrect audio waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
             audioWaypointLabelPattern.requestFocus();
             return false;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/MapPreference.java	(revision 8509)
@@ -28,5 +28,6 @@
 
     private MapPreference() {
-        super(/* ICON(preferences/) */ "map", tr("Map Settings"), tr("Settings for the map projection and data interpretation."), false, new JTabbedPane());
+        super(/* ICON(preferences/) */ "map", tr("Map Settings"),
+                tr("Settings for the map projection and data interpretation."), false, new JTabbedPane());
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java	(revision 8509)
@@ -43,35 +43,5 @@
 public final class TaggingPresetPreference implements SubPreferenceSetting {
 
-    /**
-     * Factory used to create a new {@code TaggingPresetPreference}.
-     */
-    public static class Factory implements PreferenceSettingFactory {
-        @Override
-        public PreferenceSetting createPreferenceSetting() {
-            return new TaggingPresetPreference();
-        }
-    }
-
-    private TaggingPresetPreference() {
-        super();
-    }
-
-    private static final List<SourceProvider> presetSourceProviders = new ArrayList<>();
-
-    private SourceEditor sources;
-    private JCheckBox sortMenu;
-
-    /**
-     * Registers a new additional preset source provider.
-     * @param provider The preset source provider
-     * @return {@code true}, if the provider has been added, {@code false} otherwise
-     */
-    public static boolean registerSourceProvider(SourceProvider provider) {
-        if (provider != null)
-            return presetSourceProviders.add(provider);
-        return false;
-    }
-
-    private ValidationListener validationListener = new ValidationListener() {
+    private final class TaggingPresetValidationListener implements ValidationListener {
         @Override
         public boolean validatePreferences() {
@@ -134,5 +104,4 @@
                                         source, e.getMessage());
                             }
-
                         }
 
@@ -155,8 +124,41 @@
                 sources.removeSources(sourcesToRemove);
                 return true;
-            }  else
+            }  else {
                 return true;
-        }
-    };
+            }
+        }
+    }
+
+    /**
+     * Factory used to create a new {@code TaggingPresetPreference}.
+     */
+    public static class Factory implements PreferenceSettingFactory {
+        @Override
+        public PreferenceSetting createPreferenceSetting() {
+            return new TaggingPresetPreference();
+        }
+    }
+
+    private TaggingPresetPreference() {
+        super();
+    }
+
+    private static final List<SourceProvider> presetSourceProviders = new ArrayList<>();
+
+    private SourceEditor sources;
+    private JCheckBox sortMenu;
+
+    /**
+     * Registers a new additional preset source provider.
+     * @param provider The preset source provider
+     * @return {@code true}, if the provider has been added, {@code false} otherwise
+     */
+    public static boolean registerSourceProvider(SourceProvider provider) {
+        if (provider != null)
+            return presetSourceProviders.add(provider);
+        return false;
+    }
+
+    private final ValidationListener validationListener = new TaggingPresetValidationListener();
 
     @Override
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java	(revision 8509)
@@ -82,5 +82,6 @@
         bgVersionBasedUpdatePolicy.add(btn);
 
-        JMultilineLabel lbl = new JMultilineLabel(tr("Please decide whether JOSM shall automatically update active plugins at startup after an update of JOSM itself."));
+        JMultilineLabel lbl = new JMultilineLabel(
+                tr("Please decide whether JOSM shall automatically update active plugins at startup after an update of JOSM itself."));
         gc.gridy=0;
         pnl.add(lbl, gc);
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/remotecontrol/RemoteControlPreference.java	(revision 8509)
@@ -88,5 +88,6 @@
         remote.add(descLabel, GBC.eol().insets(5, 5, 0, 10).fill(GBC.HORIZONTAL));
 
-        final JLabel portLabel = new JLabel("<html>" + tr("JOSM will always listen at <b>port {0}</b> (http) and <b>port {1}</b> (https) on localhost."
+        final JLabel portLabel = new JLabel("<html>"
+                + tr("JOSM will always listen at <b>port {0}</b> (http) and <b>port {1}</b> (https) on localhost."
                 + "<br>These ports are not configurable because they are referenced by external applications talking to JOSM.",
                 Main.pref.get("remote.control.port", "8111"),
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferencesPanel.java	(revision 8509)
@@ -124,5 +124,6 @@
             rbOAuth.setSelected(true);
         } else {
-            Main.warn(tr("Unsupported value in preference ''{0}'', got ''{1}''. Using authentication method ''Basic Authentication''.", "osm-server.auth-method", authMethod));
+            Main.warn(tr("Unsupported value in preference ''{0}'', got ''{1}''. Using authentication method ''Basic Authentication''.",
+                    "osm-server.auth-method", authMethod));
             rbBasicAuthentication.setSelected(true);
         }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/OAuthAuthenticationPreferencesPanel.java	(revision 8509)
@@ -180,4 +180,11 @@
      */
     private class NotYetAuthorisedPanel extends JPanel {
+        /**
+         * Constructs a new {@code NotYetAuthorisedPanel}.
+         */
+        public NotYetAuthorisedPanel() {
+            build();
+        }
+
         protected void build() {
             setLayout(new GridBagLayout());
@@ -190,5 +197,6 @@
             gc.weightx = 1.0;
             JMultilineLabel lbl;
-            add(lbl = new JMultilineLabel(tr("You do not have an Access Token yet to access the OSM server using OAuth. Please authorize first.")), gc);
+            add(lbl = new JMultilineLabel(
+                    tr("You do not have an Access Token yet to access the OSM server using OAuth. Please authorize first.")), gc);
             lbl.setFont(lbl.getFont().deriveFont(Font.PLAIN));
 
@@ -205,8 +213,4 @@
             gc.weighty = 1.0;
             add(new JPanel(), gc);
-        }
-
-        public NotYetAuthorisedPanel() {
-            build();
         }
     }
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreference.java	(revision 8509)
@@ -35,5 +35,6 @@
 
     private ServerAccessPreference() {
-        super(/* ICON(preferences/) */ "connection", tr("Connection Settings"), tr("Connection Settings for the OSM server."), false, new JTabbedPane());
+        super(/* ICON(preferences/) */ "connection", tr("Connection Settings"),
+                tr("Connection Settings for the OSM server."), false, new JTabbedPane());
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/validator/ValidatorTestsPreference.java	(revision 8509)
@@ -70,5 +70,6 @@
         testPanel.add(prefOther, GBC.eol());
 
-        prefOtherUpload = new JCheckBox(tr("Show informational level on upload."), Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false));
+        prefOtherUpload = new JCheckBox(tr("Show informational level on upload."),
+                Main.pref.getBoolean(ValidatorPreference.PREF_OTHER_UPLOAD, false));
         prefOtherUpload.setToolTipText(tr("Show the informational tests in the upload check windows."));
         testPanel.add(prefOtherUpload, GBC.eol());
Index: /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 8509)
@@ -28,5 +28,6 @@
         void setCurrentAction(String text);
         void setIndeterminate(boolean newValue);
-        void appendLogMessage(String message); //TODO Not implemented properly in background monitor, log message will get lost if progress runs in background
+        // TODO Not implemented properly in background monitor, log message will get lost if progress runs in background
+        void appendLogMessage(String message);
     }
 
@@ -47,5 +48,6 @@
 
     private void doInEDT(Runnable runnable) {
-        // This must be invoke later even if current thread is EDT because inside there is dialog.setVisible which freeze current code flow until modal dialog is closed
+        // This must be invoke later even if current thread is EDT because inside there is dialog.setVisible
+        // which freeze current code flow until modal dialog is closed
         SwingUtilities.invokeLater(runnable);
     }
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 8509)
@@ -489,5 +489,6 @@
     }
 
-    public static Collection<TaggingPreset> getMatchingPresets(final Collection<TaggingPresetType> t, final Map<String, String> tags, final boolean onlyShowable) {
+    public static Collection<TaggingPreset> getMatchingPresets(final Collection<TaggingPresetType> t,
+            final Map<String, String> tags, final boolean onlyShowable) {
         return Utils.filter(TaggingPresets.getTaggingPresets(), new Predicate<TaggingPreset>() {
             @Override
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetItems.java	(revision 8509)
@@ -1107,10 +1107,12 @@
 
             if (display_array.length != value_array.length) {
-                Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''display_values'' must be the same as in ''values''", key, text));
+                Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''display_values'' must be the same as in ''values''",
+                                key, text));
                 display_array = value_array;
             }
 
             if (short_descriptions_array != null && short_descriptions_array.length != value_array.length) {
-                Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''short_descriptions'' must be the same as in ''values''", key, text));
+                Main.error(tr("Broken tagging preset \"{0}-{1}\" - number of items in ''short_descriptions'' must be the same as in ''values''",
+                                key, text));
                 short_descriptions_array = null;
             }
@@ -1200,13 +1202,9 @@
         private static final ListCellRenderer<PresetListEntry> RENDERER = new ListCellRenderer<PresetListEntry>() {
 
-            private JLabel lbl = new JLabel();
+            private final JLabel lbl = new JLabel();
 
             @Override
-            public Component getListCellRendererComponent(
-                    JList<? extends PresetListEntry> list,
-                    PresetListEntry item,
-                    int index,
-                    boolean isSelected,
-                    boolean cellHasFocus) {
+            public Component getListCellRendererComponent(JList<? extends PresetListEntry> list, PresetListEntry item, int index,
+                    boolean isSelected, boolean cellHasFocus) {
 
                 // Only return cached size, item is not shown
@@ -1221,5 +1219,4 @@
 
                 lbl.setPreferredSize(null);
-
 
                 if (isSelected) {
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetSelector.java	(revision 8509)
@@ -89,5 +89,6 @@
         private final DefaultListCellRenderer def = new DefaultListCellRenderer();
         @Override
-        public Component getListCellRendererComponent(JList<? extends TaggingPreset> list, TaggingPreset tp, int index, boolean isSelected, boolean cellHasFocus) {
+        public Component getListCellRendererComponent(JList<? extends TaggingPreset> list, TaggingPreset tp, int index,
+                boolean isSelected, boolean cellHasFocus) {
             JLabel result = (JLabel) def.getListCellRendererComponent(list, tp, index, isSelected, cellHasFocus);
             result.setText(tp.getName());
Index: /trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/util/AdjustmentSynchronizer.java	(revision 8509)
@@ -79,5 +79,6 @@
         CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable");
         if (!synchronizedAdjustables.contains(adjustable))
-            throw new IllegalStateException(tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable));
+            throw new IllegalStateException(
+                    tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable));
 
         enabledMap.put(adjustable, isParticipating);
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/EditableList.java	(revision 8509)
@@ -101,5 +101,6 @@
             public void actionPerformed(ActionEvent e) {
                 if (sourcesList.getSelectedIndex() == -1) {
-                    JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to delete."), tr("Information"), JOptionPane.QUESTION_MESSAGE);
+                    JOptionPane.showMessageDialog(Main.parent, tr("Please select the row to delete."), tr("Information"),
+                            JOptionPane.QUESTION_MESSAGE);
                 } else {
                     ((DefaultListModel<String>) sourcesList.getModel()).remove(sourcesList.getSelectedIndex());
Index: /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/gui/widgets/JosmTextField.java	(revision 8509)
@@ -22,5 +22,5 @@
  * <li>disables the global advanced key press detector when focused</li>
  * <li>implements a workaround to <a href="https://bugs.openjdk.java.net/browse/JDK-6322854">JDK bug 6322854</a></li>
- * <br>This class must be used everywhere in core and plugins instead of {@code JTextField}.
+ * </ul><br>This class must be used everywhere in core and plugins instead of {@code JTextField}.
  * @since 5886
  */
Index: /trunk/src/org/openstreetmap/josm/io/CachedFile.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/CachedFile.java	(revision 8509)
@@ -461,5 +461,6 @@
      * @since 6867
      */
-    public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince) throws MalformedURLException, IOException {
+    public static HttpURLConnection connectFollowingRedirect(URL downloadUrl, String httpAccept, Long ifModifiedSince)
+            throws MalformedURLException, IOException {
         CheckParameterUtil.ensureParameterNotNull(downloadUrl, "downloadUrl");
         String downloadString = downloadUrl.toExternalForm();
Index: /trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java	(revision 8509)
@@ -116,5 +116,6 @@
             proxyPolicy = ProxyPolicy.fromName(value);
             if (proxyPolicy == null) {
-                Main.warn(tr("Unexpected value for preference ''{0}'' found. Got ''{1}''. Will use no proxy.", ProxyPreferencesPanel.PROXY_POLICY, value));
+                Main.warn(tr("Unexpected value for preference ''{0}'' found. Got ''{1}''. Will use no proxy.",
+                        ProxyPreferencesPanel.PROXY_POLICY, value));
                 proxyPolicy = ProxyPolicy.NO_PROXY;
             }
Index: /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/MessageNotifier.java	(revision 8509)
@@ -59,5 +59,6 @@
         public void run() {
             try {
-                final UserInfo userInfo = new OsmServerUserInfoReader().fetchUserInfo(NullProgressMonitor.INSTANCE, tr("get number of unread messages"));
+                final UserInfo userInfo = new OsmServerUserInfoReader().fetchUserInfo(NullProgressMonitor.INSTANCE,
+                        tr("get number of unread messages"));
                 final int unread = userInfo.getUnreadMessages();
                 if (unread > 0 && unread != lastUnreadCount) {
@@ -66,6 +67,8 @@
                         public void run() {
                             JPanel panel = new JPanel(new GridBagLayout());
-                            panel.add(new JLabel(trn("You have {0} unread message.", "You have {0} unread messages.", unread, unread)), GBC.eol());
-                            panel.add(new UrlLabel(Main.getBaseUserUrl() + "/"+userInfo.getDisplayName()+"/inbox", tr("Click here to see your inbox.")), GBC.eol());
+                            panel.add(new JLabel(trn("You have {0} unread message.", "You have {0} unread messages.", unread, unread)),
+                                    GBC.eol());
+                            panel.add(new UrlLabel(Main.getBaseUserUrl() + "/" + userInfo.getDisplayName() + "/inbox",
+                                    tr("Click here to see your inbox.")), GBC.eol());
                             panel.setOpaque(false);
                             new Notification().setContent(panel)
Index: /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/MultiFetchServerObjectReader.java	(revision 8509)
@@ -109,5 +109,6 @@
      * @param ds  the dataset (must not be null)
      * @param id  the primitive id
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+     * {@link OsmPrimitiveType#RELATION RELATION}
      * @throws IllegalArgumentException if ds is null
      * @throws NoSuchElementException if ds does not include an {@link OsmPrimitive} with id=<code>id</code>
@@ -128,5 +129,6 @@
      * @param ds the {@link DataSet} to which the primitive belongs
      * @param id the primitive id
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+     * {@link OsmPrimitiveType#RELATION RELATION}
      * @return this
      */
@@ -258,5 +260,6 @@
      * builds the Multi Get request string for a set of ids and a given {@link OsmPrimitiveType}.
      *
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+     * {@link OsmPrimitiveType#RELATION RELATION}
      * @param idPackage  the package of ids
      * @return the request string
@@ -280,5 +283,6 @@
      * builds the Multi Get request string for a single id and a given {@link OsmPrimitiveType}.
      *
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+     * {@link OsmPrimitiveType#RELATION RELATION}
      * @param id the id
      * @return the request string
@@ -318,5 +322,6 @@
      *
      * @param ids the set of ids
-     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+     * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+     * {@link OsmPrimitiveType#RELATION RELATION}
      * @throws OsmTransferException if an error occurs while communicating with the API server
      */
@@ -443,5 +448,6 @@
 
     /**
-     * The class that actually download data from OSM API. Several instances of this class are used by {@link MultiFetchServerObjectReader} (one per set of primitives to fetch).
+     * The class that actually download data from OSM API.
+     * Several instances of this class are used by {@link MultiFetchServerObjectReader} (one per set of primitives to fetch).
      * The inheritance of {@link OsmServerReader} is only explained by the need to have a distinct OSM connection by {@code Fetcher} instance.
      * @see FetchResult
@@ -455,5 +461,6 @@
         /**
          * Constructs a {@code Fetcher}
-         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+         * {@link OsmPrimitiveType#RELATION RELATION}
          * @param idsPackage The set of primitives ids to fetch
          * @param progressMonitor The progress monitor
@@ -467,5 +474,6 @@
         @Override
         public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException {
-            // This method is implemented because of the OsmServerReader inheritance, but not used, as the main target of this class is the call() method.
+            // This method is implemented because of the OsmServerReader inheritance, but not used,
+            // as the main target of this class is the call() method.
             return fetch(progressMonitor).dataSet;
         }
@@ -499,5 +507,6 @@
          * The retrieved primitives are merged to {@link #outputDataSet}.
          *
-         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+         * {@link OsmPrimitiveType#RELATION RELATION}
          * @param pkg the package of ids
          * @return the {@link FetchResult} of this operation
@@ -525,5 +534,6 @@
          * The retrieved primitive is merged to {@link #outputDataSet}.
          *
-         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+         * {@link OsmPrimitiveType#RELATION RELATION}
          * @param id the id
          * @return the {@link DataSet} resulting of this operation
@@ -555,5 +565,6 @@
          * Unfortunately, the server does not provide an error header or an error body for a 404 reply.
          *
-         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY}, {@link OsmPrimitiveType#RELATION RELATION}
+         * @param type The primitive type. Must be one of {@link OsmPrimitiveType#NODE NODE}, {@link OsmPrimitiveType#WAY WAY},
+         * {@link OsmPrimitiveType#RELATION RELATION}
          * @param pkg the set of ids
          * @return the {@link FetchResult} of this operation
Index: /trunk/src/org/openstreetmap/josm/io/OsmApiException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmApiException.java	(revision 8509)
@@ -16,5 +16,6 @@
     /**
      * Constructs an {@code OsmApiException} with the specified response code, error header and error body
-     * @param responseCode The HTTP response code replied by the OSM server. See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
+     * @param responseCode The HTTP response code replied by the OSM server.
+     * See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
      * @param errorHeader The error header, as transmitted in the {@code Error} field of the HTTP response header
      * @param errorBody The error body, as transmitted in the HTTP response body
@@ -31,5 +32,6 @@
     /**
      * Constructs an {@code OsmApiException} with the specified response code, error header and error body
-     * @param responseCode The HTTP response code replied by the OSM server. See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
+     * @param responseCode The HTTP response code replied by the OSM server.
+     * See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
      * @param errorHeader The error header, as transmitted in the {@code Error} field of the HTTP response header
      * @param errorBody The error body, as transmitted in the HTTP response body
@@ -78,5 +80,6 @@
     /**
      * Replies the HTTP response code.
-     * @return The HTTP response code replied by the OSM server. Refer to <a href="http://wiki.openstreetmap.org/wiki/API_v0.6">OSM API</a> to see the list of response codes returned by the API for each call.
+     * @return The HTTP response code replied by the OSM server. Refer to
+     * <a href="http://wiki.openstreetmap.org/wiki/API_v0.6">OSM API</a> to see the list of response codes returned by the API for each call.
      */
     public int getResponseCode() {
@@ -86,5 +89,6 @@
     /**
      * Sets the HTTP response code.
-     * @param responseCode The HTTP response code replied by the OSM server. See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
+     * @param responseCode The HTTP response code replied by the OSM server.
+     * See {@link java.net.HttpURLConnection HttpURLConnection} for predefined HTTP response code values
      */
     public void setResponseCode(int responseCode) {
@@ -175,5 +179,6 @@
 
     /**
-     * Sets the complete URL accessed when this error occured. This is distinct from the one set with {@link #setUrl}, which is generally only the base URL of the server.
+     * Sets the complete URL accessed when this error occured.
+     * This is distinct from the one set with {@link #setUrl}, which is generally only the base URL of the server.
      * @param url the complete URL accessed when this error occured.
      */
@@ -183,5 +188,6 @@
 
     /**
-     * Replies the complete URL accessed when this error occured. This is distinct from the one returned by {@link #getUrl}, which is generally only the base URL of the server.
+     * Replies the complete URL accessed when this error occured.
+     * This is distinct from the one returned by {@link #getUrl}, which is generally only the base URL of the server.
      * @return the complete URL accessed when this error occured.
      */
Index: /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmChangesetParser.java	(revision 8509)
@@ -33,5 +33,6 @@
  * <pre>
  * &lt;osm version="0.6" generator="OpenStreetMap server"&gt;
- *     &lt;changeset id="143" user="guggis" uid="1" created_at="2009-09-08T20:35:39Z" closed_at="2009-09-08T21:36:12Z" open="false" min_lon="7.380925" min_lat="46.9215164" max_lon="7.3984718" max_lat="46.9226502"&gt;
+ *     &lt;changeset id="143" user="guggis" uid="1" created_at="2009-09-08T20:35:39Z" closed_at="2009-09-08T21:36:12Z" open="false"
+ *                min_lon="7.380925" min_lat="46.9215164" max_lon="7.3984718" max_lat="46.9226502"&gt;
  *         &lt;tag k="asdfasdf" v="asdfasdf"/&gt;
  *         &lt;tag k="created_by" v="JOSM/1.5 (UNKNOWN de)"/&gt;
Index: /trunk/src/org/openstreetmap/josm/io/OsmImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmImporter.java	(revision 8509)
@@ -123,5 +123,6 @@
      * @param progressMonitor handler for progress monitoring and canceling
      */
-    public OsmImporterData loadLayer(InputStream in, final File associatedFile, final String layerName, ProgressMonitor progressMonitor) throws IllegalDataException {
+    public OsmImporterData loadLayer(InputStream in, final File associatedFile, final String layerName, ProgressMonitor progressMonitor)
+            throws IllegalDataException {
         final DataSet dataSet = parseDataSet(in, progressMonitor);
         if (dataSet == null) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 8509)
@@ -326,5 +326,6 @@
             type = OsmPrimitiveType.fromApiTypeName(value);
         } catch(IllegalArgumentException e) {
-            throwException(tr("Illegal value for attribute ''type'' on member {0} in relation {1}. Got {2}.", Long.toString(id), Long.toString(r.getUniqueId()), value), e);
+            throwException(tr("Illegal value for attribute ''type'' on member {0} in relation {1}. Got {2}.",
+                    Long.toString(id), Long.toString(r.getUniqueId()), value), e);
         }
         value = parser.getAttributeValue(null, "role");
@@ -627,5 +628,6 @@
             }
             if (e.getLocation() != null)
-                throw new IllegalDataException(tr("Line {0} column {1}: ", e.getLocation().getLineNumber(), e.getLocation().getColumnNumber()) + msg, e);
+                throw new IllegalDataException(tr("Line {0} column {1}: ",
+                        e.getLocation().getLineNumber(), e.getLocation().getColumnNumber()) + msg, e);
             else
                 throw new IllegalDataException(msg, e);
@@ -645,5 +647,5 @@
      *
      * @return the dataset with the parsed data
-     * @throws IllegalDataException if the an error was found while parsing the data from the source
+     * @throws IllegalDataException if an error was found while parsing the data from the source
      * @throws IllegalArgumentException if source is null
      */
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 8509)
@@ -203,5 +203,5 @@
                 for (Relation relation: relationsToCheck) {
                     if (!relation.isNew() && relation.hasIncompleteMembers()) {
-                        OsmServerObjectReader reader = new OsmServerObjectReader(relation.getId(), OsmPrimitiveType.from(relation), true /* read full */);
+                        OsmServerObjectReader reader = new OsmServerObjectReader(relation.getId(), OsmPrimitiveType.from(relation), true);
                         DataSet wayDs = reader.parseOsm(progressMonitor.createSubTaskMonitor(1, false));
                         DataSetMerger visitor = new DataSetMerger(ds, wayDs);
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerReader.java	(revision 8509)
@@ -117,5 +117,6 @@
      */
     @SuppressWarnings("resource")
-    protected InputStream getInputStreamRaw(String urlStr, ProgressMonitor progressMonitor, String reason, boolean uncompressAccordingToContentDisposition) throws OsmTransferException {
+    protected InputStream getInputStreamRaw(String urlStr, ProgressMonitor progressMonitor, String reason,
+            boolean uncompressAccordingToContentDisposition) throws OsmTransferException {
         try {
             OnlineResource.JOSM_WEBSITE.checkOfflineAccess(urlStr, Main.getJOSMWebsite());
@@ -159,5 +160,6 @@
             } catch (Exception e) {
                 Main.error(e);
-                OsmTransferException ote = new OsmTransferException(tr("Could not connect to the OSM server. Please check your internet connection."), e);
+                OsmTransferException ote = new OsmTransferException(
+                        tr("Could not connect to the OSM server. Please check your internet connection."), e);
                 ote.setUrl(url.toString());
                 throw ote;
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 8509)
@@ -84,5 +84,6 @@
      * @throws OsmTransferException if an exception occurs
      */
-    protected void uploadChangesIndividually(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor) throws OsmTransferException {
+    protected void uploadChangesIndividually(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor)
+            throws OsmTransferException {
         try {
             progressMonitor.beginTask(tr("Starting to upload with one request per primitive ..."));
@@ -126,5 +127,6 @@
      * @throws OsmTransferException if an exception occurs
      */
-    protected void uploadChangesAsDiffUpload(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor) throws OsmTransferException {
+    protected void uploadChangesAsDiffUpload(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor)
+            throws OsmTransferException {
         try {
             progressMonitor.beginTask(tr("Starting to upload in one request ..."));
@@ -146,5 +148,6 @@
      * @throws OsmTransferException if an exception occurs
      */
-    protected void uploadChangesInChunks(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor, int chunkSize) throws OsmTransferException, IllegalArgumentException {
+    protected void uploadChangesInChunks(Collection<? extends OsmPrimitive> primitives, ProgressMonitor progressMonitor, int chunkSize)
+            throws OsmTransferException, IllegalArgumentException {
         if (chunkSize <=0)
             throw new IllegalArgumentException(tr("Value >0 expected for parameter ''{0}'', got {1}", "chunkSize", chunkSize));
Index: /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgent.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgent.java	(revision 8509)
@@ -53,5 +53,6 @@
 
      */
-    CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse) throws CredentialsAgentException;
+    CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse)
+            throws CredentialsAgentException;
 
     /**
Index: /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentResponse.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentResponse.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentResponse.java	(revision 8509)
@@ -5,5 +5,6 @@
 
 /**
- * CredentialsAgentResponse represents the response from {@link CredentialsAgent#getCredentials(java.net.Authenticator.RequestorType, String, boolean)}.
+ * CredentialsAgentResponse represents the response from
+ * {@link CredentialsAgent#getCredentials(java.net.Authenticator.RequestorType, String, boolean)}.
  *
  * The response consists of the username and the password the requested credentials consists of.
Index: /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/auth/CredentialsManager.java	(revision 8509)
@@ -126,5 +126,6 @@
 
     @Override
-    public CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse) throws CredentialsAgentException {
+    public CredentialsAgentResponse getCredentials(RequestorType requestorType, String host, boolean noSuccessWithLastResponse)
+            throws CredentialsAgentException {
         return delegate.getCredentials(requestorType, host, noSuccessWithLastResponse);
     }
Index: /trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/auth/JosmPreferencesCredentialAgent.java	(revision 8509)
@@ -131,5 +131,6 @@
         HtmlPanel pnlMessage = new HtmlPanel();
         HTMLEditorKit kit = (HTMLEditorKit)pnlMessage.getEditorPane().getEditorKit();
-        kit.getStyleSheet().addRule(".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
+        kit.getStyleSheet().addRule(
+                ".warning-body {background-color:rgb(253,255,221);padding: 10pt; border-color:rgb(128,128,128);border-style: solid;border-width: 1px;}");
         pnlMessage.setText(
                 tr(
@@ -150,4 +151,3 @@
         return tr("Save user and password (unencrypted)");
     }
-
 }
Index: /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java	(revision 8509)
@@ -217,5 +217,6 @@
     static boolean isImageFormatSupported(final String format) {
         return ImageIO.getImageReadersByMIMEType(format).hasNext()
-                || (format.startsWith("image/tiff") || format.startsWith("image/geotiff")) && ImageIO.getImageReadersBySuffix("tiff").hasNext() // handles image/tiff image/tiff8 image/geotiff image/geotiff8
+                // handles image/tiff image/tiff8 image/geotiff image/geotiff8
+                || (format.startsWith("image/tiff") || format.startsWith("image/geotiff")) && ImageIO.getImageReadersBySuffix("tiff").hasNext()
                 || format.startsWith("image/png") && ImageIO.getImageReadersBySuffix("png").hasNext()
                 || format.startsWith("image/svg") && ImageIO.getImageReadersBySuffix("svg").hasNext()
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/AddTagsDialog.java	(revision 8509)
@@ -228,5 +228,6 @@
 
     /**
-     * If you click the "Add tags" button build a ChangePropertyCommand for every key that has a checked checkbox to apply the key value pair to all selected osm objects.
+     * If you click the "Add tags" button build a ChangePropertyCommand for every key that has a checked checkbox
+     * to apply the key value pair to all selected osm objects.
      * You get a entry for every key in the command queue.
      */
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandler.java	(revision 8509)
@@ -133,5 +133,6 @@
     @Override
     public String[] getUsageExamples() {
-        final String types = Utils.join("|", Utils.transform(Arrays.asList(ImageryInfo.ImageryType.values()), new Utils.Function<ImageryInfo.ImageryType, String>() {
+        final String types = Utils.join("|", Utils.transform(Arrays.asList(ImageryInfo.ImageryType.values()),
+                new Utils.Function<ImageryInfo.ImageryType, String>() {
             @Override
             public String apply(ImageryInfo.ImageryType x) {
Index: /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java	(revision 8509)
@@ -138,5 +138,6 @@
                         Main.info("RemoteControl: no download necessary");
                     } else {
-                        Future<?> future = osmTask.download(newLayer, new Bounds(minlat,minlon,maxlat,maxlon), null /* let the task manage the progress monitor */);
+                        Future<?> future = osmTask.download(newLayer, new Bounds(minlat,minlon,maxlat,maxlon),
+                                null /* let the task manage the progress monitor */);
                         Main.worker.submit(new PostDownloadHandler(osmTask, future));
                     }
Index: /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/session/MarkerSessionImporter.java	(revision 8509)
@@ -41,5 +41,6 @@
 
             try (InputStream in = support.getInputStream(fileStr)) {
-                GpxImporter.GpxImporterData importData = GpxImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(), null, progressMonitor);
+                GpxImporter.GpxImporterData importData = GpxImporter.loadLayers(in, support.getFile(fileStr), support.getLayerName(),
+                        null, progressMonitor);
 
                 support.addPostLayersTask(importData.getPostLayerTask());
Index: /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 8509)
@@ -593,5 +593,6 @@
     }
 
-    private void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor) throws IOException, IllegalDataException {
+    private void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor)
+            throws IOException, IllegalDataException {
 
         this.sessionFileURI = sessionFileURI;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8509)
@@ -614,5 +614,6 @@
      * @since 5601
      */
-    public static boolean checkRequiredPluginsPreconditions(Component parent, Collection<PluginInformation> plugins, PluginInformation plugin, boolean local) {
+    public static boolean checkRequiredPluginsPreconditions(Component parent, Collection<PluginInformation> plugins,
+            PluginInformation plugin, boolean local) {
 
         String requires = local ? plugin.localrequires : plugin.requires;
@@ -1173,5 +1174,6 @@
             if (plugin.exists() && !plugin.delete() && dowarn) {
                 Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
-                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
+                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.",
+                        pluginName));
                 continue;
             }
@@ -1181,5 +1183,6 @@
             } catch (Exception e) {
                 if (dowarn) {
-                    Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}", plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()));
+                    Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}",
+                            plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()));
                 }
                 continue;
@@ -1187,6 +1190,8 @@
             // Install plugin
             if (!updatedPlugin.renameTo(plugin) && dowarn) {
-                Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. Renaming failed.", plugin.toString(), updatedPlugin.toString()));
-                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
+                Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. Renaming failed.",
+                        plugin.toString(), updatedPlugin.toString()));
+                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.",
+                        pluginName));
             }
         }
Index: /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 8509)
@@ -221,5 +221,6 @@
     }
 
-    private void displayErrorMessage(final ProgressMonitor monitor, final String msg, final String details, final String title, final String firstMessage) {
+    private void displayErrorMessage(final ProgressMonitor monitor, final String msg, final String details, final String title,
+            final String firstMessage) {
         GuiHelper.runInEDTAndWait(new Runnable() {
             @Override public void run() {
@@ -255,5 +256,6 @@
         File pluginDir = Main.pref.getPluginsDirectory();
         if (!pluginDir.exists() && !pluginDir.mkdirs()) {
-            Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site));
+            Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.",
+                    pluginDir.toString(), site));
         }
         File cacheFile = createSiteCacheFile(pluginDir, site);
Index: /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 8509)
@@ -48,6 +48,89 @@
     private static class BugReporterThread extends Thread {
 
+        private final class BugReporterWorker implements Runnable {
+            private final PluginDownloadTask pluginDownloadTask;
+
+            private BugReporterWorker(PluginDownloadTask pluginDownloadTask) {
+                this.pluginDownloadTask = pluginDownloadTask;
+            }
+
+            @Override
+            public void run() {
+                // Then ask for submitting a bug report, for exceptions thrown from a plugin too, unless updated to a new version
+                if (pluginDownloadTask == null) {
+                    String[] buttonTexts = new String[] {tr("Do nothing"), tr("Report Bug")};
+                    String[] buttonIcons = new String[] {"cancel", "bug"};
+                    int defaultButtonIdx = 1;
+                    String message = tr("An unexpected exception occurred.<br>" +
+                            "This is always a coding error. If you are running the latest<br>" +
+                            "version of JOSM, please consider being kind and file a bug report."
+                            );
+                    // Check user is running current tested version, the error may already be fixed
+                    int josmVersion = Version.getInstance().getVersion();
+                    if (josmVersion != Version.JOSM_UNKNOWN_VERSION) {
+                        try {
+                            int latestVersion = Integer.parseInt(new WikiReader().
+                                    read(Main.getJOSMWebsite()+"/wiki/TestedVersion?format=txt").trim());
+                            if (latestVersion > josmVersion) {
+                                buttonTexts = new String[] {tr("Do nothing"), tr("Update JOSM"), tr("Report Bug")};
+                                buttonIcons = new String[] {"cancel", "download", "bug"};
+                                defaultButtonIdx = 2;
+                                message = tr("An unexpected exception occurred. This is always a coding error.<br><br>" +
+                                        "However, you are running an old version of JOSM ({0}),<br>" +
+                                        "instead of using the current tested version (<b>{1}</b>).<br><br>"+
+                                        "<b>Please update JOSM</b> before considering to file a bug report.",
+                                        String.valueOf(josmVersion), String.valueOf(latestVersion));
+                            }
+                        } catch (IOException | NumberFormatException e) {
+                            Main.warn("Unable to detect latest version of JOSM: "+e.getMessage());
+                        }
+                    }
+                    // Show dialog
+                    ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Unexpected Exception"), buttonTexts);
+                    ed.setButtonIcons(buttonIcons);
+                    ed.setIcon(JOptionPane.ERROR_MESSAGE);
+                    ed.setCancelButton(1);
+                    ed.setDefaultButton(defaultButtonIdx);
+                    JPanel pnl = new JPanel(new GridBagLayout());
+                    pnl.add(new JLabel("<html>" + message + "</html>"), GBC.eol());
+                    JCheckBox cbSuppress = null;
+                    if (exceptionCounter > 1) {
+                        cbSuppress = new JCheckBox(tr("Suppress further error dialogs for this session."));
+                        pnl.add(cbSuppress, GBC.eol());
+                    }
+                    ed.setContent(pnl);
+                    ed.setFocusOnDefaultButton(true);
+                    ed.showDialog();
+                    if (cbSuppress != null && cbSuppress.isSelected()) {
+                        suppressExceptionDialogs = true;
+                    }
+                    if (ed.getValue() <= 1) {
+                        // "Do nothing"
+                        return;
+                    } else if (ed.getValue() < buttonTexts.length) {
+                        // "Update JOSM"
+                        try {
+                            Main.platform.openUrl(Main.getJOSMWebsite());
+                        } catch (IOException e) {
+                            Main.warn("Unable to access JOSM website: "+e.getMessage());
+                        }
+                    } else {
+                        // "Report bug"
+                        askForBugReport(e);
+                    }
+                } else {
+                    // Ask for restart to install new plugin
+                    PluginPreference.notifyDownloadResults(
+                            Main.parent, pluginDownloadTask, !pluginDownloadTask.getDownloadedPlugins().isEmpty());
+                }
+            }
+        }
+
         private final Throwable e;
 
+        /**
+         * Constructs a new {@code BugReporterThread}.
+         * @param t the exception
+         */
         public BugReporterThread(Throwable t) {
             super("Bug Reporter");
@@ -58,78 +141,5 @@
         public void run() {
             // Give the user a chance to deactivate the plugin which threw the exception (if it was thrown from a plugin)
-            final PluginDownloadTask pluginDownloadTask = PluginHandler.updateOrdisablePluginAfterException(e);
-
-            SwingUtilities.invokeLater(new Runnable() {
-                @Override
-                public void run() {
-                    // Then ask for submitting a bug report, for exceptions thrown from a plugin too, unless updated to a new version
-                    if (pluginDownloadTask == null) {
-                        String[] buttonTexts = new String[] {tr("Do nothing"), tr("Report Bug")};
-                        String[] buttonIcons = new String[] {"cancel", "bug"};
-                        int defaultButtonIdx = 1;
-                        String message = tr("An unexpected exception occurred.<br>" +
-                                "This is always a coding error. If you are running the latest<br>" +
-                                "version of JOSM, please consider being kind and file a bug report."
-                                );
-                        // Check user is running current tested version, the error may already be fixed
-                        int josmVersion = Version.getInstance().getVersion();
-                        if (josmVersion != Version.JOSM_UNKNOWN_VERSION) {
-                            try {
-                                int latestVersion = Integer.parseInt(new WikiReader().
-                                        read(Main.getJOSMWebsite()+"/wiki/TestedVersion?format=txt").trim());
-                                if (latestVersion > josmVersion) {
-                                    buttonTexts = new String[] {tr("Do nothing"), tr("Update JOSM"), tr("Report Bug")};
-                                    buttonIcons = new String[] {"cancel", "download", "bug"};
-                                    defaultButtonIdx = 2;
-                                    message = tr("An unexpected exception occurred. This is always a coding error.<br><br>" +
-                                            "However, you are running an old version of JOSM ({0}),<br>" +
-                                            "instead of using the current tested version (<b>{1}</b>).<br><br>"+
-                                            "<b>Please update JOSM</b> before considering to file a bug report.",
-                                            String.valueOf(josmVersion), String.valueOf(latestVersion));
-                                }
-                            } catch (IOException | NumberFormatException e) {
-                                Main.warn("Unable to detect latest version of JOSM: "+e.getMessage());
-                            }
-                        }
-                        // Show dialog
-                        ExtendedDialog ed = new ExtendedDialog(Main.parent, tr("Unexpected Exception"), buttonTexts);
-                        ed.setButtonIcons(buttonIcons);
-                        ed.setIcon(JOptionPane.ERROR_MESSAGE);
-                        ed.setCancelButton(1);
-                        ed.setDefaultButton(defaultButtonIdx);
-                        JPanel pnl = new JPanel(new GridBagLayout());
-                        pnl.add(new JLabel("<html>" + message + "</html>"), GBC.eol());
-                        JCheckBox cbSuppress = null;
-                        if (exceptionCounter > 1) {
-                            cbSuppress = new JCheckBox(tr("Suppress further error dialogs for this session."));
-                            pnl.add(cbSuppress, GBC.eol());
-                        }
-                        ed.setContent(pnl);
-                        ed.setFocusOnDefaultButton(true);
-                        ed.showDialog();
-                        if (cbSuppress != null && cbSuppress.isSelected()) {
-                            suppressExceptionDialogs = true;
-                        }
-                        if (ed.getValue() <= 1) {
-                            // "Do nothing"
-                            return;
-                        } else if (ed.getValue() < buttonTexts.length) {
-                            // "Update JOSM"
-                            try {
-                                Main.platform.openUrl(Main.getJOSMWebsite());
-                            } catch (IOException e) {
-                                Main.warn("Unable to access JOSM website: "+e.getMessage());
-                            }
-                        } else {
-                            // "Report bug"
-                            askForBugReport(e);
-                        }
-                    } else {
-                        // Ask for restart to install new plugin
-                        PluginPreference.notifyDownloadResults(
-                                Main.parent, pluginDownloadTask, !pluginDownloadTask.getDownloadedPlugins().isEmpty());
-                    }
-                }
-            });
+            SwingUtilities.invokeLater(new BugReporterWorker(PluginHandler.updateOrdisablePluginAfterException(e)));
         }
     }
Index: /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java	(revision 8509)
@@ -105,5 +105,6 @@
             return Pair.create(n, refs);
         }
-        m = Pattern.compile(".*Way (\\d+) requires the nodes with id in " + ids + ".*").matcher(msg); // ... ", which either do not exist, or are not visible"
+        m = Pattern.compile(".*Way (\\d+) requires the nodes with id in " + ids + ".*").matcher(msg);
+        // ... ", which either do not exist, or are not visible"
         if (m.matches()) {
             OsmPrimitive n = new Way(Long.parseLong(m.group(1)));
Index: /trunk/src/org/openstreetmap/josm/tools/ExifReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/ExifReader.java	(revision 8509)
@@ -83,5 +83,6 @@
      * <li>The 0th row is the visual left-hand side of the image, and the 0th column is the visual bottom.</li></ol>
      * @see <a href="http://www.impulseadventure.com/photo/exif-orientation.html">http://www.impulseadventure.com/photo/exif-orientation.html</a>
-     * @see <a href="http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto">http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto</a>
+     * @see <a href="http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto">
+     * http://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto</a>
      */
     public static Integer readOrientation(File filename) {
@@ -136,5 +137,6 @@
      * Returns the direction of the given JPEG file.
      * @param filename The JPEG file to read
-     * @return The direction of the image when it was captures (in degrees between 0.0 and 359.99), or {@code null} if missing or if {@code dirGps} is null
+     * @return The direction of the image when it was captures (in degrees between 0.0 and 359.99),
+     * or {@code null} if missing or if {@code dirGps} is null
      * @since 6209
      */
@@ -155,5 +157,6 @@
      * Returns the direction of the given EXIF GPS directory.
      * @param dirGps The EXIF GPS directory
-     * @return The direction of the image when it was captures (in degrees between 0.0 and 359.99), or {@code null} if missing or if {@code dirGps} is null
+     * @return The direction of the image when it was captures (in degrees between 0.0 and 359.99),
+     * or {@code null} if missing or if {@code dirGps} is null
      * @since 6209
      */
Index: /trunk/src/org/openstreetmap/josm/tools/Geometry.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/Geometry.java	(revision 8509)
@@ -905,5 +905,6 @@
             if (nodes.size() == 1
                     ? nodeInsidePolygon(nodes.get(0), out.getNodes())
-                    : EnumSet.of(PolygonIntersection.FIRST_INSIDE_SECOND, PolygonIntersection.CROSSING).contains(polygonIntersection(nodes, out.getNodes()))) {
+                    : EnumSet.of(PolygonIntersection.FIRST_INSIDE_SECOND, PolygonIntersection.CROSSING).contains(
+                            polygonIntersection(nodes, out.getNodes()))) {
                 boolean insideInner = false;
                 // If inside an outer, check it is not inside an inner
@@ -920,5 +921,6 @@
                 if (!insideInner) {
                     // Final check using predicate
-                    if (isOuterWayAMatch == null || isOuterWayAMatch.evaluate(out.ways.get(0) /* TODO give a better representation of the outer ring to the predicate */)) {
+                    if (isOuterWayAMatch == null || isOuterWayAMatch.evaluate(out.ways.get(0)
+                            /* TODO give a better representation of the outer ring to the predicate */)) {
                         return true;
                     }
Index: /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/ImageProvider.java	(revision 8509)
@@ -546,5 +546,7 @@
             if (!optional) {
                 String ext = name.indexOf('.') != -1 ? "" : ".???";
-                throw new RuntimeException(tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.", name + ext));
+                throw new RuntimeException(
+                        tr("Fatal: failed to locate image ''{0}''. This is a serious configuration problem. JOSM will stop working.",
+                                name + ext));
             } else {
                 if (!suppressWarnings) {
Index: /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/MultikeyActionsHandler.java	(revision 8509)
@@ -34,4 +34,82 @@
     private Map<MultikeyShortcutAction, MyAction> myActions = new HashMap<>();
 
+    private final class ShowLayersPopupWorker implements Runnable {
+        private final MyAction action;
+
+        private ShowLayersPopupWorker(MyAction action) {
+            this.action = action;
+        }
+
+        @Override
+        public void run() {
+            JPopupMenu layers = new JPopupMenu();
+
+            JMenuItem lbTitle = new JMenuItem((String) action.action.getValue(Action.SHORT_DESCRIPTION));
+            lbTitle.setEnabled(false);
+            JPanel pnTitle = new JPanel();
+            pnTitle.add(lbTitle);
+            layers.add(pnTitle);
+
+            char repeatKey = (char) action.shortcut.getKeyStroke().getKeyCode();
+            boolean repeatKeyUsed = false;
+
+            for (final MultikeyInfo info: action.action.getMultikeyCombinations()) {
+
+                if (info.getShortcut() == repeatKey) {
+                    repeatKeyUsed = true;
+                }
+
+                JMenuItem item = new JMenuItem(formatMenuText(action.shortcut.getKeyStroke(),
+                        String.valueOf(info.getShortcut()), info.getDescription()));
+                item.setMnemonic(info.getShortcut());
+                item.addActionListener(new ActionListener() {
+                    @Override
+                    public void actionPerformed(ActionEvent e) {
+                        action.action.executeMultikeyAction(info.getIndex(), false);
+                    }
+                });
+                layers.add(item);
+            }
+
+            if (!repeatKeyUsed) {
+                MultikeyInfo lastLayer = action.action.getLastMultikeyAction();
+                if (lastLayer != null) {
+                    JMenuItem repeateItem = new JMenuItem(formatMenuText(action.shortcut.getKeyStroke(),
+                            KeyEvent.getKeyText(action.shortcut.getKeyStroke().getKeyCode()),
+                            "Repeat " + lastLayer.getDescription()));
+                    repeateItem.setMnemonic(action.shortcut.getKeyStroke().getKeyCode());
+                    repeateItem.addActionListener(new ActionListener() {
+                        @Override
+                        public void actionPerformed(ActionEvent e) {
+                            action.action.executeMultikeyAction(-1, true);
+                        }
+                    });
+                    layers.add(repeateItem);
+                }
+            }
+            layers.addPopupMenuListener(new PopupMenuListener() {
+
+                @Override
+                public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
+                    // Do nothing
+                }
+
+                @Override
+                public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
+                    Main.map.statusLine.resetHelpText(STATUS_BAR_ID);
+                }
+
+                @Override
+                public void popupMenuCanceled(PopupMenuEvent e) {
+                    // Do nothing
+                }
+            });
+
+            layers.show(Main.parent, Integer.MAX_VALUE, Integer.MAX_VALUE);
+            layers.setLocation(Main.parent.getX() + Main.parent.getWidth() - layers.getWidth(),
+                    Main.parent.getY() + Main.parent.getHeight() - layers.getHeight());
+        }
+    }
+
     private class MyKeyEventDispatcher implements KeyEventDispatcher {
         @Override
@@ -102,5 +180,5 @@
             if (lastTimestamp == MultikeyActionsHandler.this.lastTimestamp &&
                     lastAction == MultikeyActionsHandler.this.lastAction) {
-                showLayersPopup(lastAction);
+                SwingUtilities.invokeLater(new ShowLayersPopupWorker(lastAction));
                 MultikeyActionsHandler.this.lastAction = null;
             }
@@ -112,8 +190,7 @@
     private Timer timer;
 
-
     private MultikeyActionsHandler() {
         KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new MyKeyEventDispatcher());
-        timer =new Timer();
+        timer = new Timer();
     }
 
@@ -132,77 +209,8 @@
 
     private String formatMenuText(KeyStroke keyStroke, String index, String description) {
-        String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + "+" + KeyEvent.getKeyText(keyStroke.getKeyCode()) + "," + index;
+        String shortcutText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers()) + "+"
+                + KeyEvent.getKeyText(keyStroke.getKeyCode()) + "," + index;
 
         return "<html><i>" + shortcutText + "</i>&nbsp;&nbsp;&nbsp;&nbsp;" + description;
-
-    }
-
-    private void showLayersPopup(final MyAction action) {
-        SwingUtilities.invokeLater(new Runnable() {
-            @Override
-            public void run() {
-                JPopupMenu layers = new JPopupMenu();
-
-                JMenuItem lbTitle = new JMenuItem((String) action.action.getValue(Action.SHORT_DESCRIPTION));
-                lbTitle.setEnabled(false);
-                JPanel pnTitle = new JPanel();
-                pnTitle.add(lbTitle);
-                layers.add(pnTitle);
-
-                char repeatKey = (char) action.shortcut.getKeyStroke().getKeyCode();
-                boolean repeatKeyUsed = false;
-
-
-                for (final MultikeyInfo info: action.action.getMultikeyCombinations()) {
-
-                    if (info.getShortcut() == repeatKey) {
-                        repeatKeyUsed = true;
-                    }
-
-                    JMenuItem item = new JMenuItem(formatMenuText(action.shortcut.getKeyStroke(), String.valueOf(info.getShortcut()), info.getDescription()));
-                    item.setMnemonic(info.getShortcut());
-                    item.addActionListener(new ActionListener() {
-                        @Override
-                        public void actionPerformed(ActionEvent e) {
-                            action.action.executeMultikeyAction(info.getIndex(), false);
-                        }
-                    });
-                    layers.add(item);
-                }
-
-                if (!repeatKeyUsed) {
-                    MultikeyInfo lastLayer = action.action.getLastMultikeyAction();
-                    if (lastLayer != null) {
-                        JMenuItem repeateItem = new JMenuItem(formatMenuText(action.shortcut.getKeyStroke(),
-                                KeyEvent.getKeyText(action.shortcut.getKeyStroke().getKeyCode()),
-                                "Repeat " + lastLayer.getDescription()));
-                        repeateItem.setMnemonic(action.shortcut.getKeyStroke().getKeyCode());
-                        repeateItem.addActionListener(new ActionListener() {
-                            @Override
-                            public void actionPerformed(ActionEvent e) {
-                                action.action.executeMultikeyAction(-1, true);
-                            }
-                        });
-                        layers.add(repeateItem);
-                    }
-                }
-                layers.addPopupMenuListener(new PopupMenuListener() {
-
-                    @Override
-                    public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
-
-                    @Override
-                    public void popupMenuWillBecomeInvisible(PopupMenuEvent e) {
-                        Main.map.statusLine.resetHelpText(STATUS_BAR_ID);
-                    }
-
-                    @Override
-                    public void popupMenuCanceled(PopupMenuEvent e) {}
-                });
-
-                layers.show(Main.parent, Integer.MAX_VALUE, Integer.MAX_VALUE);
-                layers.setLocation(Main.parent.getX() + Main.parent.getWidth() - layers.getWidth(), Main.parent.getY() + Main.parent.getHeight() - layers.getHeight());
-            }
-        });
     }
 
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java	(revision 8509)
@@ -132,7 +132,10 @@
         // TODO: Insert system shortcuts here. See Windows and especially OSX to see how to.
         for(int i = KeyEvent.VK_F1; i <= KeyEvent.VK_F12; ++i)
-            Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"), i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
-        Shortcut.registerSystemShortcut("system:reset", tr("reserved"), KeyEvent.VK_DELETE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
-        Shortcut.registerSystemShortcut("system:resetX", tr("reserved"), KeyEvent.VK_BACK_SPACE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
+            Shortcut.registerSystemShortcut("screen:toogle"+i, tr("reserved"),
+                    i, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
+        Shortcut.registerSystemShortcut("system:reset", tr("reserved"),
+                KeyEvent.VK_DELETE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
+        Shortcut.registerSystemShortcut("system:resetX", tr("reserved"),
+                KeyEvent.VK_BACK_SPACE, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK).setAutomatic();
     }
 
@@ -407,5 +410,7 @@
                                 "Oracle", tr("April 2015"))+"</b><br><br>";
                     }
-                    content += "<b>"+tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8")+"</b><br><br>"+
+                    content += "<b>" +
+                            tr("JOSM will soon stop working with this version; we highly recommend you to update to Java {0}.", "8")
+                            + "</b><br><br>" +
                             tr("Would you like to update now ?");
                     ed.setContent(content);
Index: /trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 8509)
@@ -47,5 +47,6 @@
 
     // simple constructor
-    private Shortcut(String shortText, String longText, int requestedKey, int requestedGroup, int assignedKey, int assignedModifier, boolean assignedDefault, boolean assignedUser) {
+    private Shortcut(String shortText, String longText, int requestedKey, int requestedGroup, int assignedKey, int assignedModifier,
+            boolean assignedDefault, boolean assignedUser) {
         this.shortText = shortText;
         this.longText = longText;
@@ -68,6 +69,5 @@
     }
 
-    // a shortcut will be renamed when it is handed out again, because the original name
-    // may be a dummy
+    // a shortcut will be renamed when it is handed out again, because the original name may be a dummy
     private void setLongText(String longText) {
         this.longText = longText;
Index: /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java	(revision 8509)
@@ -133,5 +133,6 @@
         private void setValue(Entry entry, String fieldName, String value) throws SAXException {
             CheckParameterUtil.ensureParameterNotNull(entry, "entry");
-            if ("class".equals(fieldName) || "default".equals(fieldName) || "throw".equals(fieldName) || "new".equals(fieldName) || "null".equals(fieldName)) {
+            if ("class".equals(fieldName) || "default".equals(fieldName) || "throw".equals(fieldName) ||
+                    "new".equals(fieldName) || "null".equals(fieldName)) {
                 fieldName += "_";
             }
Index: /trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java	(revision 8509)
@@ -220,7 +220,11 @@
                 return new OrSet((ContextProvider)lhs, (ContextProvider)rhs);
             else if (lhs instanceof ContextProvider)
-                throw new ParseError(tr("Error in search expression on position {0} - right side of or(|) expression must return set of primitives", searchExpressionPosition));
+                throw new ParseError(
+                        tr("Error in search expression on position {0} - right side of or(|) expression must return set of primitives",
+                                searchExpressionPosition));
             else if (rhs instanceof ContextProvider)
-                throw new ParseError(tr("Error in search expression on position {0} - left side of or(|) expression must return set of primitives", searchExpressionPosition));
+                throw new ParseError(
+                        tr("Error in search expression on position {0} - left side of or(|) expression must return set of primitives",
+                                searchExpressionPosition));
             else
                 return m;
@@ -228,5 +232,7 @@
             Match match = transform(((Not) m).getMatch(), searchExpressionPosition);
             if (match instanceof ContextProvider)
-                throw new ParseError(tr("Error in search expression on position {0} - not(-) cannot be used in this context", searchExpressionPosition));
+                throw new ParseError(
+                        tr("Error in search expression on position {0} - not(-) cannot be used in this context",
+                                searchExpressionPosition));
             else
                 return m;
@@ -238,5 +244,7 @@
         Match m = transform(match, searchExpressionPosition);
         if (!(m instanceof ContextProvider))
-            throw new ParseError(tr("Error in search expression on position {0} - expression must return different then current primitive", searchExpressionPosition));
+            throw new ParseError(
+                    tr("Error in search expression on position {0} - expression must return different then current primitive",
+                            searchExpressionPosition));
         else {
             context = (ContextProvider) m;
Index: /trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java	(revision 8508)
+++ /trunk/src/org/openstreetmap/josm/tools/template_engine/TemplateParser.java	(revision 8509)
@@ -89,5 +89,6 @@
             } else {
                 try {
-                    result.getEntries().add(new SearchExpressionCondition(SearchCompiler.compile(searchExpression.getText(), false, false), condition));
+                    result.getEntries().add(new SearchExpressionCondition(
+                            SearchCompiler.compile(searchExpression.getText(), false, false), condition));
                 } catch (org.openstreetmap.josm.actions.search.SearchCompiler.ParseError e) {
                     throw new ParseError(searchExpression.getPosition(), e);
Index: /trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 8508)
+++ /trunk/test/functional/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergerTest.java	(revision 8509)
@@ -1,10 +1,10 @@
 // License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.conflict.pair.tags;
-
-import org.junit.Ignore;
 
 import java.awt.BorderLayout;
 
 import javax.swing.JFrame;
+
+import org.junit.Ignore;
 
 @Ignore
@@ -27,5 +27,6 @@
         tagMerger.getModel().addItem(new TagMergeItem("key", "myvalue", null));
         tagMerger.getModel().addItem(new TagMergeItem("key", null, "theirvalue"));
-        tagMerger.getModel().addItem(new TagMergeItem("a very long key asdfasdf asdfasdf", "a very long value asdfasdf", "a very long value asdfasdf"));
+        tagMerger.getModel().addItem(new TagMergeItem("a very long key asdfasdf asdfasdf", "a very long value asdfasdf",
+                "a very long value asdfasdf"));
         for (int i=0; i< 50; i++) {
           tagMerger.getModel().addItem(new TagMergeItem("key", "myvalue", "theirvalue"));
Index: /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 8508)
+++ /trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java	(revision 8509)
@@ -114,5 +114,5 @@
      *
      * @param ds the data set
-     * @throws OsmTransferException
+     * @throws OsmTransferException if something goes wrong
      */
     public static void createDataSetOnServer(DataSet ds) throws OsmTransferException {
@@ -125,5 +125,6 @@
         OsmServerWriter writer = new OsmServerWriter();
         Changeset cs = new Changeset();
-        writer.uploadOsm(new UploadStrategySpecification().setStrategy(UploadStrategy.SINGLE_REQUEST_STRATEGY), primitives,cs,NullProgressMonitor.INSTANCE);
+        writer.uploadOsm(new UploadStrategySpecification().setStrategy(UploadStrategy.SINGLE_REQUEST_STRATEGY),
+                primitives, cs, NullProgressMonitor.INSTANCE);
         OsmApi.getOsmApi().closeChangeset(cs, NullProgressMonitor.INSTANCE);
     }
@@ -135,8 +136,8 @@
 
         // don't use atomic upload, the test API server can't cope with large diff uploads
-        //
         Main.pref.put("osm-server.atomic-upload", false);
 
-        File dataSetCacheOutputFile = new File(System.getProperty("java.io.tmpdir"), MultiFetchServerObjectReaderTest.class.getName() + ".dataset");
+        File dataSetCacheOutputFile = new File(System.getProperty("java.io.tmpdir"),
+                MultiFetchServerObjectReaderTest.class.getName() + ".dataset");
 
         String p = System.getProperties().getProperty("useCachedDataset");
@@ -146,8 +147,8 @@
         }
 
-        logger.info(MessageFormat.format("property ''{0}'' not set to true, creating test dataset on the server. property is ''{1}''", "useCachedDataset", p));
+        logger.info(MessageFormat.format(
+                "property ''{0}'' not set to true, creating test dataset on the server. property is ''{1}''", "useCachedDataset", p));
 
         // build and upload the test data set
-        //
         logger.info("creating test data set ....");
         testDataSet = buildTestDataSet();
Index: /trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java
===================================================================
--- /trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 8508)
+++ /trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java	(revision 8509)
@@ -129,5 +129,5 @@
      *
      * @param ds the data set
-     * @throws OsmTransferException
+     * @throws OsmTransferException if something goes wrong
      */
     static public void createDataSetOnServer(APIDataSet ds) throws OsmTransferException, CyclicUploadDependencyException {
@@ -164,5 +164,6 @@
         }
 
-        logger.info(MessageFormat.format("property ''{0}'' not set to true, creating test dataset on the server. property is ''{1}''", "useCachedDataset", p));
+        logger.info(MessageFormat.format(
+                "property ''{0}'' not set to true, creating test dataset on the server. property is ''{1}''", "useCachedDataset", p));
 
         // build and upload the test data set
Index: /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 8509)
@@ -73,5 +73,6 @@
             File f = new File(josmHome);
             if (! f.exists() || ! f.canRead()) {
-                fail(MessageFormat.format("property ''{0}'' points to ''{1}'' which is either not existing ({2}) or not readable ({3}). Current directory is ''{4}''.",
+                fail(MessageFormat.format(
+                        "property ''{0}'' points to ''{1}'' which is either not existing ({2}) or not readable ({3}). Current directory is ''{4}''.",
                         "josm.home", josmHome, f.exists(), f.canRead(), Paths.get("").toAbsolutePath()));
             }
Index: /trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 8509)
@@ -1,3 +1,10 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.actions;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.Collections;
 
 import org.junit.BeforeClass;
@@ -6,10 +13,4 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
-
-import java.util.Arrays;
-import java.util.Collections;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
 
 public class CopyActionTest {
Index: /trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 8509)
@@ -20,5 +20,4 @@
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.corrector.UserCancelException;
 import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -131,8 +130,7 @@
     /**
      * Setup test.
-     * @throws UserCancelException
      */
     @BeforeClass
-    public static void setUp() throws UserCancelException {
+    public static void setUp() {
         JOSMFixture.createUnitTestFixture().init(true);
     }
Index: /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/search/SearchCompilerTest.java	(revision 8509)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.actions.search;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/BoundsTest.java	(revision 8509)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/FilterTest.java	(revision 8509)
@@ -173,5 +173,6 @@
                     foundAtLeastOne = true;
                     if (!osm.get(key).equals(filterCode(osm))) {
-                        failedPrimitives.append(String.format("Object %s. Expected [%s] but was [%s]%n", osm.toString(), osm.get(key), filterCode(osm)));
+                        failedPrimitives.append(String.format(
+                                "Object %s. Expected [%s] but was [%s]%n", osm.toString(), osm.get(key), filterCode(osm)));
                     }
                 }
Index: /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/osm/OsmUtilsTest.java	(revision 8509)
@@ -3,5 +3,6 @@
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertTrue;
 
 import org.junit.BeforeClass;
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 8509)
@@ -30,5 +30,5 @@
     /**
      * create a list of epsg codes and bounds to be used by the perl script
-     * @param args
+     * @param args program main arguments
      */
     public static void main(String[] args) {
Index: /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRegressionTest.java	(revision 8509)
@@ -100,5 +100,6 @@
                 EastNorth en = proj.latlon2eastNorth(new LatLon(lat, lon));
                 LatLon ll2 = proj.eastNorth2latlon(en);
-                out.write(String.format("%s%n  ll  %s %s%n  en  %s %s%n  ll2 %s %s%n", proj.toCode(), lat, lon, en.east(), en.north(), ll2.lat(), ll2.lon()));
+                out.write(String.format(
+                        "%s%n  ll  %s %s%n  en  %s %s%n  ll2 %s %s%n", proj.toCode(), lat, lon, en.east(), en.north(), ll2.lat(), ll2.lon()));
             }
         }
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 8509)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.data.validation.tests;
 
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java	(revision 8509)
@@ -53,6 +53,8 @@
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00,04:00-sunrise; Fr-Sa sunset-sunrise"), isEmpty());
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise"), hasSize(1));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise").get(0).getSeverity(), is(Severity.OTHER));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise").get(0).getPrettifiedValue(), is("Su-Th sunset-24:00,04:00-sunrise; Fr-Sa sunset-sunrise"));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise")
+                .get(0).getSeverity(), is(Severity.OTHER));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise")
+                .get(0).getPrettifiedValue(), is("Su-Th sunset-24:00,04:00-sunrise; Fr-Sa sunset-sunrise"));
     }
 
@@ -67,5 +69,6 @@
         assertThat(errors.get(0).getMessage(), is(key + " - Mo-Tue <--- (Please use the abbreviation \"Tu\" for \"tue\".)"));
         assertThat(errors.get(0).getSeverity(), is(Severity.WARNING));
-        assertThat(errors.get(1).getMessage(), is(key + " - Mo-Tue <--- (This rule is not very explicit because there is no time selector being used."+
+        assertThat(errors.get(1).getMessage(), is(key +
+                " - Mo-Tue <--- (This rule is not very explicit because there is no time selector being used."+
                 " Please add a time selector to this rule or use a comment to make it more explicit.)"));
         assertThat(errors.get(1).getSeverity(), is(Severity.WARNING));
@@ -108,5 +111,6 @@
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "5.00 p.m-11.00 p.m"), hasSize(1));
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "5.00 p.m-11.00 p.m").get(0).getMessage(),
-                is(key + " - 5.00 p <--- (hyphen (-) or open end (+) in time range expected. For working with points in time, the mode for opening_hours.js has to be altered. Maybe wrong tag?)"));
+                is(key + " - 5.00 p <--- (hyphen (-) or open end (+) in time range expected. "
+                       + "For working with points in time, the mode for opening_hours.js has to be altered. Maybe wrong tag?)"));
     }
 
@@ -139,5 +143,6 @@
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getSeverity(), is(Severity.WARNING));
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getMessage(),
-                is(key + " - Mo,Tu 04-17 <--- (Time range without minutes specified. Not very explicit! Please use this syntax instead \"04:00-17:00\".)"));
+                is(key + " - Mo,Tu 04-17 <--- (Time range without minutes specified. "
+                       + "Not very explicit! Please use this syntax instead \"04:00-17:00\".)"));
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getPrettifiedValue(), is("Mo,Tu 04:00-17:00"));
     }
@@ -154,8 +159,12 @@
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Sa 09:00-18:00", OpeningHourTest.CheckMode.BOTH), isEmpty());
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su 09:30; We 19:30", OpeningHourTest.CheckMode.BOTH), isEmpty());
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00", OpeningHourTest.CheckMode.BOTH), isEmpty());
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00", OpeningHourTest.CheckMode.BOTH), hasSize(1));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00", OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00"));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00", OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00"));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00",
+                OpeningHourTest.CheckMode.BOTH), isEmpty());
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00",
+                OpeningHourTest.CheckMode.BOTH), hasSize(1));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00",
+                OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00"));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 0:00-0:30,4:00-00:30; Sa,Su,PH 0:00-24:00",
+                OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 00:00-00:30,04:00-00:30; Sa,Su,PH 00:00-24:00"));
     }
 
@@ -170,8 +179,12 @@
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "fixme", OpeningHourTest.CheckMode.BOTH), not(isEmpty()));
         assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "daily", OpeningHourTest.CheckMode.BOTH), not(isEmpty()));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30,17:45,19:00; Sa 15:00; Su 11:00", OpeningHourTest.CheckMode.BOTH), isEmpty());
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00", OpeningHourTest.CheckMode.BOTH), hasSize(1));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00", OpeningHourTest.CheckMode.BOTH).get(0).getSeverity(), is(Severity.OTHER));
-        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00", OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 13:30,17:45,19:00; Sa 15:00; Su 11:00"));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30,17:45,19:00; Sa 15:00; Su 11:00",
+                OpeningHourTest.CheckMode.BOTH), isEmpty());
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00",
+                OpeningHourTest.CheckMode.BOTH), hasSize(1));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00",
+                OpeningHourTest.CheckMode.BOTH).get(0).getSeverity(), is(Severity.OTHER));
+        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 13:30, 17:45, 19:00; Sa 15:00; Su 11:00",
+                OpeningHourTest.CheckMode.BOTH).get(0).getPrettifiedValue(), is("Mo-Fr 13:30,17:45,19:00; Sa 15:00; Su 11:00"));
     }
 
Index: /trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/DefaultNameFormatterTest.java	(revision 8509)
@@ -44,7 +44,7 @@
     /**
      * Non-regression test for ticket <a href="https://josm.openstreetmap.de/ticket/9632">#9632</a>.
-     * @throws IllegalDataException
-     * @throws IOException
-     * @throws SAXException
+     * @throws IllegalDataException if an error was found while parsing the data from the source
+     * @throws IOException if any I/O error occurs
+     * @throws SAXException if any XML error occurs
      */
     @Test
@@ -63,7 +63,10 @@
             Relation p3 = (Relation) ds.getPrimitiveById(167042, OsmPrimitiveType.RELATION);
 
-            System.out.println("p1: "+DefaultNameFormatter.getInstance().format(p1)+" - "+p1); // route_master ("Bus 453", 6 members)
-            System.out.println("p2: "+DefaultNameFormatter.getInstance().format(p2)+" - "+p2); // TMC ("A 6 Kaiserslautern - Mannheim [negative]", 123 members)
-            System.out.println("p3: "+DefaultNameFormatter.getInstance().format(p3)+" - "+p3); // route(lcn Sal  Salier-Radweg(412 members)
+            // route_master ("Bus 453", 6 members)
+            System.out.println("p1: "+DefaultNameFormatter.getInstance().format(p1)+" - "+p1);
+            // TMC ("A 6 Kaiserslautern - Mannheim [negative]", 123 members)
+            System.out.println("p2: "+DefaultNameFormatter.getInstance().format(p2)+" - "+p2);
+            // route(lcn Sal  Salier-Radweg(412 members)
+            System.out.println("p3: "+DefaultNameFormatter.getInstance().format(p3)+" - "+p3);
 
             assertSame(comparator.compare(p1, p2), -1); // p1 < p2
@@ -91,6 +94,8 @@
         assertThat(getFormattedRelationName("type=multipolygon building=yes"), is("multipolygon (\"building\", 0 members)"));
         assertThat(getFormattedRelationName("type=multipolygon building=yes ref=123"), is("multipolygon (\"123\", 0 members)"));
-        assertThat(getFormattedRelationName("type=multipolygon building=yes addr:housenumber=123"), is("multipolygon (\"building\", 0 members)"));
-        assertThat(getFormattedRelationName("type=multipolygon building=residential addr:housenumber=123"), is("multipolygon (\"residential\", 0 members)"));
+        assertThat(getFormattedRelationName("type=multipolygon building=yes addr:housenumber=123"),
+                is("multipolygon (\"building\", 0 members)"));
+        assertThat(getFormattedRelationName("type=multipolygon building=residential addr:housenumber=123"),
+                is("multipolygon (\"residential\", 0 members)"));
     }
 
@@ -102,5 +107,6 @@
         assertThat(getFormattedWayName("building=yes"), is("building (0 nodes)"));
         assertThat(getFormattedWayName("building=yes addr:housenumber=123"), is("House number 123 (0 nodes)"));
-        assertThat(getFormattedWayName("building=yes addr:housenumber=123 addr:street=FooStreet"), is("House number 123 at FooStreet (0 nodes)"));
+        assertThat(getFormattedWayName("building=yes addr:housenumber=123 addr:street=FooStreet"),
+                is("House number 123 at FooStreet (0 nodes)"));
         assertThat(getFormattedWayName("building=yes addr:housenumber=123 addr:housename=FooName"), is("House FooName (0 nodes)"));
     }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/SystemOfMeasurementTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/SystemOfMeasurementTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/SystemOfMeasurementTest.java	(revision 8509)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui;
 
Index: /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/conflict/tags/TagMergeItemTest.java	(revision 8509)
@@ -80,5 +80,5 @@
     }
 
-    @Test()
+    @Test
     public void test_decide_1() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
@@ -91,5 +91,5 @@
     }
 
-    @Test()
+    @Test
     public void test_applyToMyPrimitive() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
@@ -107,5 +107,5 @@
     }
 
-    @Test()
+    @Test
     public void test_applyToMyPrimitive_2() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
@@ -122,5 +122,5 @@
     }
 
-    @Test()
+    @Test
     public void test_applyToMyPrimitive_3() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
@@ -138,5 +138,5 @@
     }
 
-    @Test()
+    @Test
     public void test_applyToMyPrimitive_4() {
         TagMergeItem item = new TagMergeItem("key", "myvalue", "theirvalue");
Index: /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/LatLonDialogTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/LatLonDialogTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/dialogs/LatLonDialogTest.java	(revision 8509)
@@ -1,9 +1,10 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.dialogs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
 
 import org.junit.Test;
 import org.openstreetmap.josm.data.coor.LatLon;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
 
 public class LatLonDialogTest {
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/ToolbarPreferencesTest.java	(revision 8509)
@@ -40,5 +40,4 @@
 
         }
-
     }
 
@@ -67,8 +66,10 @@
         checkAction(parser.loadAction("action(uknownParam=aa)"));
 
-        Assert.assertEquals("action(param1=value1,param2=value2)", parser.saveAction(parser.loadAction("action(param1=value1,param2=value2)")));
-        Assert.assertEquals("action(param1=value1,param2=)", parser.saveAction(parser.loadAction("action(param1=value1)")));
-        Assert.assertEquals("action(param1=value1,param2=2\\(\\=\\,\\\\)", parser.saveAction(parser.loadAction("action(param1=value1,param2=2\\(\\=\\,\\\\)")));
+        Assert.assertEquals("action(param1=value1,param2=value2)",
+                parser.saveAction(parser.loadAction("action(param1=value1,param2=value2)")));
+        Assert.assertEquals("action(param1=value1,param2=)",
+                parser.saveAction(parser.loadAction("action(param1=value1)")));
+        Assert.assertEquals("action(param1=value1,param2=2\\(\\=\\,\\\\)",
+                parser.saveAction(parser.loadAction("action(param1=value1,param2=2\\(\\=\\,\\\\)")));
     }
-
 }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/tagging/PresetClassificationsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/tagging/PresetClassificationsTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/tagging/PresetClassificationsTest.java	(revision 8509)
@@ -63,6 +63,8 @@
     public void testRelationsForTram() {
         final OsmPrimitive tram = OsmUtils.createPrimitive("way railway=tram");
-        assertTrue("railway=tram should match 'Railway Route' for relation creation", getMatchingPresetNames("route", tram).contains("Railway Route"));
-        assertTrue("railway=tram should match 'Public Transport Route' for relation creation", getMatchingPresetNames("route", tram).contains("Public Transport Route"));
+        assertTrue("railway=tram should match 'Railway Route' for relation creation", getMatchingPresetNames("route", tram)
+                .contains("Railway Route"));
+        assertTrue("railway=tram should match 'Public Transport Route' for relation creation", getMatchingPresetNames("route", tram)
+                .contains("Public Transport Route"));
         assertFalse("railway=tram should not match 'Bus route'", getMatchingPresetNames("route", tram).contains("Bus route"));
     }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/util/RotationAngleTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/util/RotationAngleTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/util/RotationAngleTest.java	(revision 8509)
@@ -1,2 +1,3 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.gui.util;
 
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java	(revision 8509)
@@ -1,8 +1,9 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.io.remotecontrol.handler;
+
+import static org.junit.Assert.assertThat;
 
 import org.hamcrest.CoreMatchers;
 import org.junit.Test;
-
-import static org.junit.Assert.*;
 
 public class ImportHandlerTest {
@@ -14,6 +15,4 @@
         req.setUrl("http://localhost:8111/import?url=http://localhost:8888/relations?relations=19711&mode=recursive");
         assertThat(req.args.get("url"), CoreMatchers.is("http://localhost:8888/relations?relations=19711&mode=recursive"));
-
     }
-
 }
Index: /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java	(revision 8509)
@@ -1,6 +1,7 @@
+// License: GPL. For details, see LICENSE file.
 package org.openstreetmap.josm.io.remotecontrol.handler;
 
-import org.junit.Test;
-import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
 
 import java.util.Collections;
@@ -8,6 +9,6 @@
 import java.util.Map;
 
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
+import org.junit.Test;
+import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault;
 
 public class RequestHandlerTest {
@@ -70,5 +71,6 @@
     @Test
     public void testRequestParameter4() {
-        assertThat(getRequestParameter("http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$'()*+,;=/?:@-._~!$'()*+,;==#/?:@-._~!$&'()*+,;="),
+        assertThat(getRequestParameter(
+                "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$'()*+,;=/?:@-._~!$'()*+,;==#/?:@-._~!$&'()*+,;="),
                 is(Collections.singletonMap("/?:@-._~!$'()* ,;", "/?:@-._~!$'()* ,;==")));
     }
@@ -82,4 +84,3 @@
                 is(expected));
     }
-
 }
Index: /trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/BugReportExceptionHandlerTest.java	(revision 8509)
@@ -33,5 +33,5 @@
     /**
      * Test method for {@link org.openstreetmap.josm.tools.BugReportExceptionHandler#getBugReportUrl(java.lang.String)}.
-     * @throws IOException
+     * @throws IOException if any I/O error occurs
      */
     @Test
Index: /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/ExifReaderTest.java	(revision 8509)
@@ -23,18 +23,17 @@
 
     private File orientationSampleFile, directionSampleFile;
-    
+
     /**
      * Setup test
-     * @throws Exception
      */
     @Before
-    public void setUp() throws Exception {
+    public void setUp() {
         directionSampleFile = new File("data_nodist/exif-example_direction.jpg");
         orientationSampleFile = new File("data_nodist/exif-example_orientation=6.jpg");
     }
 
-    /** 
+    /**
      * Test time extraction
-     * @throws ParseException 
+     * @throws ParseException if {@link ExifReader#readTime} fails to parse date/time of sample file
      */
     @Test
@@ -52,5 +51,5 @@
         assertEquals(Integer.valueOf(6), orientation);
     }
-    
+
     /**
      * Test coordinates extraction
Index: /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/OsmUrlToBoundsTest.java	(revision 8509)
@@ -15,19 +15,34 @@
     private static final ParseTestItem[] parseTestData = {
         new ParseTestItem("https://www.openstreetmap.org", null),
-        new ParseTestItem("https://www.openstreetmap.org/?bbox=-0.489,51.28,0.236,51.686", new Bounds(51.28, -0.489, 51.686, 0.236)),
-        new ParseTestItem("https://www.openstreetmap.org/?minlon=-0.489&minlat=51.28&maxlon=0.236&maxlat=51.686", new Bounds(51.28, -0.489, 51.686, 0.236)),
-        new ParseTestItem("https://www.openstreetmap.org/?maxlat=51.686&maxlon=0.236&minlat=51.28&minlon=-0.489", new Bounds(51.28, -0.489, 51.686, 0.236)),
-        new ParseTestItem("https://www.openstreetmap.org/?zoom=17&lat=51.71873&lon=8.76164", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
-        new ParseTestItem("https://www.openstreetmap.org/?lon=8.76164&lat=51.71873&zoom=17&foo", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
-        new ParseTestItem("https://www.openstreetmap.org/?mlon=8.76164&mlat=51.71873", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 18)),
-        new ParseTestItem("http://osm.org/go/euulwp", OsmUrlToBounds.positionToBounds(51.48262023925781, -0.29937744140625, 8)),
-        new ParseTestItem("https://www.openstreetmap.org/#map=17/51.71873/8.76164", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
-        new ParseTestItem("https://www.openstreetmap.org/#map=17/51.71873/8.76164&layers=CN", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
-        new ParseTestItem("https%3A%2F%2Fwww.openstreetmap.org%2F%23map%3D16%2F51.71873%2F8.76164", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 16)),
-        new ParseTestItem("https%3A%2F%2Fwww.openstreetmap.org%2F%23map%3D16%2F51.71873%2F8.76164%26layers%3DCN", OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 16)),
-        new ParseTestItem("https://www.openstreetmap.org/?note=26325#map=18/40.86215/-75.75020", OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18)),
-        new ParseTestItem("https://www.openstreetmap.org/?note=26325#map=18/40.86215/-75.75020&layers=N", OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18)),
-        new ParseTestItem("https://www.openstreetmap.org/?mlat=51.5&mlon=-0.01#map=10/51.4831/-0.1270", OsmUrlToBounds.positionToBounds(51.4831, -0.1270, 10)),
-        new ParseTestItem("https://www.openstreetmap.org/?mlat=51.5&mlon=-0.01#map=10/51.4831/-0.3509&layers=T", OsmUrlToBounds.positionToBounds(51.4831, -0.3509, 10)),
+        new ParseTestItem("https://www.openstreetmap.org/?bbox=-0.489,51.28,0.236,51.686",
+                new Bounds(51.28, -0.489, 51.686, 0.236)),
+        new ParseTestItem("https://www.openstreetmap.org/?minlon=-0.489&minlat=51.28&maxlon=0.236&maxlat=51.686",
+                new Bounds(51.28, -0.489, 51.686, 0.236)),
+        new ParseTestItem("https://www.openstreetmap.org/?maxlat=51.686&maxlon=0.236&minlat=51.28&minlon=-0.489",
+                new Bounds(51.28, -0.489, 51.686, 0.236)),
+        new ParseTestItem("https://www.openstreetmap.org/?zoom=17&lat=51.71873&lon=8.76164",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
+        new ParseTestItem("https://www.openstreetmap.org/?lon=8.76164&lat=51.71873&zoom=17&foo",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
+        new ParseTestItem("https://www.openstreetmap.org/?mlon=8.76164&mlat=51.71873",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 18)),
+        new ParseTestItem("http://osm.org/go/euulwp",
+                OsmUrlToBounds.positionToBounds(51.48262023925781, -0.29937744140625, 8)),
+        new ParseTestItem("https://www.openstreetmap.org/#map=17/51.71873/8.76164",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
+        new ParseTestItem("https://www.openstreetmap.org/#map=17/51.71873/8.76164&layers=CN",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 17)),
+        new ParseTestItem("https%3A%2F%2Fwww.openstreetmap.org%2F%23map%3D16%2F51.71873%2F8.76164",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 16)),
+        new ParseTestItem("https%3A%2F%2Fwww.openstreetmap.org%2F%23map%3D16%2F51.71873%2F8.76164%26layers%3DCN",
+                OsmUrlToBounds.positionToBounds(51.71873, 8.76164, 16)),
+        new ParseTestItem("https://www.openstreetmap.org/?note=26325#map=18/40.86215/-75.75020",
+                OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18)),
+        new ParseTestItem("https://www.openstreetmap.org/?note=26325#map=18/40.86215/-75.75020&layers=N",
+                OsmUrlToBounds.positionToBounds(40.86215, -75.75020, 18)),
+        new ParseTestItem("https://www.openstreetmap.org/?mlat=51.5&mlon=-0.01#map=10/51.4831/-0.1270",
+                OsmUrlToBounds.positionToBounds(51.4831, -0.1270, 10)),
+        new ParseTestItem("https://www.openstreetmap.org/?mlat=51.5&mlon=-0.01#map=10/51.4831/-0.3509&layers=T",
+                OsmUrlToBounds.positionToBounds(51.4831, -0.3509, 10)),
         new ParseTestItem("https://www.openstreetmap.org/#map", null),
         new ParseTestItem("https://www.openstreetmap.org/#map=foo", null),
Index: /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java	(revision 8509)
@@ -3,5 +3,5 @@
 
 import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertThat;
 
 import org.junit.Test;
Index: /trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8508)
+++ /trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateEngineTest.java	(revision 8509)
@@ -36,5 +36,6 @@
     public void testVariable() throws ParseError {
         TemplateParser parser = new TemplateParser("abc{var}\\{ef\\$\\{g");
-        ReflectionAssert.assertReflectionEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"), new Variable("var"), new StaticText("{ef${g")), parser.parse());
+        ReflectionAssert.assertReflectionEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"),
+                new Variable("var"), new StaticText("{ef${g")), parser.parse());
     }
 
