Ticket #21765: 21765.patch

File 21765.patch, 3.8 KB (added by taylor.smock, 4 years ago)
  • build.xml

     
    44    <!-- enter the SVN commit message -->
    55    <property name="commit.message" value="Changed constructor signature, updated build.xml"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="14456"/>
     7    <property name="plugin.main.version" value="15496"/>
    88
    99    <!-- Configure these properties (replace "..." accordingly).
    1010         See https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
  • src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java

     
    1919import org.openstreetmap.josm.actions.ExtensionFileFilter;
    2020import org.openstreetmap.josm.data.coor.LatLon;
    2121import org.openstreetmap.josm.data.gpx.GpxData;
    22 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
     22import org.openstreetmap.josm.data.gpx.GpxTrack;
    2323import org.openstreetmap.josm.data.gpx.WayPoint;
    2424import org.openstreetmap.josm.gui.MainApplication;
    2525import org.openstreetmap.josm.gui.io.importexport.FileImporter;
     
    5656
    5757        try (
    5858            InputStream source = new FileInputStream(file);
    59             BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8));
    60          ) {
     59            BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8))) {
    6160            String line;
    6261            while ((line = rd.readLine()) != null) {
    6362                failure++;
     
    7877            failure = failure - imported;
    7978            if (imported > 0) {
    8079                GpxData data = new GpxData();
    81                 data.tracks.add(new ImmutableGpxTrack(Collections.singleton(currentTrackSeg), Collections.<String, Object>emptyMap()));
     80                data.tracks.add(new GpxTrack(Collections.singleton(currentTrackSeg), Collections.emptyMap()));
    8281                data.recalculateBounds();
    8382                data.storageFile = file;
    8483                GpxLayer gpxLayer = new GpxLayer(data, file.getName());
  • src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java

     
    1717import org.openstreetmap.josm.actions.ExtensionFileFilter;
    1818import org.openstreetmap.josm.data.coor.LatLon;
    1919import org.openstreetmap.josm.data.gpx.GpxData;
    20 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
     20import org.openstreetmap.josm.data.gpx.GpxTrack;
    2121import org.openstreetmap.josm.data.gpx.WayPoint;
    2222import org.openstreetmap.josm.gui.MainApplication;
    2323import org.openstreetmap.josm.gui.io.importexport.FileImporter;
     
    159159                                    }
    160160                                }
    161161                            }
    162                             gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
     162                            gpxData.tracks.add(new GpxTrack(currentTrack, Collections.emptyMap()));
    163163                        }
    164164                    }
    165165                }
     
    186186                            }
    187187                        }
    188188                    }
    189                     gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
     189                    gpxData.tracks.add(new GpxTrack(currentTrack, Collections.emptyMap()));
    190190                }
    191191            }
    192192        }