Changeset 19681 in osm for applications/editors
- Timestamp:
- 2010-01-30T20:10:15+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins
- Files:
-
- 1 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/dataimport/build.xml
r19503 r19681 32 32 <property name="commit.message" value="Changed constructor signature, updated build.xml" /> 33 33 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 34 <property name="plugin.main.version" value="2 851" />34 <property name="plugin.main.version" value="2907" /> 35 35 36 36 <!-- -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
r19503 r19681 13 13 import java.io.InputStreamReader; 14 14 import java.util.ArrayList; 15 import java.util.Collections; 16 import java.util.List; 15 17 16 18 import javax.swing.JOptionPane; … … 20 22 import org.openstreetmap.josm.data.coor.LatLon; 21 23 import org.openstreetmap.josm.data.gpx.GpxData; 22 import org.openstreetmap.josm.data.gpx.GpxTrack; 24 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrackSegment; 25 import org.openstreetmap.josm.data.gpx.SingleSegmentGpxTrack; 23 26 import org.openstreetmap.josm.data.gpx.WayPoint; 24 27 import org.openstreetmap.josm.gui.layer.GpxLayer; … … 46 49 public void importData(File file, ProgressMonitor progressMonitor) throws IOException { 47 50 // create the data tree 48 GpxData data = new GpxData(); 49 GpxTrack currentTrack = new GpxTrack(); 50 data.tracks.add(currentTrack); 51 ArrayList<WayPoint> currentTrackSeg = new ArrayList<WayPoint>(); 51 List<WayPoint> currentTrackSeg = new ArrayList<WayPoint>(); 52 52 53 53 int imported = 0; … … 79 79 failure = failure - imported; 80 80 if(imported > 0) { 81 currentTrack.trackSegs.add(currentTrackSeg); 81 GpxData data = new GpxData(); 82 data.tracks.add(new SingleSegmentGpxTrack(new ImmutableGpxTrackSegment(currentTrackSeg), Collections.<String, Object>emptyMap())); 82 83 data.recalculateBounds(); 83 84 data.storageFile = file; -
applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
r19503 r19681 8 8 import java.util.ArrayList; 9 9 import java.util.Collection; 10 import java.util.Collections; 10 11 11 12 import javax.xml.bind.JAXBContext; … … 19 20 import org.openstreetmap.josm.data.coor.LatLon; 20 21 import org.openstreetmap.josm.data.gpx.GpxData; 21 import org.openstreetmap.josm.data.gpx. GpxTrack;22 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack; 22 23 import org.openstreetmap.josm.data.gpx.WayPoint; 23 24 import org.openstreetmap.josm.gui.layer.GpxLayer; … … 159 160 XMLGregorianCalendar startTime = activityLap 160 161 .getStartTime(); 161 GpxTrack currentTrack = new GpxTrack(); 162 gpxData.tracks.add(currentTrack); 162 Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>(); 163 163 for (TrackT track : activityLap.getTrack()) { 164 164 if (track.getTrackpoint() != null) { 165 165 Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>(); 166 currentTrack. trackSegs.add(currentTrackSeg);166 currentTrack.add(currentTrackSeg); 167 167 for (TrackpointT tp : 168 168 track.getTrackpoint()) { … … 182 182 } 183 183 } 184 gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap())); 184 185 } 185 186 } … … 197 198 for (CourseT course : tcd.getCourses().getCourse()) { 198 199 if (course.getTrack() != null) { 199 GpxTrack currentTrack = new GpxTrack(); 200 gpxData.tracks.add(currentTrack); 200 Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>(); 201 201 for (TrackT track : course.getTrack()) { 202 202 if (track.getTrackpoint() != null) { 203 203 Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>(); 204 currentTrack. trackSegs.add(currentTrackSeg);204 currentTrack.add(currentTrackSeg); 205 205 for (TrackpointT tp : track.getTrackpoint()) { 206 206 WayPoint waypt = convertPoint(tp); … … 212 212 } 213 213 } 214 gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap())); 214 215 } 215 216 } -
applications/editors/josm/plugins/globalsat/build.xml
r19436 r19681 33 33 <property name="commit.message" value="Changed constructor signature of plugin main class" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="2 830" />35 <property name="plugin.main.version" value="2907" /> 36 36 37 37 <property name="josm" location="../../core/dist/josm-custom.jar"/> -
applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java
r16585 r19681 17 17 import java.util.ArrayList; 18 18 import java.util.Collection; 19 import java.util.Collections; 19 20 import java.util.List; 20 21 … … 26 27 import org.openstreetmap.josm.data.coor.LatLon; 27 28 import org.openstreetmap.josm.data.gpx.GpxData; 28 import org.openstreetmap.josm.data.gpx.GpxTrack; 29 import org.openstreetmap.josm.data.gpx.ImmutableGpxTrackSegment; 30 import org.openstreetmap.josm.data.gpx.SingleSegmentGpxTrack; 29 31 import org.openstreetmap.josm.data.gpx.WayPoint; 30 32 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 148 150 if(gpsRecList.size() > 0){ 149 151 GpsRec last = null; 150 GpxTrack trk = new GpxTrack();152 result = new GpxData(); 151 153 Collection<WayPoint> seg = new ArrayList<WayPoint>(100); 152 result = new GpxData();153 result.tracks.add(trk);154 trk.trackSegs.add(seg);155 154 for(GpsRec r:gpsRecList){ 156 155 if(cancelled){ … … 166 165 progressMonitor.worked(1); 167 166 } 167 result.tracks.add(new SingleSegmentGpxTrack(new ImmutableGpxTrackSegment(seg), Collections.<String, Object>emptyMap())); 168 168 } 169 169 return result; -
applications/editors/josm/plugins/measurement/build.xml
r19450 r19681 28 28 29 29 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 30 <property name="plugin.main.version" value="2 830" />30 <property name="plugin.main.version" value="2907" /> 31 31 32 32 -
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
r18595 r19681 32 32 import org.openstreetmap.josm.data.coor.LatLon; 33 33 import org.openstreetmap.josm.data.gpx.GpxTrack; 34 import org.openstreetmap.josm.data.gpx.GpxTrackSegment; 34 35 import org.openstreetmap.josm.data.gpx.WayPoint; 35 36 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; … … 316 317 317 318 for (GpxTrack trk : gpx.data.tracks) { 318 for ( Collection<WayPoint> trkseg : trk.trackSegs) {319 for(WayPoint p: trkseg ){319 for (GpxTrackSegment trkseg : trk.getSegments()) { 320 for(WayPoint p: trkseg.getWayPoints()){ 320 321 points.add(p); 321 322 } -
applications/editors/josm/plugins/surveyor/build.xml
r19479 r19681 33 33 <property name="commit.message" value="Changed the constructor signature of the plugin main class" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value="2 830" />35 <property name="plugin.main.version" value="2907" /> 36 36 37 37 -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
r18490 r19681 14 14 15 15 import javax.swing.JOptionPane; 16 17 import livegps.LiveGpsLock;18 16 19 17 import org.openstreetmap.josm.Main; … … 53 51 File tmpFile = new File(file.getAbsoluteFile()+".tmp"); 54 52 System.out.println("AutoSaving osm data to file " + file.getAbsolutePath()); 55 synchronized( LiveGpsLock.class) {53 synchronized(SurveyorLock.class) { 56 54 OsmWriter w = new OsmWriter(new PrintWriter(new FileOutputStream(tmpFile)), false, dataset.getVersion()); 57 55 w.header(); -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java
r13497 r19681 15 15 16 16 import javax.swing.JOptionPane; 17 18 import livegps.LiveGpsLock;19 17 20 18 import org.openstreetmap.josm.Main; … … 76 74 PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(tmpFile))); 77 75 GpxWriter gpxWriter = new GpxWriter(out); 78 synchronized(LiveGpsLock.class) { 79 gpxWriter.write(gpsLayer.data); 80 } 76 gpxWriter.write(gpsLayer.data); 81 77 tmpFile.renameTo(file); 82 78 } catch (IOException ioExc) { -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java
r19211 r19681 10 10 import java.util.Map.Entry; 11 11 12 import livegps.LiveGpsLock;13 14 12 import org.dinopolis.util.collection.Tuple; 15 13 import org.openstreetmap.josm.Main; … … 20 18 import at.dallermassl.josm.plugin.surveyor.GpsActionEvent; 21 19 import at.dallermassl.josm.plugin.surveyor.SurveyorAction; 20 import at.dallermassl.josm.plugin.surveyor.SurveyorLock; 22 21 23 22 /** … … 69 68 node.put(entry.getKey(), entry.getValue()); 70 69 } 71 synchronized( LiveGpsLock.class) {70 synchronized(SurveyorLock.class) { 72 71 DataSet ds = Main.main.getCurrentDataSet(); 73 72 if(ds != null) -
applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java
r19211 r19681 12 12 13 13 import livegps.LiveGpsLayer; 14 import livegps.LiveGpsLock;15 14 16 15 import org.openstreetmap.josm.Main; … … 24 23 25 24 import at.dallermassl.josm.plugin.surveyor.GpsActionEvent; 25 import at.dallermassl.josm.plugin.surveyor.SurveyorLock; 26 26 import at.dallermassl.josm.plugin.surveyor.SurveyorPlugin; 27 27 import at.dallermassl.josm.plugin.surveyor.action.gui.WaypointDialog; … … 86 86 if(iconName != null) 87 87 waypoint.attr.put("sym", iconName); 88 synchronized( LiveGpsLock.class) {88 synchronized(SurveyorLock.class) { 89 89 //layer.data.add(new Marker(event.getCoordinates(), markerText, iconName)); 90 90 layer.data.add(new Marker(event.getCoordinates(), markerText, iconName, null, -1.0, 0.0));
Note:
See TracChangeset
for help on using the changeset viewer.