Changeset 34475 in osm for applications/editors/josm/plugins/dataimport/src
- Timestamp:
- 2018-08-15T13:29:06+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java
r33024 r34475 18 18 * Add new File import filter into open dialog 19 19 * @param info plugin information 20 * @throws IOException in case of I/O error 20 21 */ 21 22 public DataImportPlugin(PluginInformation info) throws IOException { -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
r33559 r34475 10 10 import java.io.InputStream; 11 11 import java.io.InputStreamReader; 12 import java.nio.charset.StandardCharsets; 12 13 import java.util.ArrayList; 13 14 import java.util.Collections; … … 16 17 import javax.swing.JOptionPane; 17 18 18 import org.openstreetmap.josm.Main;19 19 import org.openstreetmap.josm.actions.ExtensionFileFilter; 20 20 import org.openstreetmap.josm.data.coor.LatLon; … … 27 27 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 28 28 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 29 import org.openstreetmap.josm.spi.preferences.Config; 29 30 import org.openstreetmap.josm.tools.Logging; 30 31 … … 55 56 try ( 56 57 InputStream source = new FileInputStream(file); 57 BufferedReader rd = new BufferedReader(new InputStreamReader(source)); 58 BufferedReader rd = new BufferedReader(new InputStreamReader(source, StandardCharsets.UTF_8)); 58 59 ) { 59 60 String line; … … 83 84 GpxLayer gpxLayer = new GpxLayer(data, file.getName()); 84 85 MainApplication.getLayerManager().addLayer(gpxLayer); 85 if ( Main.pref.getBoolean("marker.makeautomarkers", true)) {86 if (Config.getPref().getBoolean("marker.makeautomarkers", true)) { 86 87 MarkerLayer ml = new MarkerLayer(data, tr("Markers from {0}", file.getName()), file, gpxLayer); 87 88 if (ml.data.size() > 0) { … … 107 108 String msg = tr("Coordinates imported: ") + success + " " + tr("Format errors: ") + failure + "\n"; 108 109 if (success > 0) { 109 JOptionPane.showMessageDialog(Main .parent, msg, tr("TangoGPS import success"), JOptionPane.INFORMATION_MESSAGE);110 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), msg, tr("TangoGPS import success"), JOptionPane.INFORMATION_MESSAGE); 110 111 } else { 111 JOptionPane.showMessageDialog(Main .parent, msg, tr("TangoGPS import failure!"), JOptionPane.ERROR_MESSAGE);112 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), msg, tr("TangoGPS import failure!"), JOptionPane.ERROR_MESSAGE); 112 113 } 113 114 } -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
r33581 r34475 16 16 import javax.xml.datatype.XMLGregorianCalendar; 17 17 18 import org.openstreetmap.josm.Main;19 18 import org.openstreetmap.josm.actions.ExtensionFileFilter; 20 19 import org.openstreetmap.josm.data.coor.LatLon; … … 34 33 import org.openstreetmap.josm.plugins.dataimport.io.tcx.TrackpointT; 35 34 import org.openstreetmap.josm.plugins.dataimport.io.tcx.TrainingCenterDatabaseT; 35 import org.openstreetmap.josm.spi.preferences.Config; 36 36 37 37 … … 76 76 GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName()); 77 77 MainApplication.getLayerManager().addLayer(gpxLayer); 78 if ( Main.pref.getBoolean("marker.makeautomarkers", true)) {78 if (Config.getPref().getBoolean("marker.makeautomarkers", true)) { 79 79 MarkerLayer ml = new MarkerLayer(gpxData, tr("Markers from {0}", tcxFile.getName()), tcxFile, gpxLayer); 80 80 if (ml.data.size() > 0) {
Note:
See TracChangeset
for help on using the changeset viewer.