Index: /applications/editors/josm/plugins/agpifoj/.classpath
===================================================================
--- /applications/editors/josm/plugins/agpifoj/.classpath	(revision 18592)
+++ /applications/editors/josm/plugins/agpifoj/.classpath	(revision 18593)
@@ -2,6 +2,7 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry kind="lib" path="/JOSM/lib/metadata-extractor-2.3.1-nosun.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /applications/editors/josm/plugins/agpifoj/build.xml
===================================================================
--- /applications/editors/josm/plugins/agpifoj/build.xml	(revision 18592)
+++ /applications/editors/josm/plugins/agpifoj/build.xml	(revision 18593)
@@ -34,5 +34,5 @@
                 <attribute name="Plugin-Early" value="false"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/AgPifoJ"/>
-                <attribute name="Plugin-Mainversion" value="2322"/>
+                <attribute name="Plugin-Mainversion" value="2450"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java
===================================================================
--- /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java	(revision 18592)
+++ /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojLayer.java	(revision 18593)
@@ -9,5 +9,5 @@
 
 import java.awt.Component;
-import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Point;
 import java.awt.Rectangle;
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.CachedLatLon;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -109,9 +110,9 @@
         	this.errorMessages.add(message);
         }
-        
+
         public Loader(File[] selection) {
             super(tr("Extracting GPS locations from EXIF"));
             this.selection = selection;
-            errorMessages = new LinkedHashSet<String>(); 
+            errorMessages = new LinkedHashSet<String>();
         }
 
@@ -122,5 +123,5 @@
             try {
                 addRecursiveFiles(files, selection);
-            } catch(NullPointerException npe) {            	
+            } catch(NullPointerException npe) {
                 rememberError(tr("One of the selected files was null"));
             }
@@ -128,5 +129,5 @@
             if (cancelled) {
                 return;
-            }            
+            }
             progressMonitor.subTask(tr("Read photos..."));
             progressMonitor.setTicksCount(files.size());
@@ -200,5 +201,5 @@
                         } catch(NullPointerException npe) {
                             npe.printStackTrace();
-                            
+
                             rememberError(tr("Found null file in directory {0}\n", f.getPath()));
                         }
@@ -232,5 +233,5 @@
     		return sb.toString();
         }
-        
+
         @Override protected void finish() {
         	if (!errorMessages.isEmpty()) {
@@ -361,5 +362,5 @@
 
     @Override
-    public void paint(Graphics g, MapView mv) {
+    public void paint(Graphics2D g, MapView mv, Bounds bounds) {
 
         int iconWidth = icon.getIconWidth() / 2;
Index: /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java
===================================================================
--- /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java	(revision 18592)
+++ /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java	(revision 18593)
@@ -96,5 +96,6 @@
         }
 
-        public String toString() {
+        @Override
+		public String toString() {
             return name;
         }
@@ -172,5 +173,5 @@
                     x.printStackTrace();
                     JOptionPane.showMessageDialog(
-                    		Main.parent, 
+                    		Main.parent,
                     		tr("Error while parsing {0}",sel.getName())+": "+x.getMessage(),
                     		tr("Error"),
@@ -181,5 +182,5 @@
                     x.printStackTrace();
                     JOptionPane.showMessageDialog(
-                    		Main.parent, 
+                    		Main.parent,
                     		tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
                     		tr("Error"),
@@ -386,6 +387,6 @@
             while (! isOk) {
                 int answer = JOptionPane.showConfirmDialog(
-                		Main.parent, panel, 
-                		tr("Synchronize time from a photo of the GPS receiver"), 
+                		Main.parent, panel,
+                		tr("Synchronize time from a photo of the GPS receiver"),
                 		JOptionPane.OK_CANCEL_OPTION,
                 		JOptionPane.QUESTION_MESSAGE
@@ -637,9 +638,6 @@
         // 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.
-        Collection<Layer> layerCol = Main.map.mapView.getAllLayers();
-        Iterator<Layer> layerIter = layerCol.iterator();
         boolean boundingBoxedLayerFound = false;
-        while (layerIter.hasNext()) {
-            Layer l = layerIter.next();
+        for (Layer l: Main.map.mapView.getAllLayers()) {
             if (l != yLayer) {
                 BoundingXYVisitor bbox = new BoundingXYVisitor();
@@ -657,5 +655,5 @@
         }
 
-        Main.main.map.repaint();
+        Main.map.repaint();
 
         JOptionPane.showMessageDialog(Main.parent, tr("Found {0} matches of {1} in GPX track {2}", matched, dateImgLst.size(), selectedGpx.name),
@@ -886,5 +884,5 @@
         ExtendedDialog d = new ExtendedDialog(Main.parent,
             tr("Adjust timezone and offset"),
-            new String[] { tr("Close"),  tr("Default Values") }           
+            new String[] { tr("Close"),  tr("Default Values") }
         );
 
Index: /applications/editors/josm/plugins/graphview/build.xml
===================================================================
--- /applications/editors/josm/plugins/graphview/build.xml	(revision 18592)
+++ /applications/editors/josm/plugins/graphview/build.xml	(revision 18593)
@@ -57,5 +57,5 @@
                 <attribute name="Plugin-Description" value="Visualizes routing information as a routing graph."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Graphview"/>
-                <attribute name="Plugin-Mainversion" value="2381"/>
+                <attribute name="Plugin-Mainversion" value="2450"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
===================================================================
--- /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java	(revision 18592)
+++ /applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java	(revision 18593)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -148,5 +149,5 @@
 
 		List<Segment> edgeSegments = e.getPropertyValue(GraphEdgeSegments.PROPERTY);
-		
+
 		if (edgeSegments.size() > 0) {
 
@@ -283,9 +284,5 @@
 
 	@Override
-	public void paint(final Graphics g, final MapView mv) {
-
-		assert g instanceof Graphics2D;
-		Graphics2D g2D = ((Graphics2D)g);
-
+	public void paint(final Graphics2D g, final MapView mv, Bounds bounds) {
 		if (wayGraph != null) {
 
@@ -295,5 +292,5 @@
 
 			for (GraphEdge e : wayGraph.getEdges()) {
-				paintGraphEdge(e, g2D, mv);
+				paintGraphEdge(e, g, mv);
 			}
 
Index: /applications/editors/josm/plugins/slippymap/.classpath
===================================================================
--- /applications/editors/josm/plugins/slippymap/.classpath	(revision 18592)
+++ /applications/editors/josm/plugins/slippymap/.classpath	(revision 18593)
@@ -2,6 +2,6 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/josm"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="build"/>
 </classpath>
Index: /applications/editors/josm/plugins/slippymap/build.xml
===================================================================
--- /applications/editors/josm/plugins/slippymap/build.xml	(revision 18592)
+++ /applications/editors/josm/plugins/slippymap/build.xml	(revision 18593)
@@ -26,5 +26,5 @@
                 <attribute name="Plugin-Description" value="Displays a slippy map grid in JOSM. Can load tiles from slippy map as background and request updates."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/SlippyMap"/>
-                <attribute name="Plugin-Mainversion" value="2351"/>
+                <attribute name="Plugin-Mainversion" value="2450"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java
===================================================================
--- /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java	(revision 18592)
+++ /applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java	(revision 18593)
@@ -5,6 +5,6 @@
 import java.awt.Color;
 import java.awt.Component;
-import java.awt.Dimension;
 import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Image;
 import java.awt.Point;
@@ -16,21 +16,27 @@
 import java.awt.image.ImageObserver;
 import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashSet;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.LinkedList;
-import java.util.HashSet;
 
 import javax.swing.AbstractAction;
 import javax.swing.Icon;
+import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JMenuItem;
-import javax.swing.JCheckBoxMenuItem;
 import javax.swing.JPopupMenu;
 import javax.swing.JSeparator;
 import javax.swing.SwingUtilities;
 
+import org.openstreetmap.gui.jmapviewer.JobDispatcher;
+import org.openstreetmap.gui.jmapviewer.MemoryTileCache;
+import org.openstreetmap.gui.jmapviewer.OsmFileCacheTileLoader;
+import org.openstreetmap.gui.jmapviewer.Tile;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileCache;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileLoader;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
+import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -41,8 +47,4 @@
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.tools.ImageProvider;
-
-import org.openstreetmap.gui.jmapviewer.*;
-import org.openstreetmap.gui.jmapviewer.interfaces.*;
-import org.openstreetmap.gui.jmapviewer.Tile;
 
 /**
@@ -501,5 +503,5 @@
         //int otherZooms[] = {-5, -4, -3, 2, -2, 1, -1};
         int otherZooms[] = { -1, 1, -2, 2, -3, -4, -5};
-        int painted = 0;;
+        int painted = 0;
         debug = true;
         for (int zoomOff : otherZooms) {
@@ -604,5 +606,5 @@
     // The "border" tile tells us the boundaries of where we may
     // draw.  It will not be from the zoom level that is being
-    // drawn currently.  If drawing the currentZoomLevel, 
+    // drawn currently.  If drawing the currentZoomLevel,
     // border is null and we draw the entire tile set.
     List<Tile> paintTileImages(Graphics g, TileSet ts, int zoom, Tile border) {
@@ -616,5 +618,5 @@
             if (img == null) {
                 if (debug)
-                    out("missed tile: " + tile); 
+                    out("missed tile: " + tile);
                 missedTiles.add(tile);
                 continue;
@@ -808,9 +810,9 @@
      */
     @Override
-    public void paint(Graphics g, MapView mv) {
-        long start = System.currentTimeMillis();
+    public void paint(Graphics2D g, MapView mv, Bounds bounds) {
+        //long start = System.currentTimeMillis();
         LatLon topLeft = mv.getLatLon(0, 0);
         LatLon botRight = mv.getLatLon(mv.getWidth(), mv.getHeight());
-        Graphics oldg = g;
+        Graphics2D oldg = g;
 
         if (botRight.lon() == 0.0 || botRight.lat() == 0) {
@@ -834,5 +836,5 @@
         lastBotRight = botRight;
         bufferImage = mv.createImage(mv.getWidth(), mv.getHeight());
-        g = bufferImage.getGraphics();
+        g = (Graphics2D) bufferImage.getGraphics();
 
         int zoom = currentZoomLevel;
@@ -844,5 +846,5 @@
                     out("too many tiles, decreasing zoom from " + currentZoomLevel);
                 if (decreaseZoomLevel())
-                    this.paint(oldg, mv);
+                    this.paint(oldg, mv, bounds);
                 return;
             }
@@ -852,5 +854,5 @@
                         + "), increasing zoom from " + currentZoomLevel);
                 if (increaseZoomLevel())
-                     this.paint(oldg, mv);
+                     this.paint(oldg, mv, bounds);
                 return;
             }
@@ -899,5 +901,4 @@
             this.paintTileText(ts, t, g, mv, currentZoomLevel, t);
         }
-        float fadeBackground = SlippyMapPreferences.getFadeBackground();
         oldg.drawImage(bufferImage, 0, 0, null);
 
@@ -909,5 +910,5 @@
                     out("autozoom increase: scale: " + lastImageScale);
                 increaseZoomLevel();
-                this.paint(oldg, mv);
+                this.paint(oldg, mv, bounds);
             // If each source image pixel is being squished into > 0.32
             // of a drawn pixels, zoom out.
@@ -916,5 +917,5 @@
                     out("autozoom decrease: scale: " + lastImageScale);
                 decreaseZoomLevel();
-                this.paint(oldg, mv);
+                this.paint(oldg, mv, bounds);
             }
         }
Index: /applications/editors/josm/plugins/validator/build.xml
===================================================================
--- /applications/editors/josm/plugins/validator/build.xml	(revision 18592)
+++ /applications/editors/josm/plugins/validator/build.xml	(revision 18593)
@@ -27,5 +27,5 @@
 	-->
 	<property name="commit.message" value="Updated build.xml" />		
-	<property name="plugin.main.version" value="2414" />
+	<property name="plugin.main.version" value="2450" />
 		
 		
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java	(revision 18592)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorLayer.java	(revision 18593)
@@ -4,5 +4,5 @@
 
 import java.awt.Component;
-import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.util.Enumeration;
 import java.util.List;
@@ -15,4 +15,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.gui.MapView;
@@ -27,5 +28,5 @@
 /**
  * A layer showing error messages.
- * 
+ *
  * @author frsantos
  */
@@ -54,5 +55,5 @@
     @SuppressWarnings("unchecked")
     @Override
-    public void paint(final Graphics g, final MapView mv) {
+    public void paint(final Graphics2D g, final MapView mv, Bounds bounds) {
         DefaultMutableTreeNode root = plugin.validationDialog.tree.getRoot();
         if (root == null || root.getChildCount() == 0)
@@ -114,5 +115,5 @@
     public Component[] getMenuEntries() {
         return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
-                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), 
+                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
                 new JSeparator(),
                 new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(),
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java	(revision 18592)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java	(revision 18593)
@@ -4,4 +4,5 @@
 import java.awt.Component;
 import java.awt.Graphics;
+import java.awt.Graphics2D;
 import java.awt.Point;
 import java.awt.geom.Point2D;
@@ -13,4 +14,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
+import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.osm.Node;
@@ -54,5 +56,5 @@
      */
     @Override
-    public void paint(final Graphics g, final MapView mv)
+    public void paint(final Graphics2D g, final MapView mv, Bounds bounds)
     {
         if( !Main.pref.hasKey(PreferenceEditor.PREF_DEBUG + ".grid") )
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java	(revision 18592)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java	(revision 18593)
@@ -1,3 +1,5 @@
 package org.openstreetmap.josm.plugins.validator;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.util.ArrayList;
@@ -8,5 +10,4 @@
 import javax.swing.JPanel;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.osm.BackreferencedDataSet;
@@ -19,5 +20,4 @@
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.tools.GBC;
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -95,7 +95,7 @@
 
     /**
-     * Start the test using a given progress monitor 
-     * 
-     * @param progressMonitor  the progress monitor 
+     * Start the test using a given progress monitor
+     *
+     * @param progressMonitor  the progress monitor
      */
     public void startTest(ProgressMonitor progressMonitor) {
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java	(revision 18592)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateNode.java	(revision 18593)
@@ -5,6 +5,6 @@
 import java.awt.geom.Area;
 import java.util.Collection;
+import java.util.LinkedHashSet;
 import java.util.LinkedList;
-import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
Index: /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
===================================================================
--- /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java	(revision 18592)
+++ /applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java	(revision 18593)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.BBox;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
@@ -24,5 +25,4 @@
 import org.openstreetmap.josm.data.osm.QuadBuckets;
 import org.openstreetmap.josm.data.osm.Way;
-import org.openstreetmap.josm.data.osm.QuadBuckets.BBox;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
 import org.openstreetmap.josm.plugins.validator.PreferenceEditor;
@@ -75,6 +75,5 @@
         this.ds = Main.main.getCurrentDataSet();
         this.ds_area = ds.getDataSourceArea();
-        this.ds.reindexAll();
-        }
+    }
 
     @Override
@@ -196,14 +195,14 @@
     private class MyWaySegment
     {
-        private Line2D line;
-        public Way w;
-        public boolean isAbandoned = false;
-        public boolean isBoundary = false;
-        public boolean highway;
-        private double len;
+        private final Line2D line;
+        public final Way w;
+        public final boolean isAbandoned;
+        public final boolean isBoundary;
+        public final boolean highway;
+        private final double len;
         private Set<Node> nearbyNodeCache;
         double nearbyNodeCacheDist = -1.0;
-        Node n1;
-        Node n2;
+        final Node n1;
+        final Node n2;
 
         public MyWaySegment(Way w, Node n1, Node n2)
@@ -368,8 +367,8 @@
     private void addNode(Node n, Set<Node> s)
     {
-        Boolean m = middlenodes.contains(n);
-        Boolean e = endnodes.contains(n);
-        Boolean eh = endnodes_highway.contains(n);
-        Boolean o = othernodes.contains(n);
+        boolean m = middlenodes.contains(n);
+        boolean e = endnodes.contains(n);
+        boolean eh = endnodes_highway.contains(n);
+        boolean o = othernodes.contains(n);
         if(!m && !e && !o && !eh)
             s.add(n);
