Index: trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 2854)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java	(revision 2855)
@@ -96,4 +96,9 @@
     private PluginPreferencesModel model;
     private JScrollPane spPluginPreferences;
+    /**
+     * is set to true if this preference pane has been selected
+     * by the user
+     */
+    private boolean pluginPreferencesActivated = false;
 
     protected JPanel buildSearchFieldPanel() {
@@ -247,4 +252,6 @@
 
     public boolean ok() {
+        if (! pluginPreferencesActivated)
+            return false;
         if (model.isActivePluginsChanged()) {
             Main.pref.putCollection("plugins", model.getSelectedPluginNames());
@@ -254,4 +261,10 @@
     }
 
+    /**
+     * Reads locally available information about plugins from the local file system.
+     * Scans cached plugin lists from plugin download sites and locally available
+     * plugin jar files.
+     * 
+     */
     public void readLocalPluginInformation() {
         final ReadLocalPluginInformationTask task = new ReadLocalPluginInformationTask();
@@ -363,4 +376,5 @@
             putValue(NAME,tr("Configure sites..."));
             putValue(SHORT_DESCRIPTION, tr("Configure the list of sites where plugins are downloaded from"));
+            putValue(SMALL_ICON, ImageProvider.get("dialogs", "propertiesdialog"));
         }
 
@@ -385,4 +399,5 @@
             if (tp.getSelectedComponent() == pane) {
                 readLocalPluginInformation();
+                pluginPreferencesActivated = true;
             }
         }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 2854)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 2855)
@@ -657,25 +657,21 @@
         }
 
-        if (plugin == null)
-        {
+        if (plugin == null) {
             /**
              * Analyze the stack of the argument and find a name of a plugin, if
              * some known problem pattern has been found.
              */
-            for (PluginProxy p : pluginList)
-            {
+            for (PluginProxy p : pluginList) {
                 String baseClass = p.getPluginInformation().className;
                 int i = baseClass.lastIndexOf(".");
                 baseClass = baseClass.substring(0, i);
-                for (StackTraceElement element : e.getStackTrace())
-                {
+                for (StackTraceElement element : e.getStackTrace()) {
                     String c = element.getClassName();
-                    if(c.startsWith(baseClass))
-                    {
+                    if (c.startsWith(baseClass)) {
                         plugin = p;
                         break;
                     }
                 }
-                if(plugin != null) {
+                if (plugin != null) {
                     break;
                 }
