Index: /applications/editors/josm/plugins/waydownloader/build.xml
===================================================================
--- /applications/editors/josm/plugins/waydownloader/build.xml	(revision 32451)
+++ /applications/editors/josm/plugins/waydownloader/build.xml	(revision 32452)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7575"/>
+    <property name="plugin.main.version" value="10353"/>
 
     <property name="plugin.author" value="Harry Wood"/>
Index: /applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java
===================================================================
--- /applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 32451)
+++ /applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 32452)
@@ -67,12 +67,13 @@
         public void actionPerformed(ActionEvent e) {
             selectedNode = null;
-            Collection<Node> selection = Main.main.getCurrentDataSet().getSelectedNodes();
+            DataSet ds = Main.getLayerManager().getEditDataSet();
+            Collection<Node> selection = ds.getSelectedNodes();
             if (selection.isEmpty()) {
-                Collection<Way> selWays = Main.main.getCurrentDataSet().getSelectedWays();
+                Collection<Way> selWays = ds.getSelectedWays();
                 if (!workFromWaySelection(selWays)) {
                     showWarningMessage(tr("<html>Neither a node nor a way with an endpoint outside of the<br>current download areas is selected.<br>Select a node on the start or end of a way or an entire way first.</html>"));
                     return;
                 }
-                selection = Main.main.getCurrentDataSet().getSelectedNodes();
+                selection = ds.getSelectedNodes();
             }
 
@@ -176,5 +177,5 @@
                         return;
                     Command cmd = MergeNodesAction.mergeNodes(
-                            Main.main.getEditLayer(),
+                            Main.getLayerManager().getEditLayer(),
                             Collections.singletonList(dupeNode),
                             selectedNode
@@ -182,5 +183,5 @@
                     if (cmd != null) {
                         Main.main.undoRedo.add(cmd);
-                        Main.main.getEditLayer().data.setSelected(selectedNode);
+                        Main.getLayerManager().getEditLayer().data.setSelected(selectedNode);
                     }
                     connectedWays = findConnectedWays(selectedNode);
@@ -213,5 +214,5 @@
 
                 //Select the next node
-                Main.main.getCurrentDataSet().setSelected(nextNode);
+                Main.getLayerManager().getEditDataSet().setSelected(nextNode);
                 Main.map.mapView.zoomTo(nextNode.getEastNorth());
             }
@@ -220,5 +221,5 @@
         @Override
         protected void updateEnabledState() {
-            setEnabled(getEditLayer() != null);
+            setEnabled(getLayerManager().getEditLayer() != null);
         }
 
@@ -236,5 +237,5 @@
      */
     private Node findDuplicateNode(Node referenceNode) {
-        DataSet ds = Main.main.getCurrentDataSet();
+        DataSet ds = Main.getLayerManager().getEditDataSet();
         List<Node> candidates = ds.searchNodes(new Bounds(referenceNode.getCoor(), 0.0003, 0.0005).toBBox());
         for (Node candidate: candidates) {
@@ -289,10 +290,10 @@
             if (isDownloaded(selectedNode)) return false;
         }
-        Main.main.getCurrentDataSet().setSelected(selectedNode);
+        Main.getLayerManager().getEditDataSet().setSelected(selectedNode);
         return true;
     }
 
     private boolean isDownloaded(Node node) {
-        for (DataSource datasource:Main.main.getCurrentDataSet().dataSources) {
+        for (DataSource datasource : Main.getLayerManager().getEditDataSet().dataSources) {
             Bounds bounds = datasource.bounds;
             if (bounds != null && bounds.contains(node.getCoor())) return true;
