Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 5571)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 5572)
@@ -27,4 +27,5 @@
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
@@ -66,4 +67,5 @@
 import javax.swing.event.TableModelEvent;
 import javax.swing.event.TableModelListener;
+import javax.swing.filechooser.FileFilter;
 import javax.swing.table.AbstractTableModel;
 import javax.swing.table.DefaultTableCellRenderer;
@@ -72,7 +74,9 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.ExtensionFileFilter;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.HelpAwareOptionPane;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
+import org.openstreetmap.josm.gui.util.FileFilterAllFiles;
 import org.openstreetmap.josm.gui.widgets.JFileChooserManager;
 import org.openstreetmap.josm.io.MirroredInputStream;
@@ -752,5 +756,12 @@
 
             public void actionPerformed(ActionEvent e) {
-                JFileChooserManager fcm = new JFileChooserManager(true).createFileChooser();
+                FileFilter ff;
+                if (isMapPaint) {
+                    ff = new ExtensionFileFilter("xml,mapcss,css", "xml", tr("Map paint style file (*.xml, *.mapcss)"));
+                } else {
+                    ff = new ExtensionFileFilter("xml", "xml", tr("Preset definition file (*.xml)"));
+                }
+                JFileChooserManager fcm = new JFileChooserManager(true)
+                        .createFileChooser(true, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY);
                 prepareFileChooser(tfURL.getText(), fcm.getFileChooser());
                 JFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
Index: trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java	(revision 5572)
+++ trunk/src/org/openstreetmap/josm/gui/util/FileFilterAllFiles.java	(revision 5572)
@@ -0,0 +1,33 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.util;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileFilter;
+
+/**
+ * A FileFilter that accepts all files.
+ */
+public class FileFilterAllFiles extends FileFilter {
+    
+    private static FileFilterAllFiles INSTANCE;
+
+    public static FileFilterAllFiles getInstance() {
+        if (INSTANCE == null) {
+            INSTANCE = new FileFilterAllFiles();
+        }
+        return INSTANCE;
+    }
+
+    @Override
+    public boolean accept(File f) {
+        return true;
+    }
+
+    @Override
+    public String getDescription() {
+        return tr("All files (*.*)");
+    }
+}
Index: trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java	(revision 5571)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/JFileChooserManager.java	(revision 5572)
@@ -42,5 +42,5 @@
      * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
      * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 
-     *                        Then, if the user effetively choses a file or a directory, this property will be updated to the directory path.
+     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
      * @see #createFileChooser
      */
@@ -53,5 +53,5 @@
      * @param open If true, "Open File" dialogs will be created. If false, "Save File" dialogs will be created.
      * @param lastDirProperty The name of the property used to get the last directory. This directory is used to initialize the JFileChooser. 
-     *                        Then, if the user effetively choses a file or a directory, this property will be updated to the directory path.
+     *                        Then, if the user effectively chooses a file or a directory, this property will be updated to the directory path.
      * @param defaultDir The default directory used to initialize the JFileChooser if the {@code lastDirProperty} property value is missing. 
      * @see #createFileChooser
Index: trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 5571)
+++ trunk/src/org/openstreetmap/josm/io/session/SessionReader.java	(revision 5572)
@@ -18,5 +18,4 @@
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
