- Timestamp:
- 2010-01-07T09:46:17+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
r2711 r2751 17 17 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 18 18 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 19 import org.openstreetmap.josm.gui.progress.ProgressMonitor;20 19 import org.openstreetmap.josm.io.OsmServerObjectReader; 21 20 import org.openstreetmap.josm.io.OsmTransferException; … … 76 75 final DataSet allDownloads = new DataSet(); 77 76 int i=0; 77 getProgressMonitor().setTicksCount(relations.size()); 78 78 for (Relation relation: relations) { 79 progressMonitor.subTask(tr("({0}/{1}: Downloading relation ''{2}''...", i,relations.size(),relation.getDisplayName(DefaultNameFormatter.getInstance()))); 79 i++; 80 getProgressMonitor().setCustomText(tr("({0}/{1}): Downloading relation ''{2}''...", i,relations.size(),relation.getDisplayName(DefaultNameFormatter.getInstance()))); 80 81 synchronized (this) { 81 82 if (cancelled) return; 82 83 objectReader = new OsmServerObjectReader(relation.getPrimitiveId(), true /* full download */); 83 84 } 84 DataSet dataSet = objectReader.parseOsm(progressMonitor 85 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 85 DataSet dataSet = objectReader.parseOsm( 86 getProgressMonitor().createSubTaskMonitor(0, false) 87 ); 86 88 if (dataSet == null) 87 89 return; … … 92 94 DataSetMerger merger = new DataSetMerger(allDownloads, dataSet); 93 95 merger.merge(); 96 getProgressMonitor().worked(1); 94 97 } 95 98 -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r2626 r2751 591 591 try { 592 592 progressMonitor.beginTask(tr("Prepare OSM data...", 2)); 593 progressMonitor. subTask(tr("Parsing OSM data..."));593 progressMonitor.indeterminateSubTask(tr("Parsing OSM data...")); 594 594 InputSource inputSource = new InputSource(new InputStreamReader(source, "UTF-8")); 595 595 SAXParserFactory.newInstance().newSAXParser().parse(inputSource, reader.new Parser()); 596 596 progressMonitor.worked(1); 597 597 598 progressMonitor. subTask(tr("Preparing data set..."));598 progressMonitor.indeterminateSubTask(tr("Preparing data set...")); 599 599 reader.ds.beginUpdate(); 600 600 try {
Note:
See TracChangeset
for help on using the changeset viewer.