Ignore:
Timestamp:
2016-04-08T19:52:27+02:00 (4 years ago)
Author:
Don-vip
Message:

add more debug messages + assertions to debug failing unit test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r10093 r10121  
    881881        try {
    882882            monitor.beginTask(tr("Determine plugins to load..."));
    883             Set<String> plugins = new HashSet<>();
    884             plugins.addAll(Main.pref.getCollection("plugins", new LinkedList<String>()));
    885             if (System.getProperty("josm.plugins") != null) {
    886                 plugins.addAll(Arrays.asList(System.getProperty("josm.plugins").split(",")));
     883            Set<String> plugins = new HashSet<>(Main.pref.getCollection("plugins", new LinkedList<String>()));
     884            if (Main.isDebugEnabled()) {
     885                Main.debug("Plugins list initialized to " + plugins);
     886            }
     887            String systemProp = System.getProperty("josm.plugins");
     888            if (systemProp != null) {
     889                plugins.addAll(Arrays.asList(systemProp.split(",")));
     890                if (Main.isDebugEnabled()) {
     891                    Main.debug("josm.plugins system property set to '" + systemProp+"'. Plugins list is now " + plugins);
     892                }
    887893            }
    888894            monitor.subTask(tr("Removing deprecated plugins..."));
     
    890896            monitor.subTask(tr("Removing unmaintained plugins..."));
    891897            filterUnmaintainedPlugins(parent, plugins);
     898            if (Main.isDebugEnabled()) {
     899                Main.debug("Plugins list is finally set to " + plugins);
     900            }
    892901            Map<String, PluginInformation> infos = loadLocallyAvailablePluginInformation(monitor.createSubTaskMonitor(1, false));
    893902            List<PluginInformation> ret = new LinkedList<>();
Note: See TracChangeset for help on using the changeset viewer.