Changeset 33024 in osm
- Timestamp:
- 2016-10-02T17:21:33+02:00 (8 years ago)
- Location:
- applications/editors/josm/plugins/dataimport
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/dataimport/.project
r32286 r33024 17 17 </arguments> 18 18 </buildCommand> 19 <buildCommand> 20 <name>net.sf.eclipsecs.core.CheckstyleBuilder</name> 21 <arguments> 22 </arguments> 23 </buildCommand> 19 24 </buildSpec> 20 25 <natures> 21 26 <nature>org.eclipse.jdt.core.javanature</nature> 27 <nature>net.sf.eclipsecs.core.CheckstyleNature</nature> 22 28 </natures> 23 29 </projectDescription> -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java
r32287 r33024 1 /** 2 * This plugin leverages JOSM to import files. 3 */ 1 // License: GPL. For details, see LICENSE file. 4 2 package org.openstreetmap.josm.plugins.dataimport; 5 3 … … 21 19 * @param info plugin information 22 20 */ 23 public DataImportPlugin(PluginInformation info) throws IOException {21 public DataImportPlugin(PluginInformation info) throws IOException { 24 22 super(info); 25 23 -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
r33009 r33024 1 /** 2 * 3 */ 1 // License: GPL. For details, see LICENSE file. 4 2 package org.openstreetmap.josm.plugins.dataimport.io; 5 3 … … 36 34 37 35 public TangoGPS() { 38 super(new ExtensionFileFilter("log", "log", tr("TangoGPS Files (*.log)")));36 super(new ExtensionFileFilter("log", "log", tr("TangoGPS Files (*.log)"))); 39 37 } 40 38 … … 43 41 * This function imports data from file and adds trackpoints to a layer. 44 42 * Read a log file from TangoGPS. These are simple text files in the 45 * form: <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>43 * form: {@code <lat>,<lon>,<elevation>,<speed>,<course>,<hdop>,<datetime>} 46 44 */ 47 45 @Override … … 76 74 } 77 75 failure = failure - imported; 78 if (imported > 0) {76 if (imported > 0) { 79 77 GpxData data = new GpxData(); 80 78 data.tracks.add(new ImmutableGpxTrack(Collections.singleton(currentTrackSeg), Collections.<String, Object>emptyMap())); … … 90 88 } 91 89 } 92 showInfobox(imported, failure);90 showInfobox(imported, failure); 93 91 } 94 92 } … … 104 102 } 105 103 106 private void showInfobox(int success, int failure) {104 private void showInfobox(int success, int failure) { 107 105 String msg = tr("Coordinates imported: ") + success + " " + tr("Format errors: ") + failure + "\n"; 108 106 if (success > 0) { -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
r32484 r33024 47 47 * The Garmin TCX Schema file can be downloaded from: <a 48 48 * href="http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd">http://www.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd</a> 49 * The command used to generate the code is: <code> 50 * xjc.bat -p org.openstreetmap.josm.io.tcx TrainingCenterDatabasev2.xsd -d <path to the src folder of JOSM> 51 * </code> 49 * The command used to generate the code is: 50 * {@code xjc.bat -p org.openstreetmap.josm.io.tcx TrainingCenterDatabasev2.xsd -d <path to the src folder of JOSM>} 52 51 * <p> 53 52 * Note: if you get an exception that JAXB 2.1 is not supported on your system, you will have to add the jaxb-api.jar 54 53 * to the endorsed directory (create it if necessary) of your JRE. Usually it is something like this: 55 * \<program files>\Java\jre<java version>\lib\endorsed54 * {@code \<program files>\Java\jre<java version>\lib\endorsed} 56 55 * 57 * @author adrian <as@nitegate.de>56 * @author adrian <as@nitegate.de> 58 57 * 59 58 */ … … 64 63 private GpxData gpxData; 65 64 66 67 65 public Tcx() { 68 super(new ExtensionFileFilter("tcx", "tcx",tr("TCX Files (*.tcx)"))); 69 } 70 71 /** 72 * @param tcxFile 73 */ 66 super(new ExtensionFileFilter("tcx", "tcx", tr("TCX Files (*.tcx)"))); 67 } 68 74 69 @Override 75 70 public void importData(File tcxFile, ProgressMonitor progressMonitor) throws IOException { … … 80 75 GpxLayer gpxLayer = new GpxLayer(gpxData, tcxFile.getName()); 81 76 Main.getLayerManager().addLayer(gpxLayer); 82 if (Main.pref.getBoolean("marker.makeautomarkers", true)) 83 { 77 if (Main.pref.getBoolean("marker.makeautomarkers", true)) { 84 78 MarkerLayer ml = new MarkerLayer(gpxData, tr("Markers from {0}", tcxFile.getName()), tcxFile, gpxLayer); 85 if (ml.data.size() > 0) 86 { 79 if (ml.data.size() > 0) { 87 80 Main.getLayerManager().addLayer(ml); 88 81 } … … 98 91 .newInstance(TrainingCenterDatabaseT.class); 99 92 Unmarshaller unmarshaller = jc.createUnmarshaller(); 100 JAXBElement<TrainingCenterDatabaseT> element = (JAXBElement<TrainingCenterDatabaseT>) unmarshaller93 JAXBElement<TrainingCenterDatabaseT> element = (JAXBElement<TrainingCenterDatabaseT>) unmarshaller 101 94 .unmarshal(tcxFile); 102 95 … … 145 138 } 146 139 147 /**148 * @param tcd149 */150 140 private void parseDataFromActivities(TrainingCenterDatabaseT tcd) { 151 141 int lap = 0; … … 188 178 } 189 179 190 /**191 * @param tcd192 */193 180 private void parseDataFromCourses(TrainingCenterDatabaseT tcd) { 194 181 if ((tcd.getCourses() != null)
Note:
See TracChangeset
for help on using the changeset viewer.