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 28415)
+++ applications/editors/josm/plugins/undelete/src/org/openstreetmap/josm/plugins/undelete/Undelete.java	(revision 28416)
@@ -57,5 +57,5 @@
     public Undelete(PluginInformation info) {
         super(info);
-        Undelete = MainMenu.add(Main.main.menu.fileMenu, new UndeleteAction());
+        Undelete = MainMenu.addAfter(Main.main.menu.fileMenu, new UndeleteAction(), false, Main.main.menu.updateModified);
 
     }
@@ -83,25 +83,17 @@
         gc.gridy = 0;
         gc.weightx = 0;
-        all.add(new JLabel(tr("Object type:")), gc);
-        OsmPrimitiveTypesComboBox cbType = new OsmPrimitiveTypesComboBox();
-        cbType.setToolTipText("Choose the OSM object type");
-        cbType.setSelectedIndex(Main.pref.getInteger("undelete.lasttype", 0));
-        gc.weightx = 1;
-        all.add(cbType, gc);
-        gc.gridy = 1;
-        gc.weightx = 0;
         all.add(new JLabel(tr("Object ID:")), gc);
         OsmIdTextField tfId = new OsmIdTextField();
         tfId.setText(Main.pref.get("undelete.osmid"));
-        tfId.setToolTipText(tr("Enter the ID of the object that should be undeleted"));
+        tfId.setToolTipText(tr("Enter the type and ID of the objects that should be undeleted, e.g., ''n1 w2''"));
         // forward the enter key stroke to the undelete button
         tfId.getKeymap().removeKeyStrokeBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false));
         gc.weightx = 1;
         all.add(tfId, gc);
-        gc.gridy = 2;
+        gc.gridy++;
         gc.fill = GridBagConstraints.BOTH;
         gc.weighty = 1.0;
         gc.weightx = 0;
-        gc.gridy = 3;
+        gc.gridy++;
         all.add(layer, gc);
         ExtendedDialog dialog = new ExtendedDialog(Main.parent,
@@ -119,12 +111,7 @@
         dialog.showDialog();
         if (dialog.getValue() != 1) return;
-        Main.pref.putInteger("undelete.lasttype", cbType.getSelectedIndex());
         Main.pref.put("undelete.newlayer", layer.isSelected());
         Main.pref.put("undelete.osmid", tfId.getText());
-        List<Long> ids=new ArrayList<Long>();
-        for (PrimitiveId id: tfId.getIds()) {
-        	ids.add(id.getUniqueId());
-        }
-        undelete(layer.isSelected(), cbType.getType(), ids, 0);
+        undelete(layer.isSelected(), tfId.getIds(), 0);
       }
     }
@@ -133,5 +120,5 @@
      * Download the given primitive.
      */
-    public void undelete(boolean newLayer, final OsmPrimitiveType type, final List<Long> ids, final long parent) {
+    public void undelete(boolean newLayer, final List<PrimitiveId> ids, final long parent) {
         OsmDataLayer tmpLayer = Main.main.getEditLayer();
         if ((tmpLayer == null) || newLayer) {
@@ -144,7 +131,6 @@
 
         HistoryLoadTask task  = new HistoryLoadTask();
-        for (long id: ids)
-        {
-          task.add (id, type);
+        for (PrimitiveId id: ids) {
+            task.add(id);
         }
 
@@ -155,8 +141,11 @@
         Runnable r = new Runnable() {
             @Override
-			public void run() {
+            public void run() {
               List<Node> nodes=new ArrayList<Node>();
-              for (long id: ids)
+              for (PrimitiveId pid: ids)
               {
+
+                final Long id = pid.getUniqueId();
+                final OsmPrimitiveType type = pid.getType();
 
                 History h = HistoryDataSet.getInstance().getHistory(id, type);
@@ -171,12 +160,12 @@
                 {
                   // If the object is not deleted we get the real object
-                  DownloadPrimitiveTask download=new DownloadPrimitiveTask(new SimplePrimitiveId(id, type), layer);
-                  System.out.println(tr("Will get {0}", id));
+                  DownloadPrimitiveTask download=new DownloadPrimitiveTask(pid, layer);
+                  System.out.println(tr("Will get {0}", pid));
                   download.run();
 
 
-                  System.out.println(tr("Looking for {0}", id));
+                  System.out.println(tr("Looking for {0}", pid));
                   primitive=datas.getPrimitiveById(id, type);
-                  System.out.println(tr("Found {0}", primitive.getId()));
+                  System.out.println(tr("Found {0}", String.valueOf(primitive.getId())));
                   if (parent>0 && type.equals(OsmPrimitiveType.NODE))
                   {
@@ -214,6 +203,9 @@
                     HistoryWay hWay = (HistoryWay) hPrimitive2;
                     //System.out.println(tr("Primitive {0} version {1}: {2} nodes", hPrimitive2.getId(), hPrimitive2.getVersion(), hWay.getNumNodes()));
-                    List<Long> nodeIds = hWay.getNodes();
-                    undelete(false, OsmPrimitiveType.NODE, nodeIds, id);
+                    List<PrimitiveId> nodeIds = new ArrayList<PrimitiveId>();
+                    for (Long i: hWay.getNodes()) {
+                        nodeIds.add(new SimplePrimitiveId(i, OsmPrimitiveType.NODE));
+                    }
+                    undelete(false, nodeIds, id);
 
                     primitive=way;
@@ -265,5 +257,5 @@
                 //HistoryBrowserDialogManager.getInstance().show(h);
               }
-              if ((parent>0) && (type.equals(OsmPrimitiveType.NODE)))
+              if (parent>0 && !ids.isEmpty() && ids.iterator().next().getType().equals(OsmPrimitiveType.NODE))
               {
                 Way parentWay=(Way)datas.getPrimitiveById(parent, OsmPrimitiveType.WAY);
