Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 15736)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 15737)
@@ -89,5 +89,5 @@
      * Deprecated plugins that are removed on start
      */
-    static final Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
+    static final List<DeprecatedPlugin> DEPRECATED_PLUGINS;
     static {
         String inCore = tr("integrated into main program");
@@ -160,4 +160,5 @@
             new DeprecatedPlugin("rapid", tr(replacedByPlugin, "MapWithAI"))
         );
+        Collections.sort(DEPRECATED_PLUGINS);
     }
 
@@ -368,4 +369,13 @@
         // notify user about removed deprecated plugins
         //
+        JOptionPane.showMessageDialog(
+                parent,
+                getRemovedPluginsMessage(removedPlugins),
+                tr("Warning"),
+                JOptionPane.WARNING_MESSAGE
+        );
+    }
+
+    static String getRemovedPluginsMessage(Collection<DeprecatedPlugin> removedPlugins) {
         StringBuilder sb = new StringBuilder(32);
         sb.append("<html>")
@@ -383,10 +393,5 @@
         }
         sb.append("</ul></html>");
-        JOptionPane.showMessageDialog(
-                parent,
-                sb.toString(),
-                tr("Warning"),
-                JOptionPane.WARNING_MESSAGE
-        );
+        return sb.toString();
     }
 
@@ -406,13 +411,16 @@
                 continue;
             }
-            String msg = tr("<html>Loading of the plugin \"{0}\" was requested."
-                    + "<br>This plugin is no longer developed and very likely will produce errors."
-                    +"<br>It should be disabled.<br>Delete from preferences?</html>",
-                    Utils.escapeReservedCharactersHTML(unmaintained));
-            if (confirmDisablePlugin(parent, msg, unmaintained)) {
+            if (confirmDisablePlugin(parent, getUnmaintainedPluginMessage(unmaintained), unmaintained)) {
                 PreferencesUtils.removeFromList(Config.getPref(), "plugins", unmaintained);
                 plugins.remove(unmaintained);
             }
         }
+    }
+
+    static String getUnmaintainedPluginMessage(String unmaintained) {
+        return tr("<html>Loading of the plugin \"{0}\" was requested."
+                + "<br>This plugin is no longer developed and very likely will produce errors."
+                +"<br>It should be disabled.<br>Delete from preferences?</html>",
+                Utils.escapeReservedCharactersHTML(unmaintained));
     }
 
