Changeset 8074 in josm
- Timestamp:
- 2015-02-16T15:40:51+01:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r8030 r8074 12 12 import java.util.ArrayList; 13 13 import java.util.Collection; 14 import java.util.HashSet; 15 import java.util.Iterator; 14 16 import java.util.LinkedList; 15 17 import java.util.List; … … 58 60 import org.openstreetmap.josm.plugins.PluginHandler; 59 61 import org.openstreetmap.josm.plugins.PluginInformation; 62 import org.openstreetmap.josm.plugins.PluginProxy; 60 63 import org.openstreetmap.josm.tools.BugReportExceptionHandler; 61 64 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 384 387 } 385 388 } 389 // check if plugin dependences can also be loaded 390 Collection<PluginInformation> allPlugins = new HashSet<>(toLoad); 391 for (PluginProxy proxy : PluginHandler.pluginList) { 392 allPlugins.add(proxy.getPluginInformation()); 393 } 394 boolean removed; 395 do { 396 removed = false; 397 Iterator<PluginInformation> it = toLoad.iterator(); 398 while (it.hasNext()) { 399 if (!PluginHandler.checkRequiredPluginsPreconditions(null, allPlugins, it.next(), requiresRestart)) { 400 it.remove(); 401 removed = true; 402 } 403 } 404 } while (removed); 405 386 406 if (!toLoad.isEmpty()) { 387 PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null); // FIXME: progress bar407 PluginHandler.loadPlugins(PreferenceTabbedPane.this, toLoad, null); 388 408 } 389 409 } -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r8070 r8074 525 525 * No other plugins this plugin depends on should be missing. 526 526 * 527 * @param parent The parent Component used to display error popup 527 * @param parent The parent Component used to display error popup. If parent is 528 * null, the error popup is suppressed 528 529 * @param plugins the collection of all loaded plugins 529 530 * @param plugin the plugin for which preconditions are checked … … 551 552 } 552 553 if (!missingPlugins.isEmpty()) { 553 alertMissingRequiredPlugin(parent, plugin.name, missingPlugins); 554 if (parent != null) { 555 alertMissingRequiredPlugin(parent, plugin.name, missingPlugins); 556 } 554 557 return false; 555 558 }
Note:
See TracChangeset
for help on using the changeset viewer.