Changeset 287 in josm
- Timestamp:
- 2007-07-11T23:32:16+02:00 (17 years ago)
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/org/openstreetmap/josm/gui/preferences/PluginPreference.java
r283 r287 91 91 } 92 92 }); 93 plugin.add(update, GBC.std().insets(0,0,10,0));93 //TODO: plugin.add(update, GBC.std().insets(0,0,10,0)); 94 94 95 95 JButton configureSites = new JButton(tr("Configure Plugin Sites")); … … 99 99 } 100 100 }); 101 plugin.add(configureSites, GBC.std());101 //TODO: plugin.add(configureSites, GBC.std()); 102 102 103 103 refreshPluginPanel(gui); … … 140 140 File[] pluginFiles = new File(location).listFiles(); 141 141 if (pluginFiles != null) { 142 Arrays.sort(pluginFiles); 142 143 for (File f : pluginFiles) { 143 144 if (!f.isFile()) … … 149 150 } catch (PluginException x) { 150 151 } 151 } else if (f.getName(). endsWith(".xml")) {152 } else if (f.getName().matches("^[0-9]+-site.*\\.xml$")) { 152 153 try { 153 154 Uniform<PluginDescription> parser = new Uniform<PluginDescription>(new FileReader(f), "plugin", PluginDescription.class); 154 155 for (PluginDescription pd : parser) 155 availablePlugins.put(pd.name, pd); 156 if (!availablePlugins.containsKey(pd.name)) 157 availablePlugins.put(pd.name, pd); 156 158 } catch (Exception e) { 157 159 e.printStackTrace(); -
src/org/openstreetmap/josm/plugins/PluginDownloader.java
r282 r287 28 28 public static int downloadDescription() { 29 29 int count = 0; 30 for (String site : Main.pref.get("pluginmanager.sites", "http://josm.openstreetmap.de/wiki/Plugins ").split(" ")) {30 for (String site : Main.pref.get("pluginmanager.sites", "http://josm.openstreetmap.de/wiki/Plugins/LatestRelease http://josm.openstreetmap.de/wiki/Plugins").split(" ")) { 31 31 try { 32 32 BufferedReader r = new BufferedReader(new InputStreamReader(new URL(site).openStream())); … … 38 38 r.close(); 39 39 new File(Main.pref.getPreferencesDir()+"plugins").mkdir(); 40 FileWriter out = new FileWriter(Main.pref.getPreferencesDir()+"plugins/ site-"+site.replaceAll("[/:\\\\ <>|]", "_")+".xml");40 FileWriter out = new FileWriter(Main.pref.getPreferencesDir()+"plugins/"+count+"-site-"+site.replaceAll("[/:\\\\ <>|]", "_")+".xml"); 41 41 out.append(txt); 42 42 out.close();
Note:
See TracChangeset
for help on using the changeset viewer.