Ignore:
Timestamp:
2013-04-14T19:10:11+02:00 (11 years ago)
Author:
akks
Message:

see #8274, #8601 : cancel now works while parsing OSM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmChangeImporter.java

    r5452 r5859  
    3838           
    3939            if (file.getName().endsWith(".osc")) {
    40                 importData(in, file);
     40                importData(in, file, progressMonitor);
    4141            } else if (file.getName().endsWith(".gz")) {
    42                 importData(getGZipInputStream(in), file);
     42                importData(getGZipInputStream(in), file, progressMonitor);
    4343            } else {
    44                 importData(getBZip2InputStream(in), file);
     44                importData(getBZip2InputStream(in), file, progressMonitor);
    4545            }
    4646           
     
    5252
    5353    protected void importData(InputStream in, final File associatedFile) throws IllegalDataException {
    54         final DataSet dataSet = OsmChangeReader.parseDataSet(in, NullProgressMonitor.INSTANCE);
     54        importData(in, associatedFile, NullProgressMonitor.INSTANCE);
     55    }
     56   
     57    protected void importData(InputStream in, final File associatedFile, ProgressMonitor  progressMonitor) throws IllegalDataException {
     58        final DataSet dataSet = OsmChangeReader.parseDataSet(in, progressMonitor);
    5559        final OsmDataLayer layer = new OsmDataLayer(dataSet, associatedFile.getName(), associatedFile);
    5660        addDataLayer(dataSet, layer, associatedFile.getPath());
Note: See TracChangeset for help on using the changeset viewer.