Changeset 30093 in osm for applications/editors/josm/plugins/opendata/src/org
- Timestamp:
- 2013-11-25T01:06:13+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java
r29680 r30093 66 66 public static final String PREF_MODULES = "opendata.modules"; 67 67 public static final String PREF_MODULES_SITES = "opendata.modules.sites"; 68 public final static String GOOGLE_SITE = "http://josm-toulouse-data.googlecode.com/svn/trunk/";69 68 public final static String OSM_SITE = "http://svn.openstreetmap.org/applications/editors/josm/plugins/opendata/"; 70 69 public final static String[] DEFAULT_MODULE_SITES = {OSM_SITE + "modules.txt%<?modules=>"}; -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/gui/ModulePreference.java
r29937 r30093 268 268 SwingUtilities.invokeLater(new Runnable() { 269 269 public void run() { 270 model.updateAvailableModules(task.getAvailab eModules());270 model.updateAvailableModules(task.getAvailableModules()); 271 271 pnlModulePreferences.refreshView(); 272 272 } … … 354 354 if (moduleInfoDownloadTask.isCanceled()) 355 355 return; 356 model.updateAvailableModules(moduleInfoDownloadTask.getAvailab eModules());356 model.updateAvailableModules(moduleInfoDownloadTask.getAvailableModules()); 357 357 // select modules which actually have to be updated 358 358 // -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ModuleInformation.java
r28091 r30093 232 232 sb.append(" <a href=\"").append(link).append("\">").append(tr("More info...")).append("</a>"); 233 233 } 234 if (downloadlink != null && !downloadlink.startsWith(OSM_SITE+"dist/") && !downloadlink.startsWith(GOOGLE_SITE+"dist/")) {234 if (downloadlink != null && !downloadlink.startsWith(OSM_SITE+"dist/")) { 235 235 sb.append("<p> </p><p>"+tr("<b>Module provided by an external source:</b> {0}", downloadlink)+"</p>"); 236 236 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/ReadRemoteModuleInformationTask.java
r28000 r30093 39 39 import java.util.List; 40 40 41 import org.openstreetmap.josm.Main;42 41 import org.openstreetmap.josm.data.Version; 43 42 import org.openstreetmap.josm.gui.PleaseWaitRunnable; … … 94 93 } 95 94 96 97 95 @Override 98 96 protected void cancel() { … … 162 160 StringBuilder sb = new StringBuilder(); 163 161 try { 164 /* replace %<x> with empty string or x=modules (separated with comma) */ 165 String pl = Utils.join(",", Main.pref.getCollection(PREF_MODULES)); 162 // replace %<x> with empty string */ 166 163 String printsite = site.replaceAll("%<(.*)>", ""); 167 if(pl != null && pl.length() != 0) {168 site = site.replaceAll("%<(.*)>", "$1"+pl);169 } else {170 site = printsite;171 }172 164 173 165 monitor.beginTask(""); 174 166 monitor.indeterminateSubTask(tr("Downloading module list from ''{0}''", printsite)); 175 167 176 URL url = new URL( site);168 URL url = new URL(printsite); 177 169 synchronized(this) { 178 170 connection = (HttpURLConnection)url.openConnection(); … … 378 370 * @return the list of modules 379 371 */ 380 public List<ModuleInformation> getAvailab eModules() {372 public List<ModuleInformation> getAvailableModules() { 381 373 return availableModules; 382 374 }
Note:
See TracChangeset
for help on using the changeset viewer.