Index: /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 3709)
+++ /trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java	(revision 3710)
@@ -14,7 +14,9 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 
+import java.util.Set;
 import javax.swing.JFileChooser;
 import javax.swing.JOptionPane;
@@ -57,4 +59,5 @@
         File[] files = fc.getSelectedFiles();
         OpenFileTask task = new OpenFileTask(Arrays.asList(files), fc.getFileFilter());
+        task.setRecordHistory(true);
         Main.worker.submit(task);
     }
@@ -79,4 +82,5 @@
         private FileFilter fileFilter;
         private boolean cancelled;
+        private boolean recordHistory = false;
 
         public OpenFileTask(List<File> files, FileFilter fileFilter, String title) {
@@ -88,4 +92,16 @@
         public OpenFileTask(List<File> files, FileFilter fileFilter) {
             this(files, fileFilter, tr("Opening files"));
+        }
+
+        /**
+         * save filename in history (for list of recently opened files)
+         * default: false
+         */
+        public void setRecordHistory(boolean recordHistory) {
+            this.recordHistory = recordHistory;
+        }
+
+        public boolean isRecordHistory() {
+            return recordHistory;
         }
 
@@ -167,6 +183,6 @@
             }
             /**
-             * If the filter wasn't changed in the dialog, chosenImporter is null now.
-             * When the filter was explicitly set to AllFormatsImporter, treat this the same.
+             * If the filter hasn't been changed in the dialog, chosenImporter is null now.
+             * When the filter has been set explicitly to AllFormatsImporter, treat this the same.
              */
             if (chosenImporter instanceof AllFormatsImporter) {
@@ -210,5 +226,4 @@
                 // find appropriate importer
                 MultiMap<FileImporter, File> map = new MultiMap<FileImporter, File>();
-                List<File> filesWithKnownImporter = new LinkedList<File>();
                 List<File> filesWithUnknownImporter = new LinkedList<File>();
                 FILES: for (File f : files) {
@@ -216,5 +231,4 @@
                         if (importer.acceptFile(f)) {
                             map.put(importer, f);
-                            filesWithKnownImporter.add(f);
                             continue FILES;
                         }
@@ -228,7 +242,31 @@
                 Collections.sort(ims);
                 Collections.reverse(ims);
+
+                Set<String> fileHistory = new LinkedHashSet<String>();
+
                 for (FileImporter importer : ims) {
                     List<File> files = new ArrayList<File>(map.get(importer));
                     importData(importer, files);
+
+                    if (recordHistory && !importer.isBatchImporter()) {
+                        for (File f : files) {
+                            fileHistory.add(f.getPath());
+                        }
+                    }
+                }
+
+                if (recordHistory) {
+                    Collection<String> oldFileHistory = Main.pref.getCollection("file-open.history");
+                    fileHistory.addAll(oldFileHistory);
+                    int maxsize = Math.max(0, Main.pref.getInteger("file-open.history.max-size", 15));
+                    Collection<String> trimmedFileHistory = new ArrayList<String>(Math.min(maxsize, fileHistory.size()));
+                    int i = 0;
+                    for (String s : fileHistory) {
+                        if (++i > maxsize) {
+                            break;
+                        }
+                        trimmedFileHistory.add(s);
+                    }
+                    Main.pref.putCollection("file-open.history", trimmedFileHistory);
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/data/Preferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 3709)
+++ /trunk/src/org/openstreetmap/josm/data/Preferences.java	(revision 3710)
@@ -631,4 +631,18 @@
     }
 
+    /**
+     * Get a list of values for a certain key
+     * @param key the identifier for the setting
+     * @return the corresponding value if the property has been set before,
+     *  an empty Collection otherwise.
+     */
+    synchronized public Collection<String> getCollection(String key) {
+        putCollectionDefault(key, null);
+        String s = get(key);
+        if (s != null && s.length() != 0)
+            return Arrays.asList(s.split("\u001e"));
+        return Collections.emptyList();
+    }
+
     synchronized public void removeFromCollection(String key, String value) {
         List<String> a = new ArrayList<String>(getCollection(key, Collections.<String>emptyList()));
@@ -638,37 +652,9 @@
 
     synchronized public boolean putCollection(String key, Collection<String> val) {
-        String s = null;
-        if(val != null)
-        {
-            for(String a : val)
-            {
-                if (a == null) {
-                    a = "";
-                }
-                if(s != null) {
-                    s += "\u001e" + a;
-                } else {
-                    s = a;
-                }
-            }
-        }
-        return put(key, s);
+        return put(key, join("\u001e", val));
     }
     
     synchronized private void putCollectionDefault(String key, Collection<String> val) {
-        if (val == null) {
-            putDefault(key, null);
-        } else {
-            String s = null;
-            for(String a : val)
-            {
-                if(s != null) {
-                    s += "\u001e" + a;
-                } else {
-                    s = a;
-                }
-            }
-            putDefault(key, s);
-        }
+        putDefault(key, join("\u001e", val));
     }
     
@@ -766,3 +752,30 @@
     }
 
+    /**
+     * Joins a collection of strings into a single string with fields
+     * separated by the value of sep.
+     * @param sep the separator
+     * @param values collection of strings, null strings are converted to the
+     *  empty string
+     * @return null if values is null. The joined string otherwise.
+     */
+    public static String join(String sep, Collection<?> values) {
+        if (values == null)
+            return null;
+        if (values.isEmpty())
+            return "";
+        StringBuilder s = null;
+        for (Object a : values) {
+            if (a == null) {
+                a = "";
+            }
+            if(s != null) {
+                s.append(sep).append(a.toString());
+            } else {
+                s = new StringBuilder(a.toString());
+            }
+        }
+        return s.toString();
+    }
+
 }
Index: /trunk/src/org/openstreetmap/josm/gui/FileDrop.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 3709)
+++ /trunk/src/org/openstreetmap/josm/gui/FileDrop.java	(revision 3710)
@@ -78,4 +78,5 @@
                         // start asynchronous loading of files
                         OpenFileAction.OpenFileTask task = new OpenFileAction.OpenFileTask(Arrays.asList(files), null);
+                        task.setRecordHistory(true);
                         Main.worker.submit(task);
                     }
Index: /trunk/src/org/openstreetmap/josm/gui/MainMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 3709)
+++ /trunk/src/org/openstreetmap/josm/gui/MainMenu.java	(revision 3710)
@@ -85,4 +85,5 @@
 import org.openstreetmap.josm.actions.audio.AudioSlowerAction;
 import org.openstreetmap.josm.actions.search.SearchAction;
+import org.openstreetmap.josm.gui.io.RecentlyOpenedFilesMenu;
 import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.gui.tagging.TaggingPresetSearchAction;
@@ -102,4 +103,5 @@
     public final NewAction newAction = new NewAction();
     public final OpenFileAction openFile = new OpenFileAction();
+    public final RecentlyOpenedFilesMenu recentlyOpened = new RecentlyOpenedFilesMenu();
     public final OpenLocationAction openLocation = new OpenLocationAction();
     public final JosmAction save = new SaveAction();
@@ -223,4 +225,5 @@
         add(fileMenu, newAction);
         add(fileMenu, openFile);
+        fileMenu.add(recentlyOpened);
         add(fileMenu, openLocation);
         fileMenu.addSeparator();
Index: /trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java	(revision 3710)
+++ /trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java	(revision 3710)
@@ -0,0 +1,88 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.util.Collection;
+import java.util.Collections;
+import javax.swing.AbstractAction;
+import javax.swing.JMenu;
+import javax.swing.JMenuItem;
+import javax.swing.JSeparator;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.OpenFileAction.OpenFileTask;
+import org.openstreetmap.josm.tools.ImageProvider;
+
+/**
+ * Show list of recently opened files
+ */
+public class RecentlyOpenedFilesMenu extends JMenu {
+    ClearAction clearAction;
+
+    public RecentlyOpenedFilesMenu() {
+        super(tr("Open Recent"));
+        setToolTipText(tr("List of recently opened files"));
+        setIcon(ImageProvider.get("openrecent.png"));
+
+        // build dynamically
+        addMenuListener(new MenuListener() {
+            @Override
+            public void menuSelected(MenuEvent e) {
+                rebuild();
+            }
+
+            @Override
+            public void menuDeselected(MenuEvent e) {
+            }
+
+            @Override
+            public void menuCanceled(MenuEvent e) {
+            }
+        });
+    }
+    
+    private void rebuild() {
+        removeAll();
+        Collection<String> fileHistory = Main.pref.getCollection("file-open.history");
+
+        for (final String file : fileHistory) {
+            add(new AbstractAction() {
+                {
+                    putValue(NAME, file);
+                }
+                @Override
+                public void actionPerformed(ActionEvent e) {
+                    File f = new File(file);
+                    OpenFileTask task = new OpenFileTask(Collections.singletonList(f), null);
+                    task.setRecordHistory(true);
+                    Main.worker.submit(task);
+                }
+            });
+        }
+        add(new JSeparator());
+        if (clearAction == null) {
+            clearAction = new ClearAction();
+        }
+        JMenuItem clearItem = new JMenuItem(clearAction);
+        clearItem.setEnabled(!fileHistory.isEmpty());
+        add(clearItem);
+    }
+
+    private static class ClearAction extends AbstractAction {
+
+        public ClearAction() {
+            super(tr("Clear"));
+            putValue(SHORT_DESCRIPTION, tr("Clear the list of recently opened files"));
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            Main.pref.putCollection("file-open.history", null);
+        }
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 3709)
+++ /trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPresetMenu.java	(revision 3710)
@@ -58,7 +58,6 @@
             Component co = (Component)s;
             JPopupMenu pm = new JPopupMenu(getName());
-            for(Component c : menu.getMenuComponents())
+            for (Component c : menu.getMenuComponents()) {
                 pm.add(copyMenuComponent(c));
-            {
             }
             pm.show(co, co.getWidth()/2, co.getHeight()/2);
