- Timestamp:
- 2019-02-05T17:18:01+01:00 (6 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java
r13927 r14763 138 138 private HistoryLoaderAndListener(Map<OsmPrimitive, Date> toLoad) { 139 139 this.toLoad = toLoad; 140 this.setChangesetDataNeeded(false); 140 141 add(toLoad.keySet()); 141 142 // Updating process is done after all history requests have been made -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r14756 r14763 27 27 import org.openstreetmap.josm.io.OsmTransferException; 28 28 import org.openstreetmap.josm.tools.CheckParameterUtil; 29 import org.openstreetmap.josm.tools.Logging; 29 30 import org.xml.sax.SAXException; 30 31 … … 53 54 private HistoryDataSet loadedData; 54 55 private OsmServerHistoryReader reader; 56 private boolean getChangesetData = true; 55 57 56 58 /** … … 164 166 protected void realRun() throws SAXException, IOException, OsmTransferException { 165 167 loadedData = new HistoryDataSet(); 168 int ticks = toLoad.size(); 169 if (getChangesetData) 170 ticks *= 2; 166 171 try { 167 progressMonitor.setTicksCount( 2 * toLoad.size());172 progressMonitor.setTicksCount(ticks); 168 173 for (PrimitiveId pid: toLoad) { 169 174 if (canceled) { … … 184 189 try { 185 190 reader = new OsmServerHistoryReader(pid.getType(), pid.getUniqueId()); 186 ds = loadHistory(reader, progressMonitor); 191 if (getChangesetData) { 192 ds = loadHistory(reader, progressMonitor); 193 } else { 194 ds = reader.parseHistory(progressMonitor.createSubTaskMonitor(1, false)); 195 } 187 196 } catch (OsmTransferException e) { 188 197 if (canceled) … … 241 250 return lastException; 242 251 } 252 253 /** 254 * Determine if changeset information is needed. By default it is retrieved. 255 * @param b false means don't retrieve changeset data. 256 */ 257 public void setChangesetDataNeeded(boolean b) { 258 getChangesetData = b; 259 } 243 260 } -
trunk/src/org/openstreetmap/josm/io/OsmServerHistoryReader.java
r11262 r14763 60 60 progressMonitor.beginTask(""); 61 61 try { 62 progressMonitor.indeterminateSubTask(tr("Contacting OSM Server..."));63 62 final String urlStr = primitiveType.getAPIName() + '/' + id + "/history"; 63 progressMonitor.indeterminateSubTask(tr("Contacting OSM Server for {0}", urlStr)); 64 64 65 65 try (InputStream in = getInputStream(urlStr, progressMonitor.createSubTaskMonitor(1, true))) {
Note:
See TracChangeset
for help on using the changeset viewer.