Index: applications/editors/josm/plugins/terracer/build.xml
===================================================================
--- applications/editors/josm/plugins/terracer/build.xml	(revision 16625)
+++ applications/editors/josm/plugins/terracer/build.xml	(revision 16626)
@@ -26,5 +26,5 @@
                 <attribute name="Plugin-Description" value="Make terraced houses out of single blocks."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Terracer"/>
-                <attribute name="Plugin-Mainversion" value="1638"/>
+                <attribute name="Plugin-Mainversion" value="1815"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 16625)
+++ applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java	(revision 16626)
@@ -26,5 +26,5 @@
  * in the wrong direction, or when someone has added house numbers in the wrong
  * direction anyway.
- * 
+ *
  * Finds all connected ways which have a building=* tag on them in order (breadth
  * first search) and then changes the tags to be the reverse of the order in which
@@ -34,10 +34,10 @@
 
 	public ReverseTerraceAction() {
-		super(tr("Reverse a terrace"), 
-				"reverse_terrace", 
+		super(tr("Reverse a terrace"),
+				"reverse_terrace",
 				tr("Reverses house numbers on a terrace."),
-				Shortcut.registerShortcut("tools:ReverseTerrace", 
+				Shortcut.registerShortcut("tools:ReverseTerrace",
 						tr("Tool: {0}", tr("Reverse a Terrace")),
-						KeyEvent.VK_R, Shortcut.GROUP_EDIT, 
+						KeyEvent.VK_R, Shortcut.GROUP_EDIT,
 						Shortcut.SHIFT_DEFAULT),
 						true);
@@ -50,10 +50,10 @@
 	 */
 	public void actionPerformed(ActionEvent e) {
-		Collection<OsmPrimitive> sel = Main.ds.getSelected();
-		
+		Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
+
 		// set to keep track of all the nodes that have been visited - that is: if
 		// we encounter them again we will not follow onto the connected ways.
 		HashSet<Node> visitedNodes = new HashSet<Node>();
-		
+
 		// set to keep track of the ways the algorithm has seen, but not yet visited.
 		// since when a way is visited all of its nodes are marked as visited, there
@@ -61,5 +61,5 @@
 		HashSet<Way> front = new HashSet<Way>();
 
-		// initialise the set with all the buildings in the selection. this means 
+		// initialise the set with all the buildings in the selection. this means
 		// there is undefined behaviour when there is a multiple selection, as the
 		// ordering will be based on the hash.
@@ -69,20 +69,20 @@
 			}
 		}
-		
+
 		// this is like a visitedWays set, but in a linear order.
 		LinkedList<Way> orderedWays = new LinkedList<Way>();
-		
+
 		// and the tags to reverse on the orderedWays.
 		LinkedList<String> houseNumbers = new LinkedList<String>();
-		
+
 		while (front.size() > 0) {
 			// Java apparently doesn't have useful methods to get single items from sets...
 			Way w = front.iterator().next();
-			
+
 			// visit all the nodes in the way, adding the building's they're members of
 			// to the front.
 			for (Node n : w.nodes) {
 				if (!visitedNodes.contains(n)) {
-					CollectBackReferencesVisitor v = new CollectBackReferencesVisitor(Main.ds);
+					CollectBackReferencesVisitor v = new CollectBackReferencesVisitor(Main.main.getCurrentDataSet());
 					v.visit(n);
 					for (OsmPrimitive prim : v.data) {
@@ -101,5 +101,5 @@
 			houseNumbers.addFirst(w.get("addr:housenumber"));
 		}
-		
+
 		Collection<Command> commands = new LinkedList<Command>();
 		// what, no zipWith?
@@ -112,5 +112,5 @@
 
 		Main.main.undoRedo.add(new SequenceCommand(tr("Reverse Terrace"), commands));
-		Main.ds.setSelected(orderedWays);
+		Main.main.getCurrentDataSet().setSelected(orderedWays);
 	}
 
Index: applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java
===================================================================
--- applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 16625)
+++ applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java	(revision 16626)
@@ -63,5 +63,5 @@
 	// smsms1 asked for the last value to be remembered to make it easier to do
 	// repeated terraces. this is the easiest, but not necessarily nicest, way.
-	private static String lastSelectedValue = "";
+	//private static String lastSelectedValue = "";
 
 	public TerracerAction() {
@@ -81,5 +81,5 @@
 	 */
 	public void actionPerformed(ActionEvent e) {
-		Collection<OsmPrimitive> sel = Main.ds.getSelected();
+		Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
 		boolean badSelect = false;
 
@@ -198,5 +198,5 @@
 
 		Main.main.undoRedo.add(new SequenceCommand(tr("Terrace"), commands));
-		Main.ds.setSelected(ways);
+		Main.main.getCurrentDataSet().setSelected(ways);
 	}
 
@@ -516,5 +516,5 @@
 	private TreeSet<String> createAutoCompletionInfo() {
 		final TreeSet<String> names = new TreeSet<String>();
-		for (OsmPrimitive osm : Main.ds.allNonDeletedPrimitives()) {
+		for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) {
 			if (osm.keys != null &&
 					osm.keys.containsKey("highway") &&
