Changeset 2864 in josm for trunk/src/org/openstreetmap/josm


Ignore:
Timestamp:
2010-01-15T23:23:43+01:00 (14 years ago)
Author:
stoecker
Message:

fixed plugin loading stages

Location:
trunk/src/org/openstreetmap/josm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/PluginPreference.java

    r2855 r2864  
    1515import java.awt.event.ComponentEvent;
    1616import java.util.Collection;
     17import java.util.Collections;
    1718import java.util.LinkedList;
    1819import java.util.List;
     
    255256            return false;
    256257        if (model.isActivePluginsChanged()) {
    257             Main.pref.putCollection("plugins", model.getSelectedPluginNames());
     258            LinkedList<String> l = new LinkedList<String>(model.getSelectedPluginNames());
     259            Collections.sort(l);
     260            Main.pref.putCollection("plugins", l);
    258261            return true;
    259262        }
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r2859 r2864  
    367367        try {
    368368            monitor.beginTask(tr("Loading plugins ..."));
     369            monitor.subTask(tr("Checking plugin preconditions..."));
    369370            List<PluginInformation> toLoad = new LinkedList<PluginInformation>();
     371            for (PluginInformation pi: plugins) {
     372                if (checkLoadPreconditions(parent, plugins, pi)) {
     373                    toLoad.add(pi);
     374                }
     375            }
    370376            // sort the plugins according to their "staging" equivalence class. The
    371377            // lower the value of "stage" the earlier the plugin should be loaded.
     
    381387                    }
    382388            );
    383             monitor.subTask(tr("Checking plugin preconditions..."));
    384             for (PluginInformation pi: plugins) {
    385                 if (checkLoadPreconditions(parent, plugins, pi)) {
    386                     toLoad.add(pi);
    387                 }
    388             }
    389389            if (toLoad.isEmpty())
    390390                return;
Note: See TracChangeset for help on using the changeset viewer.