Index: /applications/editors/josm/plugins/undelete/.classpath
===================================================================
--- /applications/editors/josm/plugins/undelete/.classpath	(revision 26195)
+++ /applications/editors/josm/plugins/undelete/.classpath	(revision 26196)
@@ -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="/core"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/DownloadPrimitiveTask.java
===================================================================
--- /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/DownloadPrimitiveTask.java	(revision 26196)
+++ /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/DownloadPrimitiveTask.java	(revision 26196)
@@ -0,0 +1,108 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.plugins.undelete;
+
+import static org.openstreetmap.josm.tools.CheckParameterUtil.ensureParameterNotNull;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+import javax.swing.SwingUtilities;
+
+import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.PrimitiveId;
+import org.openstreetmap.josm.gui.ExceptionDialogUtil;
+import org.openstreetmap.josm.gui.PleaseWaitRunnable;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.progress.ProgressMonitor;
+import org.openstreetmap.josm.io.OsmServerObjectReader;
+import org.openstreetmap.josm.io.OsmTransferException;
+import org.xml.sax.SAXException;
+
+/**
+ * The asynchronous task for updating a collection of objects using multi fetch.
+ *
+ */
+//TODO This should be probably easily replacable by org.openstreetmap.josm.gui.io.DownloadPrimitivesTask
+public class DownloadPrimitiveTask extends PleaseWaitRunnable {
+    private DataSet ds;
+    private boolean canceled;
+    private Exception lastException;
+    private PrimitiveId primitiveId;
+    private OsmDataLayer layer;
+    private OsmServerObjectReader reader;
+
+    /**
+     * Creates the  task
+     *
+     * @param layer the layer in which primitives are updated. Must not be null.
+     * @param toUpdate a collection of primitives to update from the server. Set to
+     * the empty collection if null.
+     * @throws IllegalArgumentException thrown if layer is null.
+     */
+    public DownloadPrimitiveTask(PrimitiveId id, OsmDataLayer layer) {
+        super(tr("Download object"), false /* don't ignore exception */);
+        ensureParameterNotNull(layer, "layer");
+        this.layer = layer;
+        this.primitiveId = id;
+    }
+
+    @Override
+    protected void cancel() {
+        canceled = true;
+        synchronized(this) {
+            if (reader != null) {
+                reader.cancel();
+            }
+        }
+    }
+
+    @Override
+    protected void finish() {
+        if (canceled)
+            return;
+        if (lastException != null) {
+            ExceptionDialogUtil.explainException(lastException);
+            return;
+        }
+        Runnable r = new Runnable() {
+            public void run() {
+                layer.mergeFrom(ds);
+                layer.onPostDownloadFromServer();
+                AutoScaleAction.zoomTo(ds.allPrimitives());
+            }
+        };
+
+        if (SwingUtilities.isEventDispatchThread()) {
+            r.run();
+        } else {
+            try {
+                SwingUtilities.invokeAndWait(r);
+            } catch(InterruptedException e) {
+                e.printStackTrace();
+            } catch(InvocationTargetException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    @Override
+    protected void realRun() throws SAXException, IOException, OsmTransferException {
+        this.ds = new DataSet();
+        try {
+            synchronized(this) {
+                if (canceled) return;
+                reader = new OsmServerObjectReader(primitiveId, true);
+            }
+            ds = reader.parseOsm(progressMonitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
+            synchronized(this) {
+                reader = null;
+            }
+        } catch(Exception e) {
+            if (canceled)
+                return;
+            lastException = e;
+        }
+    }
+}
Index: /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java
===================================================================
--- /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java	(revision 26195)
+++ /applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java	(revision 26196)
@@ -3,4 +3,6 @@
 
 package org.openstreetmap.josm.plugins.undelete;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.GridBagConstraints;
@@ -17,9 +19,6 @@
 import javax.swing.KeyStroke;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.actions.downloadtasks.DownloadPrimitiveTask;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
