Ticket #3524: speed-up-plugin-search.patch
File speed-up-plugin-search.patch, 2.0 KB (added by , 15 years ago) |
---|
-
src/org/openstreetmap/josm/plugins/PluginSelection.java
70 70 JOptionPane.ERROR_MESSAGE 71 71 ); 72 72 } 73 loadPlugins(); 73 74 drawPanel(pluginPanel); 74 75 } 75 76 … … 77 78 // refresh description 78 79 int num = PluginDownloader.downloadDescription(); 79 80 Boolean done = false; 81 loadPlugins(); 80 82 drawPanel(pluginPanel); 81 83 82 84 Set<PluginInformation> toUpdate = new HashSet<PluginInformation>(); … … 119 121 if (done && num >= 1) { 120 122 Main.pref.put("pluginmanager.lastupdate", Long.toString(System.currentTimeMillis())); 121 123 } 124 loadPlugins(); 122 125 drawPanel(pluginPanel); 123 126 } 124 127 … … 169 172 170 173 /* return true when plugin list changed */ 171 174 public void drawPanel(JPanel pluginPanel) { 172 loadPlugins();173 175 Collection<String> enabledPlugins = Main.pref.getCollection("plugins", null); 174 176 175 177 if (pluginMap == null) { … … 298 300 return canHas; 299 301 } 300 302 301 p rivatevoid loadPlugins() {303 public void loadPlugins() { 302 304 availablePlugins = new TreeMap<String, PluginInformation>(new Comparator<String>(){ 303 305 public int compare(String o1, String o2) { 304 306 return o1.compareToIgnoreCase(o2); -
src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
104 104 plugin.add(configureSites, GBC.std()); 105 105 106 106 selection.passTxtFilter(txtFilter); 107 selection.loadPlugins(); 107 108 selection.drawPanel(pluginPanel); 108 109 } 109 110