Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 10035)
@@ -146,5 +146,5 @@
 
     public ExtendedDialog(Component parent, String title, String[] buttonTexts, boolean modal, boolean disposeOnClose) {
-        super(JOptionPane.getFrameForComponent(parent), title, modal ? ModalityType.DOCUMENT_MODAL : ModalityType.MODELESS);
+        super(GuiHelper.getFrameForComponent(parent), title, modal ? ModalityType.DOCUMENT_MODAL : ModalityType.MODELESS);
         this.parent = parent;
         this.modal = modal;
@@ -441,5 +441,5 @@
         Dimension x = new Dimension(screenSize.width*2/3, screenSize.height*2/3);
         if (parent != null && parent.isVisible()) {
-            x = JOptionPane.getFrameForComponent(parent).getSize();
+            x = GuiHelper.getFrameForComponent(parent).getSize();
         }
         return x;
Index: trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java	(revision 10035)
@@ -252,5 +252,5 @@
             final JOptionPane pane) {
         final JDialog dialog = new JDialog(
-                JOptionPane.getFrameForComponent(parentComponent),
+                GuiHelper.getFrameForComponent(parentComponent),
                 title,
                 ModalityType.DOCUMENT_MODAL
Index: trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/PleaseWaitDialog.java	(revision 10035)
@@ -16,5 +16,4 @@
 import javax.swing.JDialog;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JProgressBar;
@@ -24,4 +23,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor.ProgressMonitorDialog;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.JosmTextArea;
 import org.openstreetmap.josm.tools.GBC;
@@ -90,5 +90,5 @@
      */
     public PleaseWaitDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
         initDialog();
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java	(revision 10035)
@@ -218,5 +218,5 @@
      */
     public CombinePrimitiveResolverDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/tags/PasteTagsConflictResolverDialog.java	(revision 10035)
@@ -28,5 +28,4 @@
 import javax.swing.JDialog;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JTabbedPane;
@@ -40,4 +39,5 @@
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.tagging.TagTableColumnModelBuilder;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.WindowGeometry;
@@ -73,5 +73,5 @@
      */
     public PasteTagsConflictResolverDialog(Component owner) {
-        super(JOptionPane.getFrameForComponent(owner), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(owner), ModalityType.DOCUMENT_MODAL);
         build();
         iconResolved = ImageProvider.get("dialogs/conflict", "tagconflictresolved");
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ConflictResolutionDialog.java	(revision 10035)
@@ -30,4 +30,5 @@
 import org.openstreetmap.josm.gui.help.HelpBrowser;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.WindowGeometry;
@@ -134,5 +135,5 @@
      */
     public ConflictResolutionDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
         build();
         pack();
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/DeleteFromRelationConfirmationDialog.java	(revision 10035)
@@ -22,5 +22,4 @@
 import javax.swing.AbstractAction;
 import javax.swing.JDialog;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -41,4 +40,5 @@
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.gui.widgets.HtmlPanel;
 import org.openstreetmap.josm.tools.I18n;
@@ -132,5 +132,5 @@
      */
     public DeleteFromRelationConfirmationDialog() {
-        super(JOptionPane.getFrameForComponent(Main.parent), "", ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(Main.parent), "", ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java	(revision 10035)
@@ -40,5 +40,4 @@
 import javax.swing.JLabel;
 import javax.swing.JMenu;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JPopupMenu;
@@ -665,5 +664,5 @@
     private class DetachedDialog extends JDialog {
         DetachedDialog() {
-            super(JOptionPane.getFrameForComponent(Main.parent));
+            super(GuiHelper.getFrameForComponent(Main.parent));
             getContentPane().add(ToggleDialog.this);
             addWindowListener(new WindowAdapter() {
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 10035)
@@ -41,4 +41,5 @@
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.io.OnlineResource;
 import org.openstreetmap.josm.plugins.PluginHandler;
@@ -229,5 +230,5 @@
      */
     public DownloadDialog(Component parent, String helpTopic) {
-        super(JOptionPane.getFrameForComponent(parent), tr("Download"), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), tr("Download"), ModalityType.DOCUMENT_MODAL);
         HelpUtil.setHelpContext(getRootPane(), helpTopic);
         getContentPane().setLayout(new BorderLayout());
Index: trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialog.java	(revision 10035)
@@ -17,5 +17,4 @@
 import javax.swing.JDialog;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.KeyStroke;
@@ -29,4 +28,5 @@
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -49,5 +49,5 @@
      */
     public HistoryBrowserDialog(History history) {
-        super(JOptionPane.getFrameForComponent(Main.parent), false);
+        super(GuiHelper.getFrameForComponent(Main.parent), false);
         build();
         setHistory(history);
Index: trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java	(revision 10035)
@@ -22,5 +22,4 @@
 import javax.swing.JLabel;
 import javax.swing.JList;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -32,4 +31,5 @@
 import org.openstreetmap.josm.data.osm.Changeset;
 import org.openstreetmap.josm.gui.SideButton;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.InputMapUtils;
@@ -111,5 +111,5 @@
      */
     public CloseChangesetDialog() {
-        super(JOptionPane.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 10035)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.io.ChangesetQuery;
 import org.openstreetmap.josm.io.OsmServerChangesetReader;
@@ -59,5 +60,5 @@
         if (JosmUserIdentityManager.getInstance().isAnonymous()) {
             JOptionPane.showMessageDialog(
-                    JOptionPane.getFrameForComponent(parent),
+                    GuiHelper.getFrameForComponent(parent),
                     "<html>" + tr("Could not retrieve the list of your open changesets because<br>"
                             + "JOSM does not know your identity.<br>"
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 10035)
@@ -140,5 +140,5 @@
 
     public SaveLayersDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 10035)
@@ -51,4 +51,5 @@
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.tools.GBC;
@@ -101,5 +102,5 @@
      */
     public UploadDialog() {
-        super(JOptionPane.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 10035)
@@ -24,5 +24,4 @@
 import javax.swing.JLabel;
 import javax.swing.JList;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -41,4 +40,5 @@
 import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
 import org.openstreetmap.josm.gui.help.HelpUtil;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.WindowGeometry;
@@ -61,5 +61,5 @@
      */
     public UploadSelectionDialog() {
-        super(JOptionPane.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(Main.parent), ModalityType.DOCUMENT_MODAL);
         build();
     }
Index: trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java	(revision 10035)
@@ -29,5 +29,4 @@
 import javax.swing.JDialog;
 import javax.swing.JLabel;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -256,5 +255,5 @@
      */
     public OAuthAuthorizationWizard(Component parent, String apiUrl, Executor executor) {
-        super(JOptionPane.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), ModalityType.DOCUMENT_MODAL);
         CheckParameterUtil.ensureParameterNotNull(apiUrl, "apiUrl");
         this.apiUrl = apiUrl;
Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceDialog.java	(revision 10035)
@@ -22,5 +22,4 @@
 import javax.swing.JComponent;
 import javax.swing.JDialog;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.KeyStroke;
@@ -79,5 +78,5 @@
 
     public PreferenceDialog(Component parent) {
-        super(JOptionPane.getFrameForComponent(parent), tr("Preferences"), ModalityType.DOCUMENT_MODAL);
+        super(GuiHelper.getFrameForComponent(parent), tr("Preferences"), ModalityType.DOCUMENT_MODAL);
         build();
         this.setMinimumSize(new Dimension(600, 350));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10035)
@@ -904,5 +904,5 @@
                         .createFileChooser(true, null, Arrays.asList(ff, FileFilterAllFiles.getInstance()), ff, JFileChooser.FILES_ONLY);
                 prepareFileChooser(tfURL.getText(), fcm.getFileChooser());
-                AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
+                AbstractFileChooser fc = fcm.openFileChooser(GuiHelper.getFrameForComponent(SourceEditor.this));
                 if (fc != null) {
                     tfURL.setText(fc.getSelectedFile().toString());
@@ -1634,5 +1634,5 @@
                 }
                 prepareFileChooser(tfFileName.getText(), fcm.getFileChooser());
-                AbstractFileChooser fc = fcm.openFileChooser(JOptionPane.getFrameForComponent(SourceEditor.this));
+                AbstractFileChooser fc = fcm.openFileChooser(GuiHelper.getFrameForComponent(SourceEditor.this));
                 if (fc != null) {
                     tfFileName.setText(fc.getSelectedFile().toString());
Index: trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/advanced/PreferencesTable.java	(revision 10035)
@@ -105,4 +105,5 @@
         final PrefEntry e = (PrefEntry) model.getValueAt(getSelectedRow(), 1);
         Setting<?> stg = e.getValue();
+        boolean ok = false;
         if (stg instanceof StringSetting) {
             editCellAt(getSelectedRow(), 1);
@@ -112,35 +113,47 @@
             }
         } else if (stg instanceof ListSetting) {
-            ListSetting lSetting = (ListSetting) stg;
-            ListEditor lEditor = new ListEditor(gui, e, lSetting);
-            lEditor.showDialog();
-            if (lEditor.getValue() == 1) {
-                List<String> data = lEditor.getData();
-                if (!lSetting.equalVal(data)) {
-                    e.setValue(new ListSetting(data));
-                    return true;
-                }
-            }
+            ok = doEditList(gui, e, (ListSetting) stg);
         } else if (stg instanceof ListListSetting) {
-            ListListSetting llSetting = (ListListSetting) stg;
-            ListListEditor llEditor = new ListListEditor(gui, e, llSetting);
-            llEditor.showDialog();
-            if (llEditor.getValue() == 1) {
-                List<List<String>> data = llEditor.getData();
-                if (!llSetting.equalVal(data)) {
-                    e.setValue(new ListListSetting(data));
-                    return true;
-                }
-            }
+            ok = doEditListList(gui, e, (ListListSetting) stg);
         } else if (stg instanceof MapListSetting) {
-            MapListSetting mlSetting = (MapListSetting) stg;
-            MapListEditor mlEditor = new MapListEditor(gui, e, mlSetting);
-            mlEditor.showDialog();
-            if (mlEditor.getValue() == 1) {
-                List<Map<String, String>> data = mlEditor.getData();
-                if (!mlSetting.equalVal(data)) {
-                    e.setValue(new MapListSetting(data));
-                    return true;
-                }
+            ok = doEditMapList(gui, e, (MapListSetting) stg);
+        }
+        return ok;
+    }
+
+    static boolean doEditList(final JComponent gui, final PrefEntry e, ListSetting lSetting) {
+        ListEditor lEditor = new ListEditor(gui, e, lSetting);
+        lEditor.showDialog();
+        if (lEditor.getValue() == 1) {
+            List<String> data = lEditor.getData();
+            if (!lSetting.equalVal(data)) {
+                e.setValue(new ListSetting(data));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static boolean doEditListList(final JComponent gui, final PrefEntry e, ListListSetting llSetting) {
+        ListListEditor llEditor = new ListListEditor(gui, e, llSetting);
+        llEditor.showDialog();
+        if (llEditor.getValue() == 1) {
+            List<List<String>> data = llEditor.getData();
+            if (!llSetting.equalVal(data)) {
+                e.setValue(new ListListSetting(data));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static boolean doEditMapList(final JComponent gui, final PrefEntry e, MapListSetting mlSetting) {
+        MapListEditor mlEditor = new MapListEditor(gui, e, mlSetting);
+        mlEditor.showDialog();
+        if (mlEditor.getValue() == 1) {
+            List<Map<String, String>> data = mlEditor.getData();
+            if (!mlSetting.equalVal(data)) {
+                e.setValue(new MapListSetting(data));
+                return true;
             }
         }
@@ -190,55 +203,72 @@
                 StringSetting sSetting = new StringSetting(null);
                 pe = new PrefEntry(tkey.getText(), sSetting, sSetting, false);
-                StringEditor sEditor = new StringEditor(gui, pe, sSetting);
-                sEditor.showDialog();
-                if (sEditor.getValue() == 1) {
-                    String data = sEditor.getData();
-                    if (!Objects.equals(sSetting.getValue(), data)) {
-                        pe.setValue(new StringSetting(data));
-                        ok = true;
-                    }
-                }
+                ok = doAddSimple(gui, pe, sSetting);
             } else if (rbList.isSelected()) {
                 ListSetting lSetting = new ListSetting(null);
                 pe = new PrefEntry(tkey.getText(), lSetting, lSetting, false);
-                ListEditor lEditor = new ListEditor(gui, pe, lSetting);
-                lEditor.showDialog();
-                if (lEditor.getValue() == 1) {
-                    List<String> data = lEditor.getData();
-                    if (!lSetting.equalVal(data)) {
-                        pe.setValue(new ListSetting(data));
-                        ok = true;
-                    }
-                }
+                ok = doAddList(gui, pe, lSetting);
             } else if (rbListList.isSelected()) {
                 ListListSetting llSetting = new ListListSetting(null);
                 pe = new PrefEntry(tkey.getText(), llSetting, llSetting, false);
-                ListListEditor llEditor = new ListListEditor(gui, pe, llSetting);
-                llEditor.showDialog();
-                if (llEditor.getValue() == 1) {
-                    List<List<String>> data = llEditor.getData();
-                    if (!llSetting.equalVal(data)) {
-                        pe.setValue(new ListListSetting(data));
-                        ok = true;
-                    }
-                }
+                ok = doAddListList(gui, pe, llSetting);
             } else if (rbMapList.isSelected()) {
                 MapListSetting mlSetting = new MapListSetting(null);
                 pe = new PrefEntry(tkey.getText(), mlSetting, mlSetting, false);
-                MapListEditor mlEditor = new MapListEditor(gui, pe, mlSetting);
-                mlEditor.showDialog();
-                if (mlEditor.getValue() == 1) {
-                    List<Map<String, String>> data = mlEditor.getData();
-                    if (!mlSetting.equalVal(data)) {
-                        pe.setValue(new MapListSetting(data));
-                        ok = true;
-                    }
-                }
-            }
-        }
-        if (ok)
-            return pe;
-        else
-            return null;
+                ok = doAddMapList(gui, pe, mlSetting);
+            }
+        }
+        return ok ? pe : null;
+    }
+
+    static boolean doAddSimple(final JComponent gui, PrefEntry pe, StringSetting sSetting) {
+        StringEditor sEditor = new StringEditor(gui, pe, sSetting);
+        sEditor.showDialog();
+        if (sEditor.getValue() == 1) {
+            String data = sEditor.getData();
+            if (!Objects.equals(sSetting.getValue(), data)) {
+                pe.setValue(new StringSetting(data));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static boolean doAddList(final JComponent gui, PrefEntry pe, ListSetting lSetting) {
+        ListEditor lEditor = new ListEditor(gui, pe, lSetting);
+        lEditor.showDialog();
+        if (lEditor.getValue() == 1) {
+            List<String> data = lEditor.getData();
+            if (!lSetting.equalVal(data)) {
+                pe.setValue(new ListSetting(data));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static boolean doAddListList(final JComponent gui, PrefEntry pe, ListListSetting llSetting) {
+        ListListEditor llEditor = new ListListEditor(gui, pe, llSetting);
+        llEditor.showDialog();
+        if (llEditor.getValue() == 1) {
+            List<List<String>> data = llEditor.getData();
+            if (!llSetting.equalVal(data)) {
+                pe.setValue(new ListListSetting(data));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    static boolean doAddMapList(final JComponent gui, PrefEntry pe, MapListSetting mlSetting) {
+        MapListEditor mlEditor = new MapListEditor(gui, pe, mlSetting);
+        mlEditor.showDialog();
+        if (mlEditor.getValue() == 1) {
+            List<Map<String, String>> data = mlEditor.getData();
+            if (!mlSetting.equalVal(data)) {
+                pe.setValue(new MapListSetting(data));
+                return true;
+            }
+        }
+        return false;
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java	(revision 10035)
@@ -543,5 +543,5 @@
                 public void actionPerformed(ActionEvent e) {
                     String s = JOptionPane.showInputDialog(
-                            JOptionPane.getFrameForComponent(PluginConfigurationSitesPanel.this),
+                            GuiHelper.getFrameForComponent(PluginConfigurationSitesPanel.this),
                             tr("Add JOSM Plugin description URL."),
                             tr("Enter URL"),
@@ -558,5 +558,5 @@
                     if (list.getSelectedValue() == null) {
                         JOptionPane.showMessageDialog(
-                                JOptionPane.getFrameForComponent(PluginConfigurationSitesPanel.this),
+                                GuiHelper.getFrameForComponent(PluginConfigurationSitesPanel.this),
                                 tr("Please select an entry."),
                                 tr("Warning"),
@@ -584,5 +584,5 @@
                     if (list.getSelectedValue() == null) {
                         JOptionPane.showMessageDialog(
-                                JOptionPane.getFrameForComponent(PluginConfigurationSitesPanel.this),
+                                GuiHelper.getFrameForComponent(PluginConfigurationSitesPanel.this),
                                 tr("Please select an entry."),
                                 tr("Warning"),
Index: trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java	(revision 10035)
@@ -10,5 +10,4 @@
 import java.awt.event.WindowListener;
 
-import javax.swing.JOptionPane;
 import javax.swing.SwingUtilities;
 
@@ -17,4 +16,5 @@
 import org.openstreetmap.josm.gui.MapStatus.BackgroundProgressMonitor;
 import org.openstreetmap.josm.gui.PleaseWaitDialog;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 
 public class PleaseWaitProgressMonitor extends AbstractProgressMonitor {
@@ -124,5 +124,5 @@
             this.dialogParent = dialogParent;
         } else {
-            this.dialogParent = JOptionPane.getFrameForComponent(dialogParent);
+            this.dialogParent = GuiHelper.getFrameForComponent(dialogParent);
         }
         this.cancelable = true;
@@ -135,5 +135,5 @@
      */
     public PleaseWaitProgressMonitor(Component dialogParent, String windowTitle) {
-        this(JOptionPane.getFrameForComponent(dialogParent));
+        this(GuiHelper.getFrameForComponent(dialogParent));
         this.windowTitle = windowTitle;
     }
Index: trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 10034)
+++ trunk/src/org/openstreetmap/josm/gui/util/GuiHelper.java	(revision 10035)
@@ -12,4 +12,5 @@
 import java.awt.DisplayMode;
 import java.awt.Font;
+import java.awt.Frame;
 import java.awt.GraphicsDevice;
 import java.awt.GraphicsEnvironment;
@@ -509,3 +510,20 @@
         });
     }
+
+    /**
+     * Returns the specified component's <code>Frame</code> without throwing exception in headless mode.
+     *
+     * @param parentComponent the <code>Component</code> to check for a <code>Frame</code>
+     * @return the <code>Frame</code> that contains the component, or <code>getRootFrame</code>
+     *         if the component is <code>null</code>, or does not have a valid <code>Frame</code> parent
+     * @see JOptionPane#getFrameForComponent
+     * @see GraphicsEnvironment#isHeadless
+     * @since 10035
+     */
+    public static Frame getFrameForComponent(Component parentComponent) {
+        if (parentComponent == null && GraphicsEnvironment.isHeadless()) {
+            return null;
+        }
+        return JOptionPane.getFrameForComponent(parentComponent);
+    }
 }
