Index: trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8073)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 8074)
@@ -12,4 +12,6 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
@@ -58,4 +60,5 @@
 import org.openstreetmap.josm.plugins.PluginHandler;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.plugins.PluginProxy;
 import org.openstreetmap.josm.tools.BugReportExceptionHandler;
 import org.openstreetmap.josm.tools.CheckParameterUtil;
@@ -384,6 +387,23 @@
                         }
                     }
+                    // check if plugin dependences can also be loaded
+                    Collection<PluginInformation> allPlugins = new HashSet<>(toLoad);
+                    for (PluginProxy proxy : PluginHandler.pluginList) {
+                        allPlugins.add(proxy.getPluginInformation());
+                    }
+                    boolean removed;
+                    do {
+                        removed = false;
+                        Iterator<PluginInformation> it = toLoad.iterator();
+                        while (it.hasNext()) {
+                            if (!PluginHandler.checkRequiredPluginsPreconditions(null, allPlugins, it.next(), requiresRestart)) {
+                                it.remove();
+                                removed = true;
+                            }
+                        }
+                    } while (removed);
+                    
                     if (!toLoad.isEmpty()) {
-                        PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null); // FIXME: progress bar
+                        PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null);
                     }
                 }
Index: trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8073)
+++ trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java	(revision 8074)
@@ -525,5 +525,6 @@
      * No other plugins this plugin depends on should be missing.
      *
-     * @param parent The parent Component used to display error popup
+     * @param parent The parent Component used to display error popup. If parent is
+     * null, the error popup is suppressed
      * @param plugins the collection of all loaded plugins
      * @param plugin the plugin for which preconditions are checked
@@ -551,5 +552,7 @@
             }
             if (!missingPlugins.isEmpty()) {
-                alertMissingRequiredPlugin(parent, plugin.name, missingPlugins);
+                if (parent != null) {
+                    alertMissingRequiredPlugin(parent, plugin.name, missingPlugins);
+                }
                 return false;
             }
