Ignore:
Timestamp:
2019-01-21T08:10:10+01:00 (6 years ago)
Author:
gerdp
Message:

don't see text in progress monitor to "Rendering data set...". Let OsmImporter chose what to use once parsing is done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/o5m/src/org/openstreetmap/josm/plugins/o5m/io/O5mReader.java

    r34842 r34846  
    124124     * parse the input stream
    125125     * @param source The InputStream that contains the OSM data in o5m format
    126      * @throws O5mParsingCancelException if operation was canceled
    127      */
    128     public void parse(InputStream source) throws O5mParsingCancelException {
     126     * @throws ParsingCancelException if operation was canceled
     127     */
     128    public void parse(InputStream source) throws ParsingCancelException {
    129129        this.fis = new BufferedInputStream(source);
    130130        is = fis;
     
    143143    }
    144144
    145     private void readFile() throws IOException, O5mParsingCancelException {
     145    private void readFile() throws IOException, ParsingCancelException {
    146146        boolean done = false;
    147147        while (!done) {
    148148            if (cancel) {
    149149                cancel = false;
    150                 throw new O5mParsingCancelException(tr("Reading was canceled at file offset {0}", countBytes));
     150                throw new ParsingCancelException(tr("Reading was canceled at file offset {0}", countBytes));
    151151            }
    152152            is = fis;
     
    653653     * Exception thrown after user cancellation.
    654654     */
    655     private static final class O5mParsingCancelException extends Exception implements ImportCancelException {
     655    private static final class ParsingCancelException extends Exception implements ImportCancelException {
    656656        private static final long serialVersionUID = 1L;
    657657
    658         O5mParsingCancelException(String msg) {
     658        ParsingCancelException(String msg) {
    659659            super(msg);
    660660        }
     
    685685        progressMonitor.addCancelListener(cancelListener);
    686686        try {
    687             progressMonitor.beginTask(tr("Prepare OSM data..."), 3); // read, prepare, render
     687            progressMonitor.beginTask(tr("Prepare OSM data..."), 3); // read, prepare, create data layer
    688688            progressMonitor.indeterminateSubTask(tr("Reading OSM data..."));
    689689
    690690            parse(source);
    691691            progressMonitor.worked(1);
    692            
    693692            progressMonitor.indeterminateSubTask(tr("Preparing data set..."));
    694693            prepareDataSet();
    695694            progressMonitor.worked(1);
    696695            if (cancel) {
    697                 throw new O5mParsingCancelException(tr("Import was canceled while preparing data"));
    698             }
    699             progressMonitor.indeterminateSubTask(tr("Rendering data set..."));
     696                throw new ParsingCancelException(tr("Import was canceled"));
     697            }
    700698            return getDataSet();
    701699        } catch (IllegalDataException e) {
Note: See TracChangeset for help on using the changeset viewer.