Index: trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 6232)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java	(revision 6248)
@@ -114,6 +114,6 @@
         try {
             if (pi.downloadlink == null) {
-                String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link is not known. Skipping download.", pi.name);
-                System.err.println(msg);
+                String msg = tr("Cannot download plugin ''{0}''. Its download link is not known. Skipping download.", pi.name);
+                Main.warn(msg);
                 throw new PluginDownloadException(msg);
             }
@@ -128,7 +128,7 @@
                 out.write(buffer, 0, read);
             }
-        } catch(MalformedURLException e) {
-            String msg = tr("Warning: Cannot download plugin ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", pi.name, pi.downloadlink);
-            System.err.println(msg);
+        } catch (MalformedURLException e) {
+            String msg = tr("Cannot download plugin ''{0}''. Its download link ''{1}'' is not a valid URL. Skipping download.", pi.name, pi.downloadlink);
+            Main.warn(msg);
             throw new PluginDownloadException(msg);
         } catch (IOException e) {
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6232)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 6248)
@@ -66,10 +66,10 @@
  * PluginHandler is basically a collection of static utility functions used to bootstrap
  * and manage the loaded plugins.
- *
+ * @since 1326
  */
 public class PluginHandler {
 
     /**
-     * deprecated plugins that are removed on start
+     * Deprecated plugins that are removed on start
      */
     public final static Collection<DeprecatedPlugin> DEPRECATED_PLUGINS;
@@ -117,20 +117,38 @@
     }
 
+    /**
+     * Description of a deprecated plugin
+     */
     public static class DeprecatedPlugin implements Comparable<DeprecatedPlugin> {
-        public String name;
-        // short explanation, can be null
-        public String reason;
-        // migration, can be null
-        private Runnable migration;
-
+        /** Plugin name */
+        public final String name;
+        /** Short explanation about deprecation, can be {@code null} */
+        public final String reason;
+        /** Code to run to perform migration, can be {@code null} */
+        private final Runnable migration;
+
+        /**
+         * Constructs a new {@code DeprecatedPlugin}.
+         * @param name The plugin name
+         */
         public DeprecatedPlugin(String name) {
-            this.name = name;
-        }
-
+            this(name, null, null);
+        }
+
+        /**
+         * Constructs a new {@code DeprecatedPlugin} with a given reason.
+         * @param name The plugin name
+         * @param reason The reason about deprecation
+         */
         public DeprecatedPlugin(String name, String reason) {
-            this.name = name;
-            this.reason = reason;
-        }
-
+            this(name, reason, null);
+        }
+
+        /**
+         * Constructs a new {@code DeprecatedPlugin}.
+         * @param name The plugin name
+         * @param reason The reason about deprecation
+         * @param migration The code to run to perform migration
+         */
         public DeprecatedPlugin(String name, String reason, Runnable migration) {
             this.name = name;
@@ -139,4 +157,7 @@
         }
 
+        /**
+         * Performs migration.
+         */
         public void migrate() {
             if (migration != null) {
@@ -151,4 +172,7 @@
     }
 
+    /**
+     * List of unmaintained plugins. Not really up-to-date as the vast majority of plugins are not really maintained after a few months, sadly...
+     */
     final public static String [] UNMAINTAINED_PLUGINS = new String[] {"gpsbabelgui", "Intersect_way"};
 
@@ -319,7 +343,7 @@
         if (policy.equals("never")) {
             if ("pluginmanager.version-based-update.policy".equals(togglePreferenceKey)) {
-                System.out.println(tr("Skipping plugin update after JOSM upgrade. Automatic update at startup is disabled."));
+                Main.info(tr("Skipping plugin update after JOSM upgrade. Automatic update at startup is disabled."));
             } else if ("pluginmanager.time-based-update.policy".equals(togglePreferenceKey)) {
-                System.out.println(tr("Skipping plugin update after elapsed update interval. Automatic update at startup is disabled."));
+                Main.info(tr("Skipping plugin update after elapsed update interval. Automatic update at startup is disabled."));
             }
             return false;
@@ -328,7 +352,7 @@
         if (policy.equals("always")) {
             if ("pluginmanager.version-based-update.policy".equals(togglePreferenceKey)) {
-                System.out.println(tr("Running plugin update after JOSM upgrade. Automatic update at startup is enabled."));
+                Main.info(tr("Running plugin update after JOSM upgrade. Automatic update at startup is enabled."));
             } else if ("pluginmanager.time-based-update.policy".equals(togglePreferenceKey)) {
-                System.out.println(tr("Running plugin update after elapsed update interval. Automatic update at startup is disabled."));
+                Main.info(tr("Running plugin update after elapsed update interval. Automatic update at startup is disabled."));
             }
             return true;
@@ -336,5 +360,5 @@
 
         if (!policy.equals("ask")) {
-            System.err.println(tr("Unexpected value ''{0}'' for preference ''{1}''. Assuming value ''ask''.", policy, togglePreferenceKey));
+            Main.warn(tr("Unexpected value ''{0}'' for preference ''{1}''. Assuming value ''ask''.", policy, togglePreferenceKey));
         }
         int ret = HelpAwareOptionPane.showOptionDialog(
@@ -513,4 +537,5 @@
      * the class loader <code>pluginClassLoader</code>.
      *
+     * @param parent The parent component to be used for the displayed dialog
      * @param plugin the plugin
      * @param pluginClassLoader the plugin class loader
@@ -521,5 +546,5 @@
             Class<?> klass = plugin.loadClass(pluginClassLoader);
             if (klass != null) {
-                System.out.println(tr("loading plugin ''{0}'' (version {1})", plugin.name, plugin.localversion));
+                Main.info(tr("loading plugin ''{0}'' (version {1})", plugin.name, plugin.localversion));
                 PluginProxy pluginProxy = plugin.load(klass);
                 pluginList.add(pluginProxy);
@@ -528,10 +553,10 @@
             msg = null;
         } catch (PluginException e) {
-            System.err.println(e.getMessage());
+            Main.error(e.getMessage());
             Throwable cause = e.getCause();
             if (cause != null) {
                 msg = cause.getLocalizedMessage();
                 if (msg != null) {
-                    System.err.println("Cause: " + cause.getClass().getName()+": " + msg);
+                    Main.error("Cause: " + cause.getClass().getName()+": " + msg);
                 } else {
                     cause.printStackTrace();
@@ -545,5 +570,5 @@
             e.printStackTrace();
         }
-        if(msg != null && confirmDisablePlugin(parent, msg, plugin.name)) {
+        if (msg != null && confirmDisablePlugin(parent, msg, plugin.name)) {
             Main.pref.removeFromCollection("plugins", plugin.name);
         }
@@ -554,4 +579,5 @@
      * memory.
      *
+     * @param parent The parent component to be used for the displayed dialog
      * @param plugins the list of plugins
      * @param monitor the progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null.
@@ -621,4 +647,5 @@
      * set to false.
      *
+     * @param parent The parent component to be used for the displayed dialog
      * @param plugins the collection of plugins
      * @param monitor the progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null.
@@ -698,4 +725,5 @@
      * messages.
      *
+     * @param parent The parent component to be used for the displayed dialog
      * @param monitor the progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null.
      * @return the set of plugins to load (as set of plugin names)
@@ -785,5 +813,5 @@
                     }
                 } catch (PluginException e) {
-                    System.out.println(tr("Warning: failed to find plugin {0}", name));
+                    Main.warn(tr("Failed to find plugin {0}", name));
                     e.printStackTrace();
                 }
@@ -801,5 +829,5 @@
      * @throws IllegalArgumentException thrown if plugins is null
      */
-    public static List<PluginInformation>  updatePlugins(Component parent,
+    public static List<PluginInformation> updatePlugins(Component parent,
             List<PluginInformation> plugins, ProgressMonitor monitor)
             throws IllegalArgumentException{
@@ -825,10 +853,10 @@
                 allPlugins = task1.getAvailablePlugins();
                 plugins = buildListOfPluginsToLoad(parent,monitor.createSubTaskMonitor(1, false));
-            } catch(ExecutionException e) {
-                System.out.println(tr("Warning: failed to download plugin information list"));
+            } catch (ExecutionException e) {
+                Main.warn(tr("Failed to download plugin information list"));
                 e.printStackTrace();
                 // don't abort in case of error, continue with downloading plugins below
-            } catch(InterruptedException e) {
-                System.out.println(tr("Warning: failed to download plugin information list"));
+            } catch (InterruptedException e) {
+                Main.warn(tr("Failed to download plugin information list"));
                 e.printStackTrace();
                 // don't abort in case of error, continue with downloading plugins below
@@ -838,5 +866,5 @@
             //
             Collection<PluginInformation> pluginsToUpdate = new ArrayList<PluginInformation>();
-            for(PluginInformation pi: plugins) {
+            for (PluginInformation pi: plugins) {
                 if (pi.isUpdateRequired()) {
                     pluginsToUpdate.add(pi);
@@ -907,5 +935,6 @@
     /**
      * Ask the user for confirmation that a plugin shall be disabled.
-     *
+     * 
+     * @param parent The parent component to be used for the displayed dialog
      * @param reason the reason for disabling the plugin
      * @param name the plugin name
@@ -940,7 +969,12 @@
     }
 
+    /**
+     * Returns the plugin of the specified name.
+     * @param name The plugin name
+     * @return The plugin of the specified name, if installed and loaded, or {@code null} otherwise.
+     */
     public static Object getPlugin(String name) {
         for (PluginProxy plugin : pluginList)
-            if(plugin.getPluginInformation().name.equals(name))
+            if (plugin.getPluginInformation().name.equals(name))
                 return plugin.plugin;
         return null;
@@ -986,6 +1020,6 @@
             if (plugin.exists()) {
                 if (!plugin.delete() && dowarn) {
-                    System.err.println(tr("Warning: failed to delete outdated plugin ''{0}''.", plugin.toString()));
-                    System.err.println(tr("Warning: failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
+                    Main.warn(tr("Failed to delete outdated plugin ''{0}''.", plugin.toString()));
+                    Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
                     continue;
                 }
@@ -996,5 +1030,5 @@
             } catch (Exception e) {
                 if (dowarn) {
-                    System.err.println(tr("Warning: failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}", plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()));
+                    Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. {2}", plugin.toString(), updatedPlugin.toString(), e.getLocalizedMessage()));
                 }
                 continue;
@@ -1002,6 +1036,6 @@
             // Install plugin
             if (!updatedPlugin.renameTo(plugin) && dowarn) {
-                System.err.println(tr("Warning: failed to install plugin ''{0}'' from temporary download file ''{1}''. Renaming failed.", plugin.toString(), updatedPlugin.toString()));
-                System.err.println(tr("Warning: failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
+                Main.warn(tr("Failed to install plugin ''{0}'' from temporary download file ''{1}''. Renaming failed.", plugin.toString(), updatedPlugin.toString()));
+                Main.warn(tr("Failed to install already downloaded plugin ''{0}''. Skipping installation. JOSM is still going to load the old plugin version.", pluginName));
             }
         }
@@ -1177,6 +1211,10 @@
     }
 
+    /**
+     * Returns the list of loaded plugins as a {@code String} to be displayed in status report. Useful for bug reports.
+     * @return The list of loaded plugins (one plugin per line)
+     */
     public static String getBugReportText() {
-        String text = "";
+        StringBuilder text = new StringBuilder();
         LinkedList <String> pl = new LinkedList<String>(Main.pref.getCollection("plugins", new LinkedList<String>()));
         for (final PluginProxy pp : pluginList) {
@@ -1188,9 +1226,13 @@
         Collections.sort(pl);
         for (String s : pl) {
-            text += "Plugin: " + s + "\n";
-        }
-        return text;
-    }
-
+            text.append("Plugin: ").append(s).append("\n");
+        }
+        return text.toString();
+    }
+
+    /**
+     * Returns the list of loaded plugins as a {@code JPanel} to be displayed in About dialog.
+     * @return The list of loaded plugins (one "line" of Swing components per plugin)
+     */
     public static JPanel getInfoPanel() {
         JPanel pluginTab = new JPanel(new GridBagLayout());
Index: trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 6232)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java	(revision 6248)
@@ -23,4 +23,5 @@
 import java.util.jar.JarInputStream;
 import java.util.jar.Manifest;
+
 import javax.swing.ImageIcon;
 
@@ -186,5 +187,5 @@
                 new URL(s);
             } catch (MalformedURLException e) {
-                System.out.println(tr("Invalid URL ''{0}'' in plugin {1}", s, name));
+                Main.info(tr("Invalid URL ''{0}'' in plugin {1}", s, name));
                 s = null;
             }
@@ -200,5 +201,5 @@
                     s = tr(s);
                 } catch (IllegalArgumentException e) {
-                    System.out.println(tr("Invalid plugin description ''{0}'' in plugin {1}", s, name));
+                    Main.info(tr("Invalid plugin description ''{0}'' in plugin {1}", s, name));
                 }
             }
Index: trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 6232)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java	(revision 6248)
@@ -14,4 +14,5 @@
 import java.util.Map;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
@@ -90,5 +91,5 @@
                 processLocalPluginInformationFile(f);
             } catch(PluginListParseException e) {
-                System.err.println(tr("Warning: Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
+                Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
                 e.printStackTrace();
             }
@@ -151,6 +152,6 @@
                 }
             } catch (PluginException e){
-                System.err.println(e.getMessage());
-                System.err.println(tr("Warning: Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
+                Main.warn("PluginException: "+e.getMessage());
+                Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname));
             }
             monitor.worked(1);
Index: trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 6232)
+++ trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java	(revision 6248)
@@ -259,5 +259,5 @@
             if (!pluginDir.exists()) {
                 if (! pluginDir.mkdirs()) {
-                    System.err.println(tr("Warning: failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site));
+                    Main.warn(tr("Failed to create plugin directory ''{0}''. Cannot cache plugin list from plugin site ''{1}''.", pluginDir.toString(), site));
                 }
             }
@@ -311,9 +311,9 @@
             List<PluginInformation> pis = new PluginListParser().parse(in);
             availablePlugins.addAll(filterDeprecatedPlugins(pis));
-        } catch(UnsupportedEncodingException e) {
-            System.err.println(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
-            e.printStackTrace();
-        } catch(PluginListParseException e) {
-            System.err.println(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
+        } catch (UnsupportedEncodingException e) {
+            Main.error(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
+            e.printStackTrace();
+        } catch (PluginListParseException e) {
+            Main.error(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString()));
             e.printStackTrace();
         }
