Changeset 34846 in osm for applications/editors/josm/plugins/o5m/src/org/openstreetmap
- Timestamp:
- 2019-01-21T08:10:10+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/o5m/src/org/openstreetmap/josm/plugins/o5m/io/O5mReader.java
r34842 r34846 124 124 * parse the input stream 125 125 * @param source The InputStream that contains the OSM data in o5m format 126 * @throws O5mParsingCancelException if operation was canceled127 */ 128 public void parse(InputStream source) throws O5mParsingCancelException {126 * @throws ParsingCancelException if operation was canceled 127 */ 128 public void parse(InputStream source) throws ParsingCancelException { 129 129 this.fis = new BufferedInputStream(source); 130 130 is = fis; … … 143 143 } 144 144 145 private void readFile() throws IOException, O5mParsingCancelException {145 private void readFile() throws IOException, ParsingCancelException { 146 146 boolean done = false; 147 147 while (!done) { 148 148 if (cancel) { 149 149 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)); 151 151 } 152 152 is = fis; … … 653 653 * Exception thrown after user cancellation. 654 654 */ 655 private static final class O5mParsingCancelException extends Exception implements ImportCancelException {655 private static final class ParsingCancelException extends Exception implements ImportCancelException { 656 656 private static final long serialVersionUID = 1L; 657 657 658 O5mParsingCancelException(String msg) {658 ParsingCancelException(String msg) { 659 659 super(msg); 660 660 } … … 685 685 progressMonitor.addCancelListener(cancelListener); 686 686 try { 687 progressMonitor.beginTask(tr("Prepare OSM data..."), 3); // read, prepare, render687 progressMonitor.beginTask(tr("Prepare OSM data..."), 3); // read, prepare, create data layer 688 688 progressMonitor.indeterminateSubTask(tr("Reading OSM data...")); 689 689 690 690 parse(source); 691 691 progressMonitor.worked(1); 692 693 692 progressMonitor.indeterminateSubTask(tr("Preparing data set...")); 694 693 prepareDataSet(); 695 694 progressMonitor.worked(1); 696 695 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 } 700 698 return getDataSet(); 701 699 } catch (IllegalDataException e) {
Note:
See TracChangeset
for help on using the changeset viewer.