Index: /trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java	(revision 1415)
@@ -3,19 +3,8 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
-import static org.openstreetmap.josm.tools.I18n.trn;
 
-import java.awt.BorderLayout;
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
-import java.awt.event.FocusAdapter;
-import java.awt.event.FocusEvent;
 import java.awt.event.KeyEvent;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.TreeMap;
-import java.util.TreeSet;
 
 import javax.swing.JLabel;
@@ -26,15 +15,6 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.AddCommand;
-import org.openstreetmap.josm.command.Command;
-import org.openstreetmap.josm.command.SequenceCommand;
-import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.RelationMember;
-import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.tools.AutoCompleteComboBox;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
Index: /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 1415)
@@ -60,5 +60,5 @@
                 }
             }
-            result += mat[0][i] * Math.pow(-1, (double) i) * determinant(temp);
+            result += mat[0][i] * Math.pow(-1, i) * determinant(temp);
         }
         return result;
@@ -136,5 +136,4 @@
         Collection<Way> ways = new LinkedList<Way>();
         Node center = null;
-        Node node = null;
         double radius = 0;
         boolean regular = false;
@@ -161,10 +160,9 @@
             // distance between two nodes.
             if (nodes.size() > 0) {
-                if (nodes.size() == 1 && way.nodes.contains((Node) nodes.toArray()[0])) {
-                    node = (Node) nodes.toArray()[0];
+                if (nodes.size() == 1 && way.nodes.contains(nodes.toArray()[0])) {
                     regular = true;
                 } else {
 
-                    center = (Node) nodes.toArray()[way.nodes.contains((Node) nodes.toArray()[0]) ? 1 : 0];
+                    center = (Node) nodes.toArray()[way.nodes.contains(nodes.toArray()[0]) ? 1 : 0];
                     if (nodes.size() == 2)
                         radius = distance(((Node) nodes.toArray()[0]).eastNorth, ((Node) nodes.toArray()[1]).eastNorth);
Index: /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/DiskAccessAction.java	(revision 1415)
@@ -7,6 +7,4 @@
 
 import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.ExtendedDialog;
Index: /trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java	(revision 1415)
@@ -9,5 +9,4 @@
 import java.util.Collection;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.CopyAction;
 import org.openstreetmap.josm.actions.PasteAction;
Index: /trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 1415)
@@ -4,9 +4,6 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.event.InputEvent;
-
 import javax.swing.AbstractAction;
 import javax.swing.JComponent;
-import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
Index: /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java	(revision 1415)
@@ -7,15 +7,7 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
-import java.io.InputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.zip.GZIPInputStream;
 
 import javax.swing.JCheckBox;
-import javax.swing.JFileChooser;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTextField;
@@ -23,14 +15,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
-import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.ExtendedDialog;
-import org.openstreetmap.josm.gui.layer.GpxLayer;
-import org.openstreetmap.josm.gui.layer.OsmDataLayer;
-import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
-import org.openstreetmap.josm.io.GpxReader;
-import org.openstreetmap.josm.io.NmeaReader;
-import org.openstreetmap.josm.io.OsmReader;
-import org.openstreetmap.josm.io.OsmServerLocationReader;
-import org.xml.sax.SAXException;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
Index: /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java	(revision 1415)
@@ -5,5 +5,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.List;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
@@ -15,5 +14,4 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.MoveCommand;
Index: /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java	(revision 1415)
@@ -123,5 +123,8 @@
                 if (entry.getValue().equals(selectedNodes.size())) {
                     if (selectedWay != null) {
-                        JOptionPane.showMessageDialog(Main.parent, tr("There is more than one way using the node(s) you selected. Please select the way also."));
+                        JOptionPane.showMessageDialog(Main.parent,
+                        trn("There is more than one way using the node you selected. Please select the way also.",
+                        "There is more than one way using the nodes you selected. Please select the way also.",
+                        selectedNodes.size()));
                         return;
                     }
@@ -131,5 +134,6 @@
 
             if (selectedWay == null) {
-                JOptionPane.showMessageDialog(Main.parent, tr("The selected nodes do not share the same way."));
+                JOptionPane.showMessageDialog(Main.parent,
+                tr("The selected nodes do not share the same way."));
                 return;
             }
@@ -144,6 +148,7 @@
             if (!nds.isEmpty()) {
                 JOptionPane.showMessageDialog(Main.parent,
-                        trn("The selected way does not contain the selected node.",
-                                "The selected way does not contain all the selected nodes.", selectedNodes.size()));
+                trn("The selected way does not contain the selected node.",
+                "The selected way does not contain all the selected nodes.",
+                selectedNodes.size()));
                 return;
             }
Index: /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadGpsTask.java	(revision 1415)
@@ -15,5 +15,4 @@
 import org.openstreetmap.josm.gui.layer.GpxLayer;
 import org.openstreetmap.josm.data.gpx.GpxData;
-import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.io.BoundingBoxDownloader;
 import org.xml.sax.SAXException;
@@ -39,8 +38,7 @@
             if (rawData == null)
                 return;
-                        rawData.recalculateBounds();
-                        Bounds b = rawData.bounds;
-                        String name = tr("Downloaded GPX Data");
-                        GpxLayer layer = new GpxLayer(rawData, name);
+            rawData.recalculateBounds();
+            String name = tr("Downloaded GPX Data");
+            GpxLayer layer = new GpxLayer(rawData, name);
             Layer x = findMergeLayer();
             if (newLayer || x == null)
Index: /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 1415)
@@ -25,6 +25,5 @@
  * The user can click on an object, which gets deleted if possible. When Ctrl is
  * pressed when releasing the button, the objects and all its references are
- * deleted. The exact definition of "all its references" are in
- * {@link #deleteWithReferences deleteWithReferences}.
+ * deleted.
  *
  * If the user did not press Ctrl and the object has any references, the user
Index: /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 1415)
@@ -129,17 +129,4 @@
     }
 
-    /**
-     * Try to delete all given primitives.
-     *
-     * If a node is used by a way, it's removed from that way. If a node or a way is used by a
-     * relation, inform the user and do not delete.
-     *
-     * If this would cause ways with less than 2 nodes to be created, delete these ways instead. If
-     * they are part of a relation, inform the user and do not delete.
-     *
-     * @param selection The objects to delete.
-     * @param alsoDeleteNodesInWay <code>true</code> if nodes should be deleted as well
-     * @return command A command to perform the deletions, or null of there is nothing to delete.
-     */
     private static int testRelation(Relation ref, OsmPrimitive osm) {
         NameVisitor n = new NameVisitor();
@@ -175,4 +162,17 @@
     }
 
+    /**
+     * Try to delete all given primitives.
+     *
+     * If a node is used by a way, it's removed from that way. If a node or a way is used by a
+     * relation, inform the user and do not delete.
+     *
+     * If this would cause ways with less than 2 nodes to be created, delete these ways instead. If
+     * they are part of a relation, inform the user and do not delete.
+     *
+     * @param selection The objects to delete.
+     * @param alsoDeleteNodesInWay <code>true</code> if nodes should be deleted as well
+     * @return command A command to perform the deletions, or null of there is nothing to delete.
+     */
     public static Command delete(Collection<? extends OsmPrimitive> selection, boolean alsoDeleteNodesInWay) {
         if (selection.isEmpty())
Index: /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/osm/DataSet.java	(revision 1415)
@@ -5,5 +5,4 @@
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
Index: /trunk/src/org/openstreetmap/josm/data/osm/Node.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/osm/Node.java	(revision 1415)
@@ -3,6 +3,4 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
 
 import org.openstreetmap.josm.Main;
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 1415)
@@ -65,6 +65,4 @@
      * If the bounding box has not been set (<code>min</code> or <code>max</code>
      * equal <code>null</code>) this method does not do anything.
-     *
-     * @param enlargeDegree
      */
     public void enlargeBoundingBox() {
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/MapPaintVisitor.java	(revision 1415)
@@ -1,4 +1,6 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+/* License: GPL. Copyright 2007 by Immanuel Scholz and others */
 package org.openstreetmap.josm.data.osm.visitor;
+
+/* To enable debugging or profiling remove the double / signs */
 
 import static org.openstreetmap.josm.tools.I18n.marktr;
@@ -47,5 +49,5 @@
     protected boolean drawRestriction;
     protected boolean leftHandTraffic;
-    protected boolean restrictionDebug;
+    //protected boolean restrictionDebug;
     protected int showNames;
     protected int showIcons;
@@ -70,10 +72,10 @@
     private EastNorth maxEN;
 
-    protected int profilerVisibleNodes;
-    protected int profilerVisibleWays;
-    protected int profilerVisibleAreas;
-    protected int profilerSegments;
-    protected int profilerVisibleSegments;
-    protected boolean profilerOmitDraw;
+    //protected int profilerVisibleNodes;
+    //protected int profilerVisibleWays;
+    //protected int profilerVisibleAreas;
+    //protected int profilerSegments;
+    //protected int profilerVisibleSegments;
+    //protected boolean profilerOmitDraw;
 
     protected boolean isZoomOk(ElemStyle e) {
@@ -84,9 +86,9 @@
             return (circum < 1500);
 
-        // formula to calculate a map scale: natural size / map size = scale
-        // example: 876000mm (876m as displayed) / 22mm (roughly estimated screen size of legend bar) = 39818
-        //
-        // so the exact "correcting value" below depends only on the screen size and resolution
-        // XXX - do we need a Preference setting for this (if things vary widely)?
+        /* formula to calculate a map scale: natural size / map size = scale
+           example: 876000mm (876m as displayed) / 22mm (roughly estimated screen size of legend bar) = 39818
+
+           so the exact "correcting value" below depends only on the screen size and resolution
+           XXX - do we need a Preference setting for this (if things vary widely)? */
         return !(circum >= e.maxScale / 22 || circum < e.minScale / 22);
     }
@@ -132,5 +134,5 @@
      */
     public void visit(Node n) {
-        // check, if the node is visible at all
+        /* check, if the node is visible at all */
         if((n.eastNorth.east()  > maxEN.east() ) ||
            (n.eastNorth.north() > maxEN.north()) ||
@@ -145,6 +147,6 @@
         IconElemStyle nodeStyle = (IconElemStyle)getPrimitiveStyle(n);
 
-        if(profilerOmitDraw)
-            return;
+        //if(profilerOmitDraw)
+        //    return;
 
         if (nodeStyle != null && isZoomOk(nodeStyle) && showIcons > dist)
@@ -171,5 +173,5 @@
         }
 
-        // check, if the way is visible at all
+        /* check, if the way is visible at all */
         double minx = 10000;
         double maxx = -10000;
@@ -208,44 +210,44 @@
         if(wayStyle==null)
         {
-            // way without style
-            profilerVisibleWays++;
-            if(!profilerOmitDraw)
-                drawWay(w, null, untaggedColor, w.selected);
+            /* way without style */
+            //profilerVisibleWays++;
+            //if(!profilerOmitDraw)
+            drawWay(w, null, untaggedColor, w.selected);
         }
         else if(wayStyle instanceof LineElemStyle)
         {
-            // way with line style
-            profilerVisibleWays++;
-            if(!profilerOmitDraw)
-                drawWay(w, (LineElemStyle)wayStyle, untaggedColor, w.selected);
+            /* way with line style */
+            //profilerVisibleWays++;
+            //if(!profilerOmitDraw)
+            drawWay(w, (LineElemStyle)wayStyle, untaggedColor, w.selected);
         }
         else if (wayStyle instanceof AreaElemStyle)
         {
-            // way with area style
-            if(!profilerOmitDraw)
-            {
-                if (fillAreas > dist)
-                {
-                    profilerVisibleAreas++;
-                    drawArea(w, w.selected ? selectedColor : ((AreaElemStyle)wayStyle).color);
-                    if(!w.isClosed())
-                        w.putError(tr("Area style way is not closed."), true);
-                }
-                drawWay(w, ((AreaElemStyle)wayStyle).line, ((AreaElemStyle)wayStyle).color, w.selected);
-            }
+            /* way with area style */
+            //if(!profilerOmitDraw)
+            //{
+            if (fillAreas > dist)
+            {
+            //    profilerVisibleAreas++;
+                drawArea(w, w.selected ? selectedColor : ((AreaElemStyle)wayStyle).color);
+                if(!w.isClosed())
+                    w.putError(tr("Area style way is not closed."), true);
+            }
+            drawWay(w, ((AreaElemStyle)wayStyle).line, ((AreaElemStyle)wayStyle).color, w.selected);
+            //}
         }
     }
 
     public void drawWay(Way w, LineElemStyle l, Color color, Boolean selected) {
-        // show direction arrows, if draw.segment.relevant_directions_only is not set,
-        // the way is tagged with a direction key
-        // (even if the tag is negated as in oneway=false) or the way is selected
+        /* show direction arrows, if draw.segment.relevant_directions_only is not set,
+           the way is tagged with a direction key
+           (even if the tag is negated as in oneway=false) or the way is selected */
         boolean showDirection = w.selected || ((!useRealWidth) && (showDirectionArrow
         && (!showRelevantDirectionsOnly || w.hasDirectionKeys)));
-        // head only takes over control if the option is true,
-        // the direction should be shown at all and not only because it's selected
+        /* head only takes over control if the option is true,
+           the direction should be shown at all and not only because it's selected */
         boolean showOnlyHeadArrowOnly = showDirection && !w.selected && showHeadArrowOnly;
         int width = defaultSegmentWidth;
-        int realWidth = 0; //the real width of the element in meters
+        int realWidth = 0; /* the real width of the element in meters */
         int dashed = 0;
         Color dashedColor = null;
@@ -273,5 +275,5 @@
             color = selectedColor;
 
-        // draw overlays under the way
+        /* draw overlays under the way */
         if(l != null && l.overlays != null)
         {
@@ -294,5 +296,5 @@
         }
 
-        // draw the way
+        /* draw the way */
         lastN = null;
         Iterator<Node> it = w.nodes.iterator();
@@ -306,5 +308,5 @@
         }
 
-        // draw overlays above the way
+        /* draw overlays above the way */
         if(l != null && l.overlays != null)
         {
@@ -392,5 +394,5 @@
                                 if(c.selected) selected = true;
                                 --left;
-                                if(n == null) n = new ArrayList(w.nodes);
+                                if(n == null) n = new ArrayList<Node>(w.nodes);
                                 n.remove((mode == 21 || mode == 22) ? nl : 0);
                                 if(mode == 21)
@@ -466,7 +468,7 @@
         r.mappaintVisibleCode = 0;
 
-        // TODO: is it possible to do this like the nodes/ways code?
-        if(profilerOmitDraw)
-            return;
+        /* TODO: is it possible to do this like the nodes/ways code? */
+        //if(profilerOmitDraw)
+        //    return;
 
         if(selectedCall)
@@ -506,9 +508,9 @@
     }
 
-    // this current experimental implementation will only work for standard restrictions:
-    // from(Way) / via(Node) / to(Way)
+    /* this current experimental implementation will only work for standard restrictions:
+       from(Way) / via(Node) / to(Way) */
     public void drawRestriction(Relation r) {
-        if(restrictionDebug)
-            System.out.println("Restriction: " + r.keys.get("name") + " restriction " + r.keys.get("restriction"));
+        //if(restrictionDebug)
+        //    System.out.println("Restriction: " + r.keys.get("name") + " restriction " + r.keys.get("restriction"));
 
         r.clearErrors();
@@ -518,9 +520,9 @@
         Node via = null;
 
-        // find the "from", "via" and "to" elements
+        /* find the "from", "via" and "to" elements */
         for (RelationMember m : r.members)
         {
-            if(restrictionDebug)
-                System.out.println("member " + m.member + " selected " + r.selected);
+            //if(restrictionDebug)
+            //    System.out.println("member " + m.member + " selected " + r.selected);
 
             if(m.member == null)
@@ -538,9 +540,4 @@
                 {
                     Way w = (Way) m.member;
-                    ElemStyle style = getPrimitiveStyle(w);
-                    //if(r.selected) {
-                    //    drawWay(w, null /*(LineElemStyle)style*/, selectedColor, true);
-                    //    w.mappaintDrawnCode = paintid;
-                    //}
                     if(w.nodes.size() < 2)
                     {
@@ -594,16 +591,16 @@
         }
 
-        // check if "from" way starts or ends at via
+        /* check if "from" way starts or ends at via */
         if(fromWay.nodes.get(0) != via && fromWay.nodes.get(fromWay.nodes.size()-1) != via) {
             r.putError(tr("The \"from\" way doesn't start or end at a \"via\" node."), true);
             return;
         }
-        // check if "to" way starts or ends at via
+        /* check if "to" way starts or ends at via */
         /*if(toWay.nodes.get(0) != via && toWay.nodes.get(toWay.nodes.size()-1) != via) {
             r.putError(tr("to way doesn't start or end at a via node"), true);
-            //return;
+            return;
         }*/
 
-        // find the "direct" nodes before the via node
+        /* find the "direct" nodes before the via node */
         Node fromNode = null;
         try
@@ -620,15 +617,15 @@
         }
 
-        // find the "direct" node after the via node
+        /* find the "direct" node after the via node */
         Node toNode = null;
         try
         {
             if(toWay.nodes.get(0) == via) {
-                if(restrictionDebug)
-                    System.out.println("To way heading away from via");
+                //if(restrictionDebug)
+                //    System.out.println("To way heading away from via");
                 toNode = toWay.nodes.get(1);
             } else {
-                if(restrictionDebug)
-                    System.out.println("To way heading towards via");
+                //if(restrictionDebug)
+                //    System.out.println("To way heading towards via");
                 toNode = toWay.nodes.get(toWay.nodes.size()-2);
             }
@@ -640,21 +637,23 @@
         Point pVia = nc.getPoint(via.eastNorth);
 
-        if(restrictionDebug) {
-            Point pTo = nc.getPoint(toNode.eastNorth);
-
-            // debug output of interesting nodes
-            System.out.println("From: " + fromNode);
-            drawNode(fromNode, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
-            System.out.println("Via: " + via);
-            drawNode(via, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
-            System.out.println("To: " + toNode);
-            drawNode(toNode, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
-            System.out.println("From X: " + pFrom.x + " Y " + pFrom.y);
-            System.out.println("Via  X: " + pVia.x  + " Y " + pVia.y);
-            System.out.println("To   X: " + pTo.x   + " Y " + pTo.y);
-        }
-
-        // starting from via, go back the "from" way a few pixels
-        // (calculate the vector vx/vy with the specified length and the direction away from the "via" node along the first segment of the "from" way)
+        //if(restrictionDebug) {
+        //    Point pTo = nc.getPoint(toNode.eastNorth);
+
+        //    /* debug output of interesting nodes */
+        //    System.out.println("From: " + fromNode);
+        //    drawNode(fromNode, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
+        //    System.out.println("Via: " + via);
+        //    drawNode(via, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
+        //    System.out.println("To: " + toNode);
+        //    drawNode(toNode, selectedColor, selectedNodeSize, selectedNodeRadius, fillSelectedNode);
+        //    System.out.println("From X: " + pFrom.x + " Y " + pFrom.y);
+        //    System.out.println("Via  X: " + pVia.x  + " Y " + pVia.y);
+        //    System.out.println("To   X: " + pTo.x   + " Y " + pTo.y);
+        //}
+
+        /* starting from via, go back the "from" way a few pixels
+           (calculate the vector vx/vy with the specified length and the direction
+           away from the "via" node along the first segment of the "from" way)
+        */
         double distanceFromVia=14;
         double dx = (pFrom.x >= pVia.x) ? (pFrom.x - pVia.x) : (pVia.x - pFrom.x);
@@ -675,9 +674,11 @@
         if(pFrom.y < pVia.y) vy = -vy;
 
-        if(restrictionDebug)
-            System.out.println("vx " + vx + " vy " + vy);
-
-        // go a few pixels away from the way (in a right angle)
-        // (calculate the vx2/vy2 vector with the specified length and the direction 90degrees away from the first segment of the "from" way)
+        //if(restrictionDebug)
+        //    System.out.println("vx " + vx + " vy " + vy);
+
+        /* go a few pixels away from the way (in a right angle)
+           (calculate the vx2/vy2 vector with the specified length and the direction
+           90degrees away from the first segment of the "from" way)
+        */
         double distanceFromWay=8;
         double vx2 = 0;
@@ -733,10 +734,10 @@
         }
 
-        // rotate icon with direction last node in from to
-        if(restrictionDebug)
-            System.out.println("Deg1 " + fromAngleDeg + " Deg2 " + (fromAngleDeg + 180) + " Icon " + iconAngle);
+        /* rotate icon with direction last node in from to */
+        //if(restrictionDebug)
+        //    System.out.println("Deg1 " + fromAngleDeg + " Deg2 " + (fromAngleDeg + 180) + " Icon " + iconAngle);
         ImageIcon rotatedIcon = ImageProvider.createRotatedImage(null /*icon2*/, nodeStyle.icon, iconAngle);
 
-        // scale down icon to 16*16 pixels
+        /* scale down icon to 16*16 pixels */
         ImageIcon smallIcon = new ImageIcon(rotatedIcon.getImage().getScaledInstance(16 , 16, Image.SCALE_SMOOTH));
         int w = smallIcon.getIconWidth(), h=smallIcon.getIconHeight();
@@ -1041,5 +1042,5 @@
         Polygon polygon = getPolygon(w);
 
-        // set the opacity (alpha) level of the filled polygon
+        /* set the opacity (alpha) level of the filled polygon */
         g.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
         g.fillPolygon(polygon);
@@ -1048,5 +1049,5 @@
     protected void drawAreaPolygon(Polygon polygon, Color color)
     {
-        // set the opacity (alpha) level of the filled polygon
+        /* set the opacity (alpha) level of the filled polygon */
         g.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
         g.fillPolygon(polygon);
@@ -1057,5 +1058,5 @@
         if ((p.x < 0) || (p.y < 0) || (p.x > nc.getWidth()) || (p.y > nc.getHeight())) return;
 
-        profilerVisibleNodes++;
+        //profilerVisibleNodes++;
 
         int w = icon.getIconWidth(), h=icon.getIconHeight();
@@ -1092,5 +1093,5 @@
 
     private void drawSeg(Node n1, Node n2, Color col, boolean showDirection, int width, int dashed, Color dashedColor) {
-        profilerSegments++;
+        //profilerSegments++;
         if (col != currentColor || width != currentWidth || dashed != currentDashed || dashedColor != currentDashedColor) {
             displaySegments(col, width, dashed, dashedColor);
@@ -1102,5 +1103,5 @@
             return;
         }
-        profilerVisibleSegments++;
+        //profilerVisibleSegments++;
         currentPath.moveTo(p1.x, p1.y);
         currentPath.lineTo(p2.x, p2.y);
@@ -1166,5 +1167,5 @@
                 return;
 
-            profilerVisibleNodes++;
+            //profilerVisibleNodes++;
 
             g.setColor(color);
@@ -1197,9 +1198,9 @@
     }
 
-    // Shows areas before non-areas
+    /* Shows areas before non-areas */
     public void visitAll(DataSet data, Boolean virtual) {
 
-        boolean profiler = Main.pref.getBoolean("mappaint.profiler",false);
-        profilerOmitDraw = Main.pref.getBoolean("mappaint.profiler.omitdraw",false);
+        //boolean profiler = Main.pref.getBoolean("mappaint.profiler",false);
+        //profilerOmitDraw = Main.pref.getBoolean("mappaint.profiler.omitdraw",false);
 
         useStyleCache = Main.pref.getBoolean("mappaint.cache",true);
@@ -1213,22 +1214,22 @@
         dist = ll1.greatCircleDistance(ll2);
 
-        long profilerStart = java.lang.System.currentTimeMillis();
-        long profilerLast = profilerStart;
-        int profilerN;
-        if(profiler)
-            System.out.println("Mappaint Profiler (" +
-                (useStyleCache ? "cache=true, " : "cache=false, ") +
-                "fillareas " + fillAreas + ", " +
-                "fillalpha=" + fillAlpha + "%, " +
-                "dist=" + (int)dist + "m)");
+        //long profilerStart = java.lang.System.currentTimeMillis();
+        //long profilerLast = profilerStart;
+        //int profilerN;
+        //if(profiler)
+        //    System.out.println("Mappaint Profiler (" +
+        //        (useStyleCache ? "cache=true, " : "cache=false, ") +
+        //        "fillareas " + fillAreas + ", " +
+        //        "fillalpha=" + fillAlpha + "%, " +
+        //        "dist=" + (int)dist + "m)");
 
         getSettings(virtual);
         useRealWidth = Main.pref.getBoolean("mappaint.useRealWidth",false);
         zoomLevelDisplay = Main.pref.getBoolean("mappaint.zoomLevelDisplay",false);
-        circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; // circumference of the earth in meter
+        circum = Main.map.mapView.getScale()*100*Main.proj.scaleFactor()*40041455; /* circumference of the earth in meter */
         styles = MapPaintStyles.getStyles().getStyleSet();
         drawMultipolygon = Main.pref.getBoolean("mappaint.multipolygon",true);
         drawRestriction = Main.pref.getBoolean("mappaint.restriction",true);
-        restrictionDebug = Main.pref.getBoolean("mappaint.restriction.debug",false);
+        //restrictionDebug = Main.pref.getBoolean("mappaint.restriction.debug",false);
         leftHandTraffic = Main.pref.getBoolean("mappaint.lefthandtraffic",false);
         orderFont = new Font(Main.pref.get("mappaint.font","Helvetica"), Font.PLAIN, Main.pref.getInteger("mappaint.fontsize", 8));
@@ -1243,15 +1244,15 @@
         viewid = nc.getViewID();
 
-        profilerVisibleNodes = 0;
-        profilerVisibleWays = 0;
-        profilerVisibleAreas = 0;
-        profilerSegments = 0;
-        profilerVisibleSegments = 0;
-
-        if(profiler)
-        {
-            System.out.format("Prepare  : %5dms\n", (java.lang.System.currentTimeMillis()-profilerLast));
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
+        //profilerVisibleNodes = 0;
+        //profilerVisibleWays = 0;
+        //profilerVisibleAreas = 0;
+        //profilerSegments = 0;
+        //profilerVisibleSegments = 0;
+
+        //if(profiler)
+        //{
+        //    System.out.format("Prepare  : %5dms\n", (java.lang.System.currentTimeMillis()-profilerLast));
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
 
         if (fillAreas > dist && styles != null && styles.hasAreas()) {
@@ -1259,5 +1260,5 @@
 
             /*** RELATIONS ***/
-            profilerN = 0;
+        //    profilerN = 0;
             for (final Relation osm : data.relations)
             {
@@ -1265,16 +1266,16 @@
                 {
                     osm.visit(this);
-                    profilerN++;
-                }
-            }
-
-            if(profiler)
-            {
-                System.out.format("Relations: %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
+        //            profilerN++;
+                }
+            }
+
+        //    if(profiler)
+        //    {
+        //        System.out.format("Relations: %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
 
             /*** AREAS ***/
-            profilerN = 0;
+        //    profilerN = 0;
             for (final Way osm : data.ways)
             {
@@ -1285,37 +1286,37 @@
                     {
                         osm.visit(this);
-                        profilerN++;
+        //                profilerN++;
                     } else
-                        noAreaWays.add((Way)osm);
-                }
-            }
-
-            if(profiler)
-            {
-                System.out.format("Areas    : %5dms, calls=%7d, visible=%d\n",
-                    (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleAreas);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
+                        noAreaWays.add(osm);
+                }
+            }
+
+        //    if(profiler)
+        //    {
+        //        System.out.format("Areas    : %5dms, calls=%7d, visible=%d\n",
+        //            (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleAreas);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
 
             /*** WAYS ***/
-            profilerN = 0;
+        //    profilerN = 0;
             fillAreas = 0;
             for (final OsmPrimitive osm : noAreaWays)
             {
                 osm.visit(this);
-                profilerN++;
-            }
-
-            if(profiler)
-            {
-                System.out.format("Ways     : %5dms, calls=%7d, visible=%d\n",
-                    (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleWays);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
+        //        profilerN++;
+            }
+
+        //    if(profiler)
+        //    {
+        //        System.out.format("Ways     : %5dms, calls=%7d, visible=%d\n",
+        //            (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleWays);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
         }
         else
         {
             /*** WAYS (filling disabled)  ***/
-            profilerN = 0;
+        //    profilerN = 0;
             for (final OsmPrimitive osm : data.ways)
                 if (!osm.incomplete && !osm.deleted && !osm.selected
@@ -1323,18 +1324,18 @@
                 {
                     osm.visit(this);
-                    profilerN++;
-                }
-
-            if(profiler)
-            {
-                System.out.format("Ways     : %5dms, calls=%7d, visible=%d\n",
-                    (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleWays);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
+        //            profilerN++;
+                }
+
+        //    if(profiler)
+        //    {
+        //        System.out.format("Ways     : %5dms, calls=%7d, visible=%d\n",
+        //            (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleWays);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
         }
 
         /*** SELECTED  ***/
         selectedCall = true;
-        profilerN = 0;
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.getSelected()) {
             if (!osm.incomplete && !osm.deleted && !(osm instanceof Node)
@@ -1342,13 +1343,13 @@
             {
                 osm.visit(this);
-                profilerN++;
-            }
-        }
-
-        if(profiler)
-        {
-            System.out.format("Selected : %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
+        //        profilerN++;
+            }
+        }
+
+        //if(profiler)
+        //{
+        //    System.out.format("Selected : %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
 
         /*** DISPLAY CACHED SEGMENTS (WAYS) NOW ***/
@@ -1356,5 +1357,5 @@
 
         /*** NODES ***/
-        profilerN = 0;
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.nodes)
             if (!osm.incomplete && !osm.deleted
@@ -1362,18 +1363,18 @@
             {
                 osm.visit(this);
-                profilerN++;
-            }
-
-        if(profiler)
-        {
-            System.out.format("Nodes    : %5dms, calls=%7d, visible=%d\n",
-                (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleNodes);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
+        //        profilerN++;
+            }
+
+        //if(profiler)
+        //{
+        //    System.out.format("Nodes    : %5dms, calls=%7d, visible=%d\n",
+        //        (java.lang.System.currentTimeMillis()-profilerLast), profilerN, profilerVisibleNodes);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
 
         /*** VIRTUAL  ***/
         if (virtualNodeSize != 0)
         {
-            profilerN = 0;
+        //    profilerN = 0;
             currentColor = nodeColor;
             for (final OsmPrimitive osm : data.ways)
@@ -1381,24 +1382,24 @@
                 && osm.mappaintVisibleCode != viewid )
                 {
-                    // TODO: move this into the SimplePaint code?
-                    if(!profilerOmitDraw)
+                    /* TODO: move this into the SimplePaint code? */
+        //            if(!profilerOmitDraw)
                         visitVirtual((Way)osm);
-                    profilerN++;
-                }
-
-            if(profiler)
-            {
-                System.out.format("Virtual  : %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
+        //            profilerN++;
+                }
+
+        //    if(profiler)
+        //    {
+        //        System.out.format("Virtual  : %5dms, calls=%7d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
 
             displaySegments(null);
         }
 
-        if(profiler)
-        {
-            System.out.format("Segments :          calls=%7d, visible=%d\n", profilerSegments, profilerVisibleSegments);
-            System.out.format("All      : %5dms\n", (profilerLast-profilerStart));
-        }
+        //if(profiler)
+        //{
+        //    System.out.format("Segments :          calls=%7d, visible=%d\n", profilerSegments, profilerVisibleSegments);
+        //    System.out.format("All      : %5dms\n", (profilerLast-profilerStart));
+        //}
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/SimplePaintVisitor.java	(revision 1415)
@@ -1,4 +1,6 @@
-// License: GPL. Copyright 2007 by Immanuel Scholz and others
+/* License: GPL. Copyright 2007 by Immanuel Scholz and others */
 package org.openstreetmap.josm.data.osm.visitor;
+
+/* To enable debugging or profiling remove the double / signs */
 
 import static org.openstreetmap.josm.tools.I18n.marktr;
@@ -127,42 +129,42 @@
 
     public void visitAll(DataSet data, Boolean virtual) {
-        boolean profiler = Main.pref.getBoolean("simplepaint.profiler",false);
-        long profilerStart = java.lang.System.currentTimeMillis();
-        long profilerLast = profilerStart;
-        int profilerN = 0;
-        if(profiler)
-            System.out.println("Simplepaint Profiler");
+        //boolean profiler = Main.pref.getBoolean("simplepaint.profiler",false);
+        //long profilerStart = java.lang.System.currentTimeMillis();
+        //long profilerLast = profilerStart;
+        //int profilerN = 0;
+        //if(profiler)
+        //    System.out.println("Simplepaint Profiler");
 
         getSettings(virtual);
 
-        if(profiler)
-        {
-            System.out.format("Prepare  : %4dms\n", (java.lang.System.currentTimeMillis()-profilerLast));
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
-
-        // draw tagged ways first, then untagged ways. takes
-        // time to iterate through list twice, OTOH does not
-        // require changing the colour while painting...
-        profilerN = 0;
+        //if(profiler)
+        //{
+        //    System.out.format("Prepare  : %4dms\n", (java.lang.System.currentTimeMillis()-profilerLast));
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
+
+        /* draw tagged ways first, then untagged ways. takes
+           time to iterate through list twice, OTOH does not
+           require changing the colour while painting... */
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.relations)
             if (!osm.deleted && !osm.selected)
             {
                 osm.visit(this);
-                profilerN++;
-            }
-
-        if(profiler)
-        {
-            System.out.format("Relations: %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
-
-        profilerN = 0;
+        //        profilerN++;
+            }
+
+        //if(profiler)
+        //{
+        //    System.out.format("Relations: %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
+
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.ways)
             if (!osm.deleted && !osm.selected && osm.tagged)
             {
                 osm.visit(this);
-                profilerN++;
+        //        profilerN++;
             }
         displaySegments();
@@ -172,47 +174,48 @@
             {
                 osm.visit(this);
-                profilerN++;
+        //        profilerN++;
             }
         displaySegments();
 
-        if(profiler)
-        {
-            System.out.format("Ways     : %4dms, n=%5d\n",
-                (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
-
-        profilerN = 0;
+        //if(profiler)
+        //{
+        //    System.out.format("Ways     : %4dms, n=%5d\n",
+        //        (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
+
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.getSelected())
             if (!osm.deleted)
             {
                 osm.visit(this);
-                profilerN++;
+        //        profilerN++;
             }
         displaySegments();
 
-        if(profiler)
-        {
-            System.out.format("Selected : %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
-
-        profilerN = 0;
+        //if(profiler)
+        //{
+        //    System.out.format("Selected : %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
+
+        //profilerN = 0;
         for (final OsmPrimitive osm : data.nodes)
             if (!osm.deleted && !osm.selected)
             {
                 osm.visit(this);
-                profilerN++;
-            }
-        if(profiler)
-        {
-            System.out.format("Nodes    : %4dms, n=%5d\n",
-                (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-            profilerLast = java.lang.System.currentTimeMillis();
-        }
+        //        profilerN++;
+            }
+
+        //if(profiler)
+        //{
+        //    System.out.format("Nodes    : %4dms, n=%5d\n",
+        //        (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //    profilerLast = java.lang.System.currentTimeMillis();
+        //}
 
         if(virtualNodeSize != 0)
         {
-            profilerN = 0;
+        //    profilerN = 0;
             currentColor = nodeColor;
             for (final OsmPrimitive osm : data.ways)
@@ -220,19 +223,19 @@
                     {
                         visitVirtual((Way)osm);
-                        profilerN++;
+        //                profilerN++;
                     }
             displaySegments();
 
-            if(profiler)
-            {
-                System.out.format("Virtual  : %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
-                profilerLast = java.lang.System.currentTimeMillis();
-            }
-        }
-
-        if(profiler)
-        {
-            System.out.format("All      : %4dms\n", (profilerLast-profilerStart));
-        }
+        //    if(profiler)
+        //    {
+        //        System.out.format("Virtual  : %4dms, n=%5d\n", (java.lang.System.currentTimeMillis()-profilerLast), profilerN);
+        //        profilerLast = java.lang.System.currentTimeMillis();
+        //    }
+        }
+
+        //if(profiler)
+        //{
+        //    System.out.format("All      : %4dms\n", (profilerLast-profilerStart));
+        //}
     }
 
@@ -294,11 +297,11 @@
             return;
 
-        // show direction arrows, if draw.segment.relevant_directions_only is not set, the way is tagged with a direction key
-        // (even if the tag is negated as in oneway=false) or the way is selected
+        /* show direction arrows, if draw.segment.relevant_directions_only is not set, the way is tagged with a direction key
+           (even if the tag is negated as in oneway=false) or the way is selected */
 
         boolean showThisDirectionArrow = w.selected
         || (showDirectionArrow && (!showRelevantDirectionsOnly || w.hasDirectionKeys));
-        // head only takes over control if the option is true,
-        // the direction should be shown at all and not only because it's selected
+        /* head only takes over control if the option is true,
+           the direction should be shown at all and not only because it's selected */
         boolean showOnlyHeadArrowOnly = showThisDirectionArrow && !w.selected && showHeadArrowOnly;
         Color wayColor;
@@ -390,5 +393,5 @@
             }
 
-            displaySegments(); // draw nodes on top!
+            displaySegments(); /* draw nodes on top! */
             Color c = g.getColor();
             g.setColor(backgroundColor);
Index: /trunk/src/org/openstreetmap/josm/data/projection/Lambert.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/Lambert.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/data/projection/Lambert.java	(revision 1415)
@@ -206,9 +206,9 @@
      * reference ellipsoid used by Lambert is Clark
      *
-     * @param coord projected coordinates pair in meters
-     * @param Xs    false east (coordinate system origin) in meters
-     * @param Ys    false north (coordinate system origin) in meters
-     * @param c     projection constant
-     * @param n     projection exponent
+     * @param eastNorth projected coordinates pair in meters
+     * @param Xs        false east (coordinate system origin) in meters
+     * @param Ys        false north (coordinate system origin) in meters
+     * @param c         projection constant
+     * @param n         projection exponent
      * @return LatLon in radian
      */
@@ -236,7 +236,4 @@
      * Translate latitude/longitude in WGS84, (ellipsoid GRS80) to Lambert
      * geographic, (ellipsoid Clark)
-     *
-     * @param wgs
-     * @return
      */
     private LatLon GRS802Clark(LatLon wgs) {
@@ -256,8 +253,4 @@
     }
 
-    /**
-     * @param lambert
-     * @return
-     */
     private LatLon Clark2GRS80(LatLon lambert) {
         double lat = lambert.lat(); // in radian
Index: /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 1415)
@@ -4,6 +4,4 @@
 import java.awt.Dimension;
 import java.awt.event.ActionEvent;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
 import java.awt.GridBagLayout;
 import java.awt.Toolkit;
@@ -11,7 +9,4 @@
 import javax.swing.AbstractAction;
 import javax.swing.Action;
-import javax.swing.BorderFactory;
-import javax.swing.BoundedRangeModel;
-import javax.swing.InputMap;
 import javax.swing.JButton;
 import javax.swing.JComponent;
@@ -19,13 +14,10 @@
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
-import javax.swing.JRootPane;
 import javax.swing.JScrollBar;
 import javax.swing.JScrollPane;
 import javax.swing.KeyStroke;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.JMultilineLabel;
 import org.openstreetmap.josm.tools.GBC;
-import org.openstreetmap.josm.tools.I18n;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -37,9 +29,9 @@
     /**
      * Sets up the dialog. The first button is always the default.
-     * @param Component The parent element that will be used for position and maximum size
-     * @param String The text that will be shown in the window titlebar
-     * @param Component Any component that should be show above the buttons (e.g. JLabel)
-     * @param String[] The labels that will be displayed on the buttons
-     * @param String[] The path to the icons that will be displayed on the buttons. Path is relative to JOSM's image directory. File extensions need to be included. If a button should not have an icon pass null.
+     * @param parent The parent element that will be used for position and maximum size
+     * @param title The text that will be shown in the window titlebar
+     * @param content Any component that should be show above the buttons (e.g. JLabel)
+     * @param buttonTexts The labels that will be displayed on the buttons
+     * @param buttonIcons The path to the icons that will be displayed on the buttons. Path is relative to JOSM's image directory. File extensions need to be included. If a button should not have an icon pass null.
      */ 
     public ExtendedDialog(Component parent, String title, Component content, String[] buttonTexts, String[] buttonIcons) {
Index: /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/GettingStarted.java	(revision 1415)
@@ -15,5 +15,4 @@
 
 import java.awt.BorderLayout;
-import java.awt.Component;
 import java.awt.EventQueue;
 
@@ -142,5 +141,5 @@
         ArrayList<Future<String>> linkContent = new ArrayList<Future<String>>();
         for(int i=0; i < links.size(); i++) {
-            String[] obj = (String[])links.get(i);
+            String[] obj = links.get(i);
             int targetVersion = Integer.parseInt(obj[1]);
             String condition = obj[0];
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 1415)
@@ -11,6 +11,4 @@
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
-import java.io.File;
-import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collection;
Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 1415)
@@ -63,5 +63,4 @@
 import org.openstreetmap.josm.actions.search.SearchAction;
 import org.openstreetmap.josm.actions.ToggleGPXLinesAction;
-import org.openstreetmap.josm.data.DataSetChecker;
 import org.openstreetmap.josm.tools.Shortcut;
 
Index: /trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 1415)
@@ -179,5 +179,5 @@
     public void addMapMode(IconToggleButton b) {
         toolBarActions.add(b);
-        toolGroup.add((AbstractButton)b);
+        toolGroup.add(b);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/MapSlider.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapSlider.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MapSlider.java	(revision 1415)
@@ -31,5 +31,5 @@
         double sizey = this.mv.scale * this.mv.getHeight();
         for (int zoom = 0; zoom <= 150; zoom++, sizex *= 1.1, sizey *= 1.1) {
-            if (sizex > this.mv.world.east() || sizey > this.mv.world.north()) {
+            if (sizex > MapView.world.east() || sizey > MapView.world.north()) {
                 preventChange=true;
                 setValue(zoom);
Index: /trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 1415)
@@ -24,5 +24,4 @@
 import java.awt.event.MouseListener;
 import java.lang.reflect.InvocationTargetException;
-import java.text.DecimalFormat;
 import java.util.Collection;
 import java.util.ConcurrentModificationException;
Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 1415)
@@ -365,6 +365,6 @@
          * that I switch layers and actions at the same time and it was annoying to mind the
          * order. This way it works as visual clue for new users */
-        for (Enumeration e = Main.map.toolGroup.getElements() ; e.hasMoreElements() ;) {
-            AbstractButton x=(AbstractButton)e.nextElement();
+        for (Enumeration<AbstractButton> e = Main.map.toolGroup.getElements() ; e.hasMoreElements() ;) {
+            AbstractButton x=e.nextElement();
             x.setEnabled(((MapMode)x.getAction()).layerIsSupported(layer));
         }
@@ -400,5 +400,4 @@
      *
      * @return <code>true</code> if a zoom operation has been performed
-     * @author Jan Peter Stotz
      */
     public boolean zoomToEditLayerBoundingBox() {
Index: /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 1415)
@@ -3,5 +3,4 @@
 
 import java.awt.Component;
-import java.awt.Dimension;
 import java.awt.GridBagLayout;
 import java.awt.event.ComponentEvent;
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java	(revision 1415)
@@ -32,5 +32,4 @@
 
 import javax.swing.Box;
-import javax.swing.DefaultComboBoxModel;
 import javax.swing.DefaultListCellRenderer;
 import javax.swing.JComboBox;
@@ -259,5 +258,5 @@
         }
 
-        Main.ds.fireSelectionChanged(sel);
+        DataSet.fireSelectionChanged(sel);
         selectionChanged(sel); // update whole table
         Main.parent.repaint(); // repaint all - drawing could have been changed
@@ -342,5 +341,5 @@
             return;
         Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, value));
-        Main.ds.fireSelectionChanged(sel);
+        DataSet.fireSelectionChanged(sel);
         selectionChanged(sel); // update table
         Main.parent.repaint(); // repaint all - drawing could have been changed
@@ -366,7 +365,5 @@
     }
     private String objKey;
-    /**
-     * @return
-     */
+
     private TreeMap<String, TreeSet<String>> createAutoCompletionInfo(
             boolean edit) {
@@ -399,5 +396,5 @@
         Collection<OsmPrimitive> sel = Main.ds.getSelected();
         Main.main.undoRedo.add(new ChangePropertyCommand(sel, key, null));
-        Main.ds.fireSelectionChanged(sel);
+        DataSet.fireSelectionChanged(sel);
         selectionChanged(sel); // update table
 
@@ -582,5 +579,5 @@
                             }
                             Main.main.undoRedo.add(new ChangeCommand(cur, rel));
-                            Main.ds.fireSelectionChanged(sel);
+                            DataSet.fireSelectionChanged(sel);
                             selectionChanged(sel); // update whole table
                         }
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationEditor.java	(revision 1415)
@@ -6,5 +6,4 @@
 import java.awt.BorderLayout;
 import java.awt.Dimension;
-import java.awt.FlowLayout;
 import java.awt.GridBagLayout;
 import java.awt.GridLayout;
@@ -110,5 +109,5 @@
     private final JTable memberTable = new JTable(memberData);
 
-    // =================== FIXME FIXME FIXME =====================
+    // =================== FIXME =====================
     // As soon as API 0.5 is dead, drop all the collation stuff from here ...
 
@@ -208,5 +207,5 @@
         this.relation = relation;
 
-        ordered = Main.pref.get("osm-server.version", "0.5").equals("0.6");
+        ordered = !Main.pref.get("osm-server.version", "0.5").equals("0.5");
 
         if (relation == null) {
@@ -248,12 +247,4 @@
         });
 
-        /* I don't like this text any more. Let's just get on with doing the specialist
-         * editors instead of talking about it.
-        JLabel help = new JLabel("<html><em>"+
-            tr("This is the basic relation editor which allows you to change the relation's tags " +
-            "as well as the members. In addition to this we should have a smart editor that " +
-            "detects the type of relationship and limits your choices in a sensible way.")+"</em></html>");
-        getContentPane().add(help, BorderLayout.NORTH);
-         */
         try { setAlwaysOnTop(true); } catch (SecurityException sx) {}
 
@@ -326,31 +317,16 @@
         bothTables.add(new JScrollPane(propertyTable), GBC.eop().fill(GBC.BOTH));
         bothTables.add(status = new JLabel(tr("Members")), GBC.eol().fill(GBC.HORIZONTAL));
+        // this is not exactly pretty but the four buttons simply don't fit in one line.
+        // we should have smaller buttons for situations like this.
+        JPanel buttonPanel = new JPanel(new GridLayout(2,ordered ? 3 : 2));
+
         if (ordered) {
-            JPanel upDownPanel = new JPanel();
-            upDownPanel.setLayout(new BoxLayout(upDownPanel, BoxLayout.Y_AXIS));
-
-            upDownPanel.add(createButton(null, "moveup", tr("Move the currently selected members up"),
-                    KeyEvent.VK_U, new ActionListener() {
+            buttonPanel.add(createButton(null, "moveup", tr("Move the currently selected members up"), KeyEvent.VK_U, new ActionListener() {
                 public void actionPerformed(ActionEvent e) {
                     moveMembers(-1);
                 }
             }));
-            upDownPanel.add(createButton(null, "movedown", tr("Move the currently selected members down"),
-                    KeyEvent.VK_N, new ActionListener() {
-                public void actionPerformed(ActionEvent e) {
-                    moveMembers(1);
-                }
-            }));
-
-
-            bothTables.add(new JScrollPane(memberTable), GBC.std().fill(GBC.BOTH));
-            bothTables.add(upDownPanel, GBC.eol().fill(GBC.VERTICAL));
-        } else {
-            bothTables.add(new JScrollPane(memberTable), GBC.eol().fill(GBC.BOTH));
-        }
-
-        // this is not exactly pretty but the four buttons simply don't fit in one line.
-        // we should have smaller buttons for situations like this.
-        JPanel buttonPanel = new JPanel(new GridLayout(2,2));
+        }
+        bothTables.add(new JScrollPane(memberTable), GBC.eol().fill(GBC.BOTH));
 
         buttonPanel.add(createButton(marktr("Add Selected"),"addselected",
@@ -367,4 +343,12 @@
             }
         }));
+
+        if(ordered) {
+            buttonPanel.add(createButton(null, "movedown", tr("Move the currently selected members down"), KeyEvent.VK_N, new ActionListener() {
+                public void actionPerformed(ActionEvent e) {
+                    moveMembers(1);
+                }
+            }));
+        }
 
         buttonPanel.add(createButton(marktr("Remove"),"remove",
@@ -382,25 +366,4 @@
         }));
 
-        /*buttonPanel.add(createButton(marktr("Select"),"select",
-        tr("Highlight the member from the current table row as JOSM's selection"), KeyEvent.VK_S, new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                ArrayList<OsmPrimitive> sel;
-                int cnt = memberTable.getSelectedRowCount();
-                if(cnt > 0)
-                {
-                    sel = new ArrayList<OsmPrimitive>(cnt);
-                    for (int i : memberTable.getSelectedRows())
-                        sel.add((OsmPrimitive)memberTable.getValueAt(i, 1));
-                }
-                else
-                {
-                    cnt = memberTable.getRowCount();
-                    sel = new ArrayList<OsmPrimitive>(cnt);
-                    for (int i = 0; i < cnt; ++i)
-                        sel.add((OsmPrimitive)memberTable.getValueAt(i, 1));
-                }
-                Main.ds.setSelected(sel);
-            }
-        }));*/
         buttonPanel.add(createButton(marktr("Download Members"),"downloadincomplete",
         tr("Download all incomplete ways and nodes in relation"), KeyEvent.VK_L, new ActionListener() {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1415)
@@ -19,8 +19,5 @@
 import javax.swing.ListSelectionModel;
 import javax.swing.event.ListSelectionListener;
-import javax.swing.event.ListSelectionEvent;
-
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.AutoScaleAction;
 import org.openstreetmap.josm.command.DeleteCommand;
 import org.openstreetmap.josm.data.osm.DataSet;
Index: /trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java	(revision 1415)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.GridBagLayout;
@@ -12,6 +11,4 @@
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
-import java.awt.event.MouseAdapter;
-import java.util.HashMap;
 
 import javax.swing.JLabel;
@@ -24,5 +21,4 @@
 
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.OsmUrlToBounds;
@@ -87,5 +83,5 @@
             public void keyPressed(KeyEvent keyEvent) {}
             public void keyReleased(KeyEvent keyEvent) {
-                if (keyEvent.getKeyCode() == keyEvent.VK_ENTER && parseURL(gui))
+                if (keyEvent.getKeyCode() == KeyEvent.VK_ENTER && parseURL(gui))
                     gui.closeDownloadDialog(true);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java	(revision 1415)
@@ -41,5 +41,4 @@
 import org.openstreetmap.josm.actions.SaveAction;
 import org.openstreetmap.josm.actions.SaveAsAction;
-import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -222,9 +221,4 @@
     @Override public void mergeFrom(final Layer from) {
         final MergeVisitor visitor = new MergeVisitor(data,((OsmDataLayer)from).data);
-//        int i=0;
-        int max = ((OsmDataLayer)from).data.allPrimitives().size();
-
-//        System.out.format("Add/Merge data:");
-
         for (final OsmPrimitive osm : ((OsmDataLayer)from).data.allPrimitives()) {
 //            i++;
Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java	(revision 1415)
@@ -129,41 +129,4 @@
 
     /**
-     * Find the closest track point within the pixelTolerance of the screen point pNear
-     * @param pNear : the point in screen coordinates near which to find a track point
-     * @param pixelTolerance : only accept the point if within this number of pixels of en
-     * @return the nearest trackpoint or null if nothing nearby
-     *
-     * XXX seems unused, F.R. 2008-03-15
-    private WayPoint getClosestTrackPoint(Point pNear, double pixelTolerance) {
-        WayPoint cw = null;
-        AudioMarker recentlyPlayedMarker = AudioMarker.recentlyPlayedMarker();
-        if (recentlyPlayedMarker != null) {
-            // Find the track point closest to letting go of the play head
-            double minDistance = pixelTolerance;
-            GpxLayer trackLayer = recentlyPlayedMarker.parentLayer.fromLayer;
-            if (trackLayer.data.tracks == null)
-                return null;
-
-            for (GpxTrack track : trackLayer.data.tracks) {
-                if (track.trackSegs == null)
-                    continue;
-
-                for (Collection<WayPoint> trackseg : track.trackSegs) {
-                    for (WayPoint w : trackseg) {
-                        Point p = Main.map.mapView.getPoint(w.eastNorth);
-                        double distance = p.distance(pNear);
-                        if (distance <= minDistance) {
-                            cw = w;
-                            minDistance = distance;
-                        }
-                    }
-                }
-            }
-        }
-        return cw;
-    }
-    */
-
-    /**
      * reposition the play head at the point on the track nearest position given,
      * providing we are within reasonable distance from the track; otherwise reset to the
Index: /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 1415)
@@ -11,6 +11,4 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.OsmUtils;
-import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.Main;
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ColorPreference.java	(revision 1415)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.gui.preferences;
 
-import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -13,8 +12,5 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -33,11 +29,8 @@
 import javax.swing.table.TableCellRenderer;
 import javax.swing.BorderFactory;
-import javax.swing.Box;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.visitor.MapPaintVisitor;
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
-import org.openstreetmap.josm.gui.layer.GpxLayer;
-import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.MapScaler;
 import org.openstreetmap.josm.gui.dialogs.ConflictDialog;
@@ -77,5 +70,5 @@
                 colorKeyList.put(getName(key), key);
         }
-        for (Entry k : colorKeyList.entrySet()) {
+        for (Entry<String, String> k : colorKeyList.entrySet()) {
             Vector<Object> row = new Vector<Object>(2);
             row.add(k.getValue());
@@ -83,5 +76,5 @@
             tableModel.addRow(row);
         }
-        for (Entry k : colorKeyList_mappaint.entrySet()) {
+        for (Entry<String, String> k : colorKeyList_mappaint.entrySet()) {
             Vector<Object> row = new Vector<Object>(2);
             row.add(k.getValue());
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/LanguagePreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/LanguagePreference.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/LanguagePreference.java	(revision 1415)
@@ -55,5 +55,5 @@
 
         JPanel panel = null;
-        for(PreferenceSetting s : gui.settings)
+        for(PreferenceSetting s : PreferenceDialog.settings)
         {
             if(s instanceof LafPreference)
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 1415)
@@ -22,5 +22,4 @@
 import javax.swing.Scrollable;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.PluginDownloader;
 import org.openstreetmap.josm.plugins.PluginSelection;
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 1415)
@@ -7,6 +7,4 @@
 import java.awt.GridBagLayout;
 import java.awt.ScrollPane;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.util.Collection;
 import java.util.Iterator;
@@ -56,5 +54,5 @@
      */
     public JPanel createPreferenceTab(String icon, String title, String desc) {
-        return createPreferenceTab(icon, title, desc, true);
+        return createPreferenceTab(icon, title, desc, false);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/TaggingPresetPreference.java	(revision 1415)
@@ -11,5 +11,4 @@
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.StringTokenizer;
 
 import javax.swing.BorderFactory;
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java	(revision 1415)
@@ -9,5 +9,4 @@
 import java.awt.Image;
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
@@ -27,5 +26,4 @@
 import javax.swing.Action;
 import javax.swing.ImageIcon;
-import javax.swing.JButton;
 import javax.swing.JComboBox;
 import javax.swing.JComponent;
@@ -50,5 +48,4 @@
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
-import org.openstreetmap.josm.tools.OpenBrowser;
 import org.openstreetmap.josm.tools.UrlLabel;
 import org.openstreetmap.josm.tools.XmlObjectParser;
Index: /trunk/src/org/openstreetmap/josm/io/DiffResultReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/DiffResultReader.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/io/DiffResultReader.java	(revision 1415)
@@ -7,28 +7,15 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
 import java.util.Map;
-import java.util.Map.Entry;
 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParserFactory;
 
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.data.osm.DataSet;
-import org.openstreetmap.josm.data.osm.DataSource;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.data.osm.RelationMember;
-import org.openstreetmap.josm.data.osm.User;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.osm.visitor.AddVisitor;
 import org.openstreetmap.josm.data.osm.visitor.Visitor;
 import org.openstreetmap.josm.gui.PleaseWaitDialog;
@@ -77,7 +64,4 @@
     /**
      * Parse the given input source and return the dataset.
-     * @param ref The dataset that is search in for references first. If
-     *      the Reference is not found here, Main.ds is searched and a copy of the
-     *  elemet found there is returned.
      */
     public static void parseDiffResult(InputStream source, Collection<OsmPrimitive> osm, Collection<OsmPrimitive> processed, Map<OsmPrimitive,Long> newIdMap, PleaseWaitDialog pleaseWaitDlg)
Index: /trunk/src/org/openstreetmap/josm/io/NmeaReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/io/NmeaReader.java	(revision 1415)
@@ -11,5 +11,4 @@
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Date;
@@ -202,5 +201,4 @@
             }
             rd.close();
-            Object[] wparr = ps.waypoints.toArray();
             currentTrack.trackSegs.add(ps.waypoints);
             data.recalculateBounds();
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 1415)
@@ -7,6 +7,4 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.io.FileInputStream;
-import java.nio.channels.FileChannel;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -436,5 +434,5 @@
 
           // Cache the ways here for much better search performance
-          HashMap hm = new HashMap(10000);
+          HashMap<Long, Way> hm = new HashMap<Long, Way>(10000);
           for (Way wy : ds.ways)
             hm.put(wy.id, wy);
@@ -454,5 +452,5 @@
                          }
                     } else if (emd.type.equals("way")) {
-                         em.member = (OsmPrimitive)hm.get(emd.id);
+                         em.member = hm.get(emd.id);
                          if (em.member == null)
                             em.member = findWay(emd.id);
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerObjectReader.java	(revision 1415)
@@ -28,7 +28,4 @@
     /**
      * Method to download single objects from OSM server. ways, relations, nodes
-     * @param id Object ID
-     * @param type way node relation
-     * @param full download with or without child objects
      * @return the data requested
      * @throws SAXException
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerWriter.java	(revision 1415)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.ByteArrayOutputStream;
@@ -13,5 +12,4 @@
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
 import java.lang.Math;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 1415)
@@ -4,5 +4,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.GridBagLayout;
Index: /trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java	(revision 1415)
@@ -6,5 +6,4 @@
 
 import java.awt.GridBagConstraints;
-import java.awt.GridBagLayout;
 import java.awt.Insets;
 import java.awt.event.ActionEvent;
@@ -27,5 +26,4 @@
 import java.util.Map.Entry;
 
-import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.JCheckBox;
Index: /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/tools/BugReportExceptionHandler.java	(revision 1415)
@@ -10,15 +10,6 @@
 import java.awt.datatransfer.StringSelection;
 import java.awt.datatransfer.Transferable;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.io.StringWriter;
-import java.net.URL;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.LinkedList;
 
 import javax.swing.JLabel;
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java	(revision 1415)
@@ -45,5 +45,5 @@
         //System.out.println("Going to handle method "+method+" (short: "+method.getName()+") with event "+args[0]);
         if (method.getName().equals("handleQuit")) {
-            handled = !Main.main.breakBecauseUnsavedChanges();
+            handled = !Main.breakBecauseUnsavedChanges();
         } else if (method.getName().equals("handleAbout")) {
             Main.main.menu.about.actionPerformed(null);
Index: /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java	(revision 1415)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.tools;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.openstreetmap.josm.tools.PlatformHookUnixoid;
Index: /trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/tools/PresetTextComparator.java	(revision 1415)
@@ -5,8 +5,8 @@
 import javax.swing.JMenuItem;
 
-public class PresetTextComparator implements Comparator {
+public class PresetTextComparator implements Comparator<JMenuItem> {
 	//TODO add error checking and stuff
-	public int compare(Object arg0, Object arg1) {
-		return ((JMenuItem)arg0).getText().compareTo(((JMenuItem)arg1).getText());
+	public int compare(JMenuItem arg0, JMenuItem arg1) {
+		return arg0.getText().compareTo(arg1.getText());
 	}
 
Index: /trunk/src/org/openstreetmap/josm/tools/Shortcut.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 1414)
+++ /trunk/src/org/openstreetmap/josm/tools/Shortcut.java	(revision 1415)
@@ -260,12 +260,4 @@
     public static final int GROUPS_ALT2 = GROUP__MAX * 2;
 
-    // safely read a shortcut from the preferences
-    private static String[] getConfigStringArray(String key) {
-        String s = Main.pref.get(key, null);
-        if (s == null || s.equals("null") || s.equals(""))
-            return null;
-        return s.split(";");
-    }
-
     // bootstrap
     private static boolean initdone = false;
