Index: /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 4342)
+++ /trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java	(revision 4343)
@@ -12,4 +12,6 @@
 import java.awt.event.KeyEvent;
 import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
@@ -24,7 +26,9 @@
 import javax.swing.JScrollPane;
 import javax.swing.JTextArea;
+import javax.swing.JTextField;
 import javax.swing.KeyStroke;
 import javax.swing.SwingUtilities;
 import javax.swing.border.EtchedBorder;
+import javax.swing.plaf.basic.BasicComboBoxEditor;
 
 import org.openstreetmap.josm.Main;
@@ -37,4 +41,5 @@
 import org.openstreetmap.josm.gui.io.DownloadPrimitivesTask;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.gui.widgets.OsmIdTextField;
@@ -57,4 +62,27 @@
     }
 
+    /**
+     * Restore the current history from the preferences
+     *
+     * @param cbHistory
+     */
+    protected void restorePrimitivesHistory(HistoryComboBox cbHistory) {
+        List<String> cmtHistory = new LinkedList<String>(Main.pref.getCollection(getClass().getName() + ".primitivesHistory", new LinkedList<String>()));
+        // we have to reverse the history, because ComboBoxHistory will reverse it again
+        // in addElement()
+        //
+        Collections.reverse(cmtHistory);
+        cbHistory.setPossibleItems(cmtHistory);
+    }
+
+    /**
+     * Remind the current history in the preferences
+     * @param cbHistory
+     */
+    protected void remindPrimitivesHistory(HistoryComboBox cbHistory) {
+        cbHistory.addCurrentItemToHistory();
+        Main.pref.putCollection(getClass().getName() + ".primitivesHistory", cbHistory.getHistory());
+    }
+
     public void actionPerformed(ActionEvent e) {
 
@@ -67,9 +95,17 @@
         JLabel lbl1 = new JLabel(tr("Object type:"));
         OsmPrimitiveTypesComboBox cbType = new OsmPrimitiveTypesComboBox();
-        cbType.addItem(new SimpleListItem("mixed", trc("osm object types", "mixed")));
+        cbType.addItem(trc("osm object types", "mixed"));
         cbType.setToolTipText(tr("Choose the OSM object type"));
         JLabel lbl2 = new JLabel(tr("Object ID:"));
-        OsmIdTextField tfId = new OsmIdTextField();
-        tfId.setToolTipText(tr("Enter the ID of the object that should be downloaded"));
+        final OsmIdTextField tfId = new OsmIdTextField();
+        HistoryComboBox cbId = new HistoryComboBox();
+        cbId.setEditor(new BasicComboBoxEditor() {
+            @Override
+            protected JTextField createEditorComponent() {
+                return tfId;
+            }
+        });
+        cbId.setToolTipText(tr("Enter the ID of the object that should be downloaded"));
+        restorePrimitivesHistory(cbId);
         // forward the enter key stroke to the download button
         tfId.getKeymap().removeKeyStrokeBinding(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false));
@@ -91,5 +127,5 @@
             .addGroup(layout.createParallelGroup()
                 .addComponent(lbl2)
-                .addComponent(tfId, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
+                .addComponent(cbId, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
             .addComponent(referrers)
             .addComponent(layer)
@@ -105,5 +141,5 @@
                 .addGroup(layout.createParallelGroup()
                     .addComponent(cbType)
-                    .addComponent(tfId))
+                    .addComponent(cbId))
                 )
             .addComponent(referrers)
@@ -142,11 +178,9 @@
             return;
         }
-
-        processItems(layer.isSelected(), cbType.getType(), tfId.getIds(), referrers.isSelected());
-    }
-
-    void processItems(boolean newLayer, OsmPrimitiveType type,
-            final List<PrimitiveId> ids,
-            boolean downloadReferrers) {
+        remindPrimitivesHistory(cbId);
+        processItems(layer.isSelected(), tfId.getIds(), referrers.isSelected());
+    }
+
+    void processItems(boolean newLayer, final List<PrimitiveId> ids, boolean downloadReferrers) {
         OsmDataLayer layer = getEditLayer();
         if ((layer == null) || newLayer) {
@@ -199,5 +233,5 @@
                     }
                 }
-                if (del != null && !del.isEmpty()) {
+                if (!del.isEmpty()) {
                     final ExtendedDialog dlg = reportProblemDialog(del,
                             trn("Object deleted", "Objects deleted", del.size()),
@@ -249,17 +283,3 @@
             .setContent(p, false);
     }
-
-    private static class SimpleListItem  {
-        final String data;
-        final String text;
-
-        public SimpleListItem(String data, String text) {
-            this.data = data;
-            this.text = text;
-        }
-
-        @Override public String toString() {
-            return text;
-        }
-    }
 }
Index: /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4342)
+++ /trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java	(revision 4343)
@@ -152,6 +152,5 @@
             {
                 String prefKey = getPrefKey(url, destDir);
-                // FIXME: replace with normal getCollection after july 2011
-                Collection<String> localPath = Main.pref.getCollectionOld(prefKey, ";");
+                Collection<String> localPath = Main.pref.getCollection(prefKey);
                 if(localPath.size() == 2) {
                     String[] lp = (String[]) localPath.toArray();
