Index: /applications/editors/josm/plugins/waydownloader/.classpath
===================================================================
--- /applications/editors/josm/plugins/waydownloader/.classpath	(revision 16589)
+++ /applications/editors/josm/plugins/waydownloader/.classpath	(revision 16590)
@@ -3,5 +3,5 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/josm"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /applications/editors/josm/plugins/waydownloader/build.xml
===================================================================
--- /applications/editors/josm/plugins/waydownloader/build.xml	(revision 16589)
+++ /applications/editors/josm/plugins/waydownloader/build.xml	(revision 16590)
@@ -91,5 +91,5 @@
                 <attribute name="Plugin-Description" value="Easy downloading along a long set of interconnected ways"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/WayDownloaderPlugin"/>
-                <attribute name="Plugin-Mainversion" value="1722"/>
+                <attribute name="Plugin-Mainversion" value="1813"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java
===================================================================
--- /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java	(revision 16589)
+++ /applications/editors/josm/plugins/waydownloader/src/WayDownloaderPlugin.java	(revision 16590)
@@ -5,5 +5,4 @@
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.LinkedList;
 
@@ -12,6 +11,6 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.actions.MergeNodesAction;
 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
-import org.openstreetmap.josm.actions.MergeNodesAction;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.osm.DataSource;
@@ -20,4 +19,5 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.gui.MainMenu;
+import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -92,5 +92,5 @@
                         errMsg = tr("Select a starting node on the end of a way");
                     } else {
-                        priorConnectedWay =(Way) connectedWays.get(0);
+                        priorConnectedWay =connectedWays.get(0);
 
                         //Download a little rectangle around the selected node
@@ -102,5 +102,6 @@
                                                selectedNode.getCoor().lon()-lonbuffer,
                                                selectedNode.getCoor().lat()+latbuffer,
-                                               selectedNode.getCoor().lon()+lonbuffer);
+                                               selectedNode.getCoor().lon()+lonbuffer,
+                                               new PleaseWaitProgressMonitor());
 
                         //The download is scheduled to be executed.
@@ -157,6 +158,6 @@
                 //Figure out which of the two is new.
                 System.out.println("connectedWays.toString()=" + connectedWays.toString());
-                Way wayA = (Way) connectedWays.get(0);
-                Way wayB = (Way) connectedWays.get(1);
+                Way wayA = connectedWays.get(0);
+                Way wayB = connectedWays.get(1);
                 Way nextWay = wayA;
                 if (priorConnectedWay.equals(wayA)) nextWay = wayB;
@@ -176,7 +177,5 @@
     /** See if there's another node at the same coordinates. If so return it. Otherwise null */
     private Node duplicateNode() {
-        Iterator nodesIter = Main.ds.nodes.iterator();
-        while (nodesIter.hasNext()) {
-            Node onNode = (Node) nodesIter.next();
+    	for (Node onNode:Main.ds.nodes) {
             if (!onNode.equals(this.selectedNode)
                     && onNode.getCoor().lat()==selectedNode.getCoor().lat()
@@ -200,9 +199,5 @@
 
         //loop through every way
-        Iterator waysIter = Main.ds.ways.iterator();
-        while (waysIter.hasNext()) {
-            Way onWay = (Way) waysIter.next();
-
-
+        for (Way onWay:Main.ds.ways) {
             Object[] nodes = onWay.nodes.toArray();
             if (nodes.length<2) {
@@ -233,5 +228,5 @@
         } else {
             Way selectedWay = (Way) selection.toArray()[0];
-            selectedNode = (Node) selectedWay.nodes.get(0);
+            selectedNode = selectedWay.nodes.get(0);
 
             if (isDownloaded(selectedNode)) {
@@ -246,7 +241,5 @@
 
     private boolean isDownloaded(Node node) {
-        Iterator downloadedAreasIter = Main.ds.dataSources.iterator();
-        while (downloadedAreasIter.hasNext()) {
-            DataSource datasource = (DataSource) downloadedAreasIter.next();
+        for (DataSource datasource:Main.ds.dataSources) {
             Bounds bounds = datasource.bounds;
 
