Index: applications/editors/josm/plugins/terracer/build.xml
===================================================================
--- applications/editors/josm/plugins/terracer/build.xml	(revision 32309)
+++ applications/editors/josm/plugins/terracer/build.xml	(revision 32426)
@@ -2,5 +2,5 @@
 <project name="terracer" default="dist" basedir=".">
     <property name="commit.message" value="applied #j5760 (patch by robome) - Order of housenumbers not correct"/>
-    <property name="plugin.main.version" value="8919"/>
+    <property name="plugin.main.version" value="10279"/>
     <property name="plugin.author" value="Matt Amos"/>
     <property name="plugin.class" value="terracer.TerracerPlugin"/>
Index: applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 32309)
+++ applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java	(revision 32426)
@@ -315,5 +315,5 @@
 
         if (buildingComboBox == null) {
-            final List<AutoCompletionListItem> values = Main.main.getCurrentDataSet().getAutoCompletionManager().getValues("building");
+            final List<AutoCompletionListItem> values = Main.getLayerManager().getEditDataSet().getAutoCompletionManager().getValues("building");
 
             buildingComboBox = new AutoCompletingComboBox();
@@ -367,5 +367,5 @@
     TreeSet<String> createAutoCompletionInfo() {
         final TreeSet<String> names = new TreeSet<>();
-        for (OsmPrimitive osm : Main.main.getCurrentDataSet()
+        for (OsmPrimitive osm : Main.getLayerManager().getEditDataSet()
                 .allNonDeletedPrimitives()) {
             if (osm.getKeys() != null && osm.keySet().contains("highway")
Index: applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 32309)
+++ applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 32426)
@@ -51,5 +51,5 @@
      */
     public void actionPerformed(ActionEvent e) {
-        Collection<Way> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
+        Collection<Way> selectedWays = Main.getLayerManager().getEditDataSet().getSelectedWays();
 
         // Set to keep track of all the nodes that have been visited - that is: if
@@ -123,10 +123,10 @@
 
         Main.main.undoRedo.add(new SequenceCommand(tr("Reverse Terrace"), commands));
-        Main.main.getCurrentDataSet().setSelected(orderedWays);
+        Main.getLayerManager().getEditDataSet().setSelected(orderedWays);
     }
 
     @Override
     protected void updateEnabledState() {
-        setEnabled(getCurrentDataSet() != null);
+        setEnabled(getLayerManager().getEditDataSet() != null);
     }
 }
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 32309)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 32426)
@@ -109,5 +109,5 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
+        Collection<OsmPrimitive> sel = getLayerManager().getEditDataSet().getSelected();
         Way outline = null;
         Way street = null;
@@ -404,5 +404,5 @@
                         nodesToDelete.add(n);
                 if (!nodesToDelete.isEmpty())
-                    this.commands.add(DeleteCommand.delete(Main.main.getEditLayer(), nodesToDelete));
+                    this.commands.add(DeleteCommand.delete(Main.getLayerManager().getEditLayer(), nodesToDelete));
             }
         } else {
@@ -414,5 +414,5 @@
         // Or should removing them also be an option?
         if (!housenumbers.isEmpty()) {
-            commands.add(DeleteCommand.delete(Main.main.getEditLayer(),
+            commands.add(DeleteCommand.delete(Main.getLayerManager().getEditLayer(),
                     housenumbers, true, true));
         }
@@ -429,8 +429,8 @@
         if (nb <= 1 && street != null) {
             // Select the way (for quick selection of a new house (with the same way))
-            Main.main.getCurrentDataSet().setSelected(street);
+            Main.getLayerManager().getEditDataSet().setSelected(street);
         } else {
             // Select the new building outlines (for quick reversing)
-            Main.main.getCurrentDataSet().setSelected(ways);
+            Main.getLayerManager().getEditDataSet().setSelected(ways);
         }
     }
@@ -777,5 +777,5 @@
     @Override
     protected void updateEnabledState() {
-        setEnabled(getCurrentDataSet() != null);
+        setEnabled(getLayerManager().getEditDataSet() != null);
     }
 }
