Changeset 5115 in josm


Ignore:
Timestamp:
2012-03-23T10:06:14+01:00 (13 years ago)
Author:
akks
Message:

see #4421: plugin installation fix for JOSM custom configurator

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

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/CustomConfigurator.java

    r5114 r5115  
    310310   
    311311    public static void pluginOperation(String install, String uninstall, String delete)  {
    312         final List<String> installList = Arrays.asList(install.toLowerCase().split(";"));
    313         final List<String> removeList = Arrays.asList(uninstall.toLowerCase().split(";"));
    314         final List<String> deleteList = Arrays.asList(delete.toLowerCase().split(";"));
     312        final List<String> installList = new ArrayList<String>();
     313        final List<String> removeList = new ArrayList<String>();
     314        final List<String> deleteList = new ArrayList<String>();
     315        Collections.addAll(installList, install.toLowerCase().split(";"));
     316        Collections.addAll(removeList, uninstall.toLowerCase().split(";"));
     317        Collections.addAll(deleteList, delete.toLowerCase().split(";"));
     318        installList.remove("");removeList.remove("");deleteList.remove("");
     319       
     320        if (!installList.isEmpty()) {
     321            log("Plugins install: "+installList);
     322        }
     323        if (!removeList.isEmpty()) {
     324            log("Plugins turn off: "+removeList);
     325        }
     326        if (!deleteList.isEmpty()) {
     327            log("Plugins delete: "+deleteList);
     328        }
    315329
    316330        final ReadLocalPluginInformationTask task = new ReadLocalPluginInformationTask();
     
    319333                if (task.isCanceled()) return;
    320334                synchronized (CustomConfigurator.class) {
    321                 try { // proceed only after ll other tasks were finished
     335                try { // proceed only after all other tasks were finished
    322336                    while (busy) CustomConfigurator.class.wait();
    323337                } catch (InterruptedException ex) { }
     
    351365                                new File(Main.pref.getPluginsDirectory(),pi.name+".jar").deleteOnExit();
    352366                            }
     367                            System.out.println(pls);
    353368                            Main.pref.putCollection("plugins",pls);
    354369                        }
     
    576591            String uninstall = elem.getAttribute("remove");
    577592            String delete = elem.getAttribute("delete");
    578             log("PLUGIN: install %s, remove %s, delete %s", install, uninstall, delete);
    579593            pluginOperation(install, uninstall, delete);
    580594        }
  • trunk/src/org/openstreetmap/josm/gui/preferences/advanced/AdvancedPreference.java

    r5114 r5115  
    302302        if (tmpPrefs != Main.pref) {
    303303            loaded = tmpPrefs.getAllSettings();
     304            // plugins preference keys may be changed directly later, after plugins are downloaded
     305            // so we do not want to show it in the table as "changed" now
     306            loaded.put("plugins", orig.get("plugins"));
    304307        } else {
    305308            loaded = orig;
Note: See TracChangeset for help on using the changeset viewer.