Changeset 2542 in josm for trunk/src/org
- Timestamp:
- 2009-11-28T23:56:56+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r2512 r2542 616 616 } 617 617 618 synchronized public String getCollectionAsString(final String key) { 619 String s = get(key); 620 if(s != null && s.length() != 0) 621 s = s.replaceAll("\u001e",","); 622 return s; 623 } 624 618 625 synchronized public Collection<String> getCollection(String key, Collection<String> def) { 619 626 String s = get(key); -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java
r2372 r2542 95 95 } 96 96 97 private final static String[] pluginSites = {"http://josm.openstreetmap.de/plugin "};97 private final static String[] pluginSites = {"http://josm.openstreetmap.de/plugin%<?plugins=>"}; 98 98 99 99 public static Collection<String> getSites() { … … 109 109 /* TODO: remove old site files (everything except .jar) */ 110 110 try { 111 /* replace %<x> with empty string or x=plugins (separated with comma) */ 112 String pl = Main.pref.getCollectionAsString("plugins"); 113 if(pl != null && pl.length() != 0) 114 site = site.replaceAll("%<(.*)>", "$1"+pl); 115 else 116 site = site.replaceAll("%<(.*)>", ""); 111 117 BufferedReader r = new BufferedReader(new InputStreamReader(new URL(site).openStream(), "utf-8")); 112 118 new File(Main.pref.getPreferencesDir()+"plugins").mkdir(); -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2389 r2542 352 352 { 353 353 String text = ""; 354 String pl = Main.pref.get ("plugins");354 String pl = Main.pref.getCollectionAsString("plugins"); 355 355 if(pl != null && pl.length() != 0) { 356 356 text += "Plugins: "+pl+"\n";
Note:
See TracChangeset
for help on using the changeset viewer.