Index: applications/editors/josm/plugins/dataimport/build.xml
===================================================================
--- applications/editors/josm/plugins/dataimport/build.xml	(revision 19680)
+++ applications/editors/josm/plugins/dataimport/build.xml	(revision 19681)
@@ -32,5 +32,5 @@
 	<property name="commit.message" value="Changed constructor signature, updated build.xml" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="2851" />
+	<property name="plugin.main.version" value="2907" />
 
 	<!--
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 19680)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/TangoGPS.java	(revision 19681)
@@ -13,4 +13,6 @@
 import java.io.InputStreamReader;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 import javax.swing.JOptionPane;
@@ -20,5 +22,6 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxData;
-import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.ImmutableGpxTrackSegment;
+import org.openstreetmap.josm.data.gpx.SingleSegmentGpxTrack;
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
@@ -46,8 +49,5 @@
 	public void importData(File file, ProgressMonitor progressMonitor) throws IOException {
 		// create the data tree
-		GpxData data = new GpxData();
-		GpxTrack currentTrack = new GpxTrack();
-		data.tracks.add(currentTrack);
-		ArrayList<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
+		List<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
 
 		int imported = 0;
@@ -79,5 +79,6 @@
 			failure = failure - imported;
 			if(imported > 0) {
-				currentTrack.trackSegs.add(currentTrackSeg);
+				GpxData data = new GpxData();
+				data.tracks.add(new SingleSegmentGpxTrack(new ImmutableGpxTrackSegment(currentTrackSeg), Collections.<String, Object>emptyMap()));
 				data.recalculateBounds();
 				data.storageFile = file;
Index: applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java
===================================================================
--- applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 19680)
+++ applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/io/Tcx.java	(revision 19681)
@@ -8,4 +8,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 
 import javax.xml.bind.JAXBContext;
@@ -19,5 +20,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxData;
-import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.ImmutableGpxTrack;
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.gui.layer.GpxLayer;
@@ -159,10 +160,9 @@
                             XMLGregorianCalendar startTime = activityLap
                                     .getStartTime();
-                            GpxTrack currentTrack = new GpxTrack();
-                            gpxData.tracks.add(currentTrack);
+                            Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
                             for (TrackT track : activityLap.getTrack()) {
                                 if (track.getTrackpoint() != null) {
                                     Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
-                                    currentTrack.trackSegs.add(currentTrackSeg);
+                                    currentTrack.add(currentTrackSeg);
                                     for (TrackpointT tp :
                                            track.getTrackpoint()) {
@@ -182,4 +182,5 @@
                                 }
                             }
+                            gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
                         }
                     }
@@ -197,10 +198,9 @@
             for (CourseT course : tcd.getCourses().getCourse()) {
                 if (course.getTrack() != null) {
-                    GpxTrack currentTrack = new GpxTrack();
-                    gpxData.tracks.add(currentTrack);
+                    Collection<Collection<WayPoint>> currentTrack = new ArrayList<Collection<WayPoint>>();
                     for (TrackT track : course.getTrack()) {
                         if (track.getTrackpoint() != null) {
                             Collection<WayPoint> currentTrackSeg = new ArrayList<WayPoint>();
-                            currentTrack.trackSegs.add(currentTrackSeg);
+                            currentTrack.add(currentTrackSeg);
                             for (TrackpointT tp : track.getTrackpoint()) {
                                 WayPoint waypt = convertPoint(tp);
@@ -212,4 +212,5 @@
                         }
                     }
+                    gpxData.tracks.add(new ImmutableGpxTrack(currentTrack, Collections.<String, Object>emptyMap()));
                 }
             }
Index: applications/editors/josm/plugins/globalsat/build.xml
===================================================================
--- applications/editors/josm/plugins/globalsat/build.xml	(revision 19680)
+++ applications/editors/josm/plugins/globalsat/build.xml	(revision 19681)
@@ -33,5 +33,5 @@
 	<property name="commit.message" value="Changed constructor signature of plugin main class" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="2830" />
+	<property name="plugin.main.version" value="2907" />
 
 	<property name="josm"                   location="../../core/dist/josm-custom.jar"/>
Index: applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java
===================================================================
--- applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java	(revision 19680)
+++ applications/editors/josm/plugins/globalsat/src/org/openstreetmap/josm/plugins/globalsat/GlobalsatDg100.java	(revision 19681)
@@ -17,4 +17,5 @@
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
 
@@ -26,5 +27,6 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxData;
-import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.ImmutableGpxTrackSegment;
+import org.openstreetmap.josm.data.gpx.SingleSegmentGpxTrack;
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.gui.progress.ProgressMonitor;
@@ -148,9 +150,6 @@
     		if(gpsRecList.size() > 0){
     			GpsRec last = null;
-    			GpxTrack trk = new GpxTrack();
+    			result = new GpxData();
     			Collection<WayPoint> seg = new ArrayList<WayPoint>(100);
-    			result = new GpxData();
-    			result.tracks.add(trk);
-    			trk.trackSegs.add(seg);
     			for(GpsRec r:gpsRecList){
     				if(cancelled){
@@ -166,4 +165,5 @@
     				progressMonitor.worked(1);
     			}
+    			result.tracks.add(new SingleSegmentGpxTrack(new ImmutableGpxTrackSegment(seg), Collections.<String, Object>emptyMap()));
     		}
     		return result;
Index: applications/editors/josm/plugins/measurement/build.xml
===================================================================
--- applications/editors/josm/plugins/measurement/build.xml	(revision 19680)
+++ applications/editors/josm/plugins/measurement/build.xml	(revision 19681)
@@ -28,5 +28,5 @@
 
 	<property name="commit.message" value="Changed the constructor signature of the plugin main class" />
-	<property name="plugin.main.version" value="2830" />
+	<property name="plugin.main.version" value="2907" />
 
 
Index: applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
===================================================================
--- applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 19680)
+++ applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 19681)
@@ -32,4 +32,5 @@
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.gpx.GpxTrack;
+import org.openstreetmap.josm.data.gpx.GpxTrackSegment;
 import org.openstreetmap.josm.data.gpx.WayPoint;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
@@ -316,6 +317,6 @@
 
                 for (GpxTrack trk : gpx.data.tracks) {
-                    for (Collection<WayPoint> trkseg : trk.trackSegs) {
-                        for(WayPoint p: trkseg){
+                    for (GpxTrackSegment trkseg : trk.getSegments()) {
+                        for(WayPoint p: trkseg.getWayPoints()){
                             points.add(p);
                         }
Index: applications/editors/josm/plugins/surveyor/build.xml
===================================================================
--- applications/editors/josm/plugins/surveyor/build.xml	(revision 19680)
+++ applications/editors/josm/plugins/surveyor/build.xml	(revision 19681)
@@ -33,5 +33,5 @@
 	<property name="commit.message" value="Changed the constructor signature of the plugin main class" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="2830" />
+	<property name="plugin.main.version" value="2907" />
 
 
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 19680)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java	(revision 19681)
@@ -14,6 +14,4 @@
 
 import javax.swing.JOptionPane;
-
-import livegps.LiveGpsLock;
 
 import org.openstreetmap.josm.Main;
@@ -53,5 +51,5 @@
             File tmpFile = new File(file.getAbsoluteFile()+".tmp");
             System.out.println("AutoSaving osm data to file " + file.getAbsolutePath());
-            synchronized(LiveGpsLock.class) {
+            synchronized(SurveyorLock.class) {
                 OsmWriter w = new OsmWriter(new PrintWriter(new FileOutputStream(tmpFile)), false, dataset.getVersion());
                 w.header();
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java	(revision 19680)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveGpsLayerTimerTask.java	(revision 19681)
@@ -15,6 +15,4 @@
 
 import javax.swing.JOptionPane;
-
-import livegps.LiveGpsLock;
 
 import org.openstreetmap.josm.Main;
@@ -76,7 +74,5 @@
             PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(tmpFile)));
             GpxWriter gpxWriter = new GpxWriter(out);
-            synchronized(LiveGpsLock.class) {
-                gpxWriter.write(gpsLayer.data);
-            }
+            gpxWriter.write(gpsLayer.data);
             tmpFile.renameTo(file);
         } catch (IOException ioExc) {
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java	(revision 19681)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorLock.java	(revision 19681)
@@ -0,0 +1,5 @@
+package at.dallermassl.josm.plugin.surveyor;
+
+public class SurveyorLock {
+
+}
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 19680)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetNodeAction.java	(revision 19681)
@@ -10,6 +10,4 @@
 import java.util.Map.Entry;
 
-import livegps.LiveGpsLock;
-
 import org.dinopolis.util.collection.Tuple;
 import org.openstreetmap.josm.Main;
@@ -20,4 +18,5 @@
 import at.dallermassl.josm.plugin.surveyor.GpsActionEvent;
 import at.dallermassl.josm.plugin.surveyor.SurveyorAction;
+import at.dallermassl.josm.plugin.surveyor.SurveyorLock;
 
 /**
@@ -69,5 +68,5 @@
             node.put(entry.getKey(), entry.getValue());
         }
-        synchronized(LiveGpsLock.class) {
+        synchronized(SurveyorLock.class) {
             DataSet ds = Main.main.getCurrentDataSet();
             if(ds != null)
Index: applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java
===================================================================
--- applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 19680)
+++ applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/action/SetWaypointAction.java	(revision 19681)
@@ -12,5 +12,4 @@
 
 import livegps.LiveGpsLayer;
-import livegps.LiveGpsLock;
 
 import org.openstreetmap.josm.Main;
@@ -24,4 +23,5 @@
 
 import at.dallermassl.josm.plugin.surveyor.GpsActionEvent;
+import at.dallermassl.josm.plugin.surveyor.SurveyorLock;
 import at.dallermassl.josm.plugin.surveyor.SurveyorPlugin;
 import at.dallermassl.josm.plugin.surveyor.action.gui.WaypointDialog;
@@ -86,5 +86,5 @@
         if(iconName != null)
             waypoint.attr.put("sym", iconName);
-        synchronized(LiveGpsLock.class) {
+        synchronized(SurveyorLock.class) {
             //layer.data.add(new Marker(event.getCoordinates(), markerText, iconName));
             layer.data.add(new Marker(event.getCoordinates(), markerText, iconName, null, -1.0, 0.0));
