Changeset 33577 in osm for applications/editors/josm
- Timestamp:
- 2017-08-27T21:11:20+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/ColumbusCSV
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/ColumbusCSV/build.xml
r32680 r33577 4 4 <property name="commit.message" value="Commit message"/> 5 5 <!-- Enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 0580"/>6 <property name="plugin.main.version" value="12671"/> 7 7 8 8 <!-- Plugin meta data --> -
applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVImporter.java
r32359 r33577 24 24 import org.openstreetmap.josm.actions.ExtensionFileFilter; 25 25 import org.openstreetmap.josm.data.gpx.GpxData; 26 import org.openstreetmap.josm.gui.MainApplication; 27 import org.openstreetmap.josm.gui.io.importexport.FileImporter; 26 28 import org.openstreetmap.josm.gui.layer.GpxLayer; 27 29 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 28 30 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 29 31 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 30 import org.openstreetmap.josm.io.FileImporter;31 32 import org.openstreetmap.josm.io.IllegalDataException; 33 import org.openstreetmap.josm.tools.Logging; 32 34 33 35 /** … … 89 91 90 92 // add layer to show way points 91 Main .getLayerManager().addLayer(gpxLayer);93 MainApplication.getLayerManager().addLayer(gpxLayer); 92 94 93 95 progressMonitor.setTicksCount(3); … … 108 110 assert ml.data != null; 109 111 110 Main.info("Layer: " + ml);111 Main.info("Data size: " + ml.data.size());112 Logging.info("Layer: " + ml); 113 Logging.info("Data size: " + ml.data.size()); 112 114 113 Main .getLayerManager().addLayer(ml);115 MainApplication.getLayerManager().addLayer(ml); 114 116 if (ml.data.isEmpty()) { 115 Main.warn("File contains no markers.");117 Logging.warn("File contains no markers."); 116 118 } 117 119 } catch (Exception exLayer) { 118 Main.error(exLayer);120 Logging.error(exLayer); 119 121 } 120 122 } else { 121 Main.warn("Option 'marker.makeautomarkers' is not set; audio marker layer is not created.");123 Logging.warn("Option 'marker.makeautomarkers' is not set; audio marker layer is not created."); 122 124 } 123 125 } catch (Exception e) { 124 126 // catch and forward exception 125 Main.error(e);127 Logging.error(e); 126 128 throw new IllegalDataException(e); 127 129 } finally { // take care of monitor... -
applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPreferences.java
r30768 r33577 55 55 * Ui elements for each flag. 56 56 */ 57 private JCheckBox colCSVShowSummary = new JCheckBox(tr("Show summary after import"));58 private JCheckBox colCSVDontZoomAfterImport = new JCheckBox(tr("Do not zoom after import"));59 private JCheckBox colCSVIgnoreVDOP = new JCheckBox(tr("Ignore hdop/vdop/pdop entries"));60 private JCheckBox colCSVWarnMissingAudio = new JCheckBox(tr("Warn on missing audio files"));61 private JCheckBox colCSVWarnConversionErrors = new JCheckBox(tr("Warn on conversion errors"));57 private final JCheckBox colCSVShowSummary = new JCheckBox(tr("Show summary after import")); 58 private final JCheckBox colCSVDontZoomAfterImport = new JCheckBox(tr("Do not zoom after import")); 59 private final JCheckBox colCSVIgnoreVDOP = new JCheckBox(tr("Ignore hdop/vdop/pdop entries")); 60 private final JCheckBox colCSVWarnMissingAudio = new JCheckBox(tr("Warn on missing audio files")); 61 private final JCheckBox colCSVWarnConversionErrors = new JCheckBox(tr("Warn on conversion errors")); 62 62 63 63 /** … … 150 150 } 151 151 152 @Override 152 153 public boolean isExpert() { 153 154 return false; -
applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVReader.java
r32359 r33577 34 34 import java.util.zip.DataFormatException; 35 35 36 import org.openstreetmap.josm.Main;37 36 import org.openstreetmap.josm.data.coor.LatLon; 38 37 import org.openstreetmap.josm.data.gpx.GpxData; … … 42 41 import org.openstreetmap.josm.data.gpx.WayPoint; 43 42 import org.openstreetmap.josm.io.IllegalDataException; 43 import org.openstreetmap.josm.tools.Logging; 44 44 45 45 /** … … 293 293 String nextVoxFile = String.format("vox%05d.wav", i + 1); 294 294 if (!voxFiles.containsKey(voxFile)) { 295 Main.info("Found lost vox file " + voxFile);295 Logging.info("Found lost vox file " + voxFile); 296 296 297 297 File f = getVoxFilePath(voxFile); … … 315 315 if (nearestWpt != null) { 316 316 if (addLinkToWayPoint(nearestWpt, "*" + voxFile + "*", f)) { 317 Main.info(String.format(317 Logging.info(String.format( 318 318 "Linked file %s to position %s", voxFile, 319 319 nearestWpt.getCoor().toDisplayString())); … … 322 322 rescuedFiles++; 323 323 } else { 324 Main.error(String.format("Could not link vox file %s due to invalid parameters.", voxFile));324 Logging.error(String.format("Could not link vox file %s due to invalid parameters.", voxFile)); 325 325 } 326 326 } … … 442 442 443 443 if (!"V".equals(csvLine[1])) { 444 Main.info("Rescued unlinked audio file " + voxFile);444 Logging.info("Rescued unlinked audio file " + voxFile); 445 445 } 446 446 voxFiles.put(voxFile, wpt); … … 449 449 wpt.attr.put(TYPE_TAG, "V"); 450 450 } else { // audio file not found -> issue warning 451 Main.error("File " + voxFile + " not found!");451 Logging.error("File " + voxFile + " not found!"); 452 452 String warnMsg = tr("Missing audio file") + ": " + voxFile; 453 Main.error(warnMsg);453 Logging.error(warnMsg); 454 454 if (ColumbusCSVPreferences.warnMissingAudio()) { 455 455 ColumbusCSVUtils.showInfoMessage(warnMsg); … … 475 475 } catch (ParseException ex) { 476 476 dateConversionErrors++; 477 Main.error(ex);477 Logging.error(ex); 478 478 } 479 479 -
applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/WayPointHelper.java
r30768 r33577 25 25 import java.util.List; 26 26 27 import org.openstreetmap.josm.Main;28 27 import org.openstreetmap.josm.data.coor.LatLon; 29 28 import org.openstreetmap.josm.data.gpx.WayPoint; 29 import org.openstreetmap.josm.tools.Logging; 30 30 31 31 /** … … 63 63 return Double.parseDouble(height); 64 64 } catch (NumberFormatException e) { 65 Main.error(String.format(65 Logging.error(String.format( 66 66 "Cannot parse double from '%s': %s", height, e 67 67 .getMessage()));
Note:
See TracChangeset
for help on using the changeset viewer.