Changeset 33577 in osm for applications/editors


Ignore:
Timestamp:
2017-08-27T21:11:20+02:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12671

Location:
applications/editors/josm/plugins/ColumbusCSV
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/ColumbusCSV/build.xml

    r32680 r33577  
    44    <property name="commit.message" value="Commit message"/>
    55    <!-- Enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="12671"/>
    77   
    88    <!-- Plugin meta data -->
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVImporter.java

    r32359 r33577  
    2424import org.openstreetmap.josm.actions.ExtensionFileFilter;
    2525import org.openstreetmap.josm.data.gpx.GpxData;
     26import org.openstreetmap.josm.gui.MainApplication;
     27import org.openstreetmap.josm.gui.io.importexport.FileImporter;
    2628import org.openstreetmap.josm.gui.layer.GpxLayer;
    2729import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
    2830import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    2931import org.openstreetmap.josm.gui.progress.ProgressMonitor;
    30 import org.openstreetmap.josm.io.FileImporter;
    3132import org.openstreetmap.josm.io.IllegalDataException;
     33import org.openstreetmap.josm.tools.Logging;
    3234
    3335/**
     
    8991       
    9092                // add layer to show way points
    91                 Main.getLayerManager().addLayer(gpxLayer);
     93                MainApplication.getLayerManager().addLayer(gpxLayer);
    9294       
    9395                progressMonitor.setTicksCount(3);
     
    108110                        assert ml.data != null;
    109111           
    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());
    112114           
    113                         Main.getLayerManager().addLayer(ml);
     115                        MainApplication.getLayerManager().addLayer(ml);
    114116                        if (ml.data.isEmpty()) {
    115                             Main.warn("File contains no markers.");
     117                                Logging.warn("File contains no markers.");
    116118                        }
    117119                    } catch (Exception exLayer) {
    118                         Main.error(exLayer);
     120                        Logging.error(exLayer);
    119121                    }
    120122                } 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.");
    122124                }
    123125            } catch (Exception e) {
    124126                // catch and forward exception
    125                 Main.error(e);
     127                Logging.error(e);
    126128                throw new IllegalDataException(e);
    127129            } finally { // take care of monitor...
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVPreferences.java

    r30768 r33577  
    5555     * Ui elements for each flag.
    5656     */
    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"));
    6262   
    6363    /**
     
    150150    }
    151151
     152    @Override
    152153    public boolean isExpert() {
    153154        return false;
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/ColumbusCSVReader.java

    r32359 r33577  
    3434import java.util.zip.DataFormatException;
    3535
    36 import org.openstreetmap.josm.Main;
    3736import org.openstreetmap.josm.data.coor.LatLon;
    3837import org.openstreetmap.josm.data.gpx.GpxData;
     
    4241import org.openstreetmap.josm.data.gpx.WayPoint;
    4342import org.openstreetmap.josm.io.IllegalDataException;
     43import org.openstreetmap.josm.tools.Logging;
    4444
    4545/**
     
    293293            String nextVoxFile = String.format("vox%05d.wav", i + 1);
    294294            if (!voxFiles.containsKey(voxFile)) {
    295                 Main.info("Found lost vox file " + voxFile);
     295                Logging.info("Found lost vox file " + voxFile);
    296296       
    297297                File f = getVoxFilePath(voxFile);
     
    315315                if (nearestWpt != null) {
    316316                    if (addLinkToWayPoint(nearestWpt, "*" + voxFile + "*", f)) {
    317                         Main.info(String.format(
     317                        Logging.info(String.format(
    318318                            "Linked file %s to position %s", voxFile,
    319319                            nearestWpt.getCoor().toDisplayString()));
     
    322322                        rescuedFiles++;
    323323                    } 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));
    325325                    }
    326326                }
     
    442442       
    443443                if (!"V".equals(csvLine[1])) {
    444                     Main.info("Rescued unlinked audio file " + voxFile);
     444                    Logging.info("Rescued unlinked audio file " + voxFile);
    445445                }
    446446                voxFiles.put(voxFile, wpt);
     
    449449                wpt.attr.put(TYPE_TAG, "V");
    450450            } else { // audio file not found -> issue warning
    451                 Main.error("File " + voxFile + " not found!");
     451                Logging.error("File " + voxFile + " not found!");
    452452                String warnMsg = tr("Missing audio file") + ": " + voxFile;
    453                 Main.error(warnMsg);
     453                Logging.error(warnMsg);
    454454                if (ColumbusCSVPreferences.warnMissingAudio()) {
    455455                    ColumbusCSVUtils.showInfoMessage(warnMsg);
     
    475475        } catch (ParseException ex) {
    476476            dateConversionErrors++;
    477             Main.error(ex);
     477            Logging.error(ex);
    478478        }
    479479   
  • applications/editors/josm/plugins/ColumbusCSV/src/org/openstreetmap/josm/plugins/columbusCSV/WayPointHelper.java

    r30768 r33577  
    2525import java.util.List;
    2626
    27 import org.openstreetmap.josm.Main;
    2827import org.openstreetmap.josm.data.coor.LatLon;
    2928import org.openstreetmap.josm.data.gpx.WayPoint;
     29import org.openstreetmap.josm.tools.Logging;
    3030
    3131/**
     
    6363                return Double.parseDouble(height);
    6464            } catch (NumberFormatException e) {
    65                 Main.error(String.format(
     65                Logging.error(String.format(
    6666                        "Cannot parse double from '%s': %s", height, e
    6767                                .getMessage()));
Note: See TracChangeset for help on using the changeset viewer.