Index: /applications/editors/josm/plugins/CustomizePublicTransportStop/build.properties
===================================================================
--- /applications/editors/josm/plugins/CustomizePublicTransportStop/build.properties	(revision 33810)
+++ /applications/editors/josm/plugins/CustomizePublicTransportStop/build.properties	(revision 33811)
@@ -14,5 +14,5 @@
 # the lowest JOSM version the curent plugin version is compatible with
 #
-josm.required.version=10353
+josm.required.version=12840
 
 # the full path to the JOSM jar against which this plugin is built
Index: /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java
===================================================================
--- /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java	(revision 33810)
+++ /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CreateNewStopPointOperation.java	(revision 33811)
@@ -19,8 +19,7 @@
 import org.openstreetmap.josm.data.osm.Way;
 import org.openstreetmap.josm.data.osm.WaySegment;
-import org.openstreetmap.josm.data.projection.Projections;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.tools.Geometry;
-
-import ru.rodsoft.openstreetmap.josm.plugins.customizepublictransportstop.OSMTags;
 
 /**
@@ -60,5 +59,5 @@
 
             for (Node n : ds.searchNodes(getBBox(p, 200))) {
-                if ((dist = Main.map.mapView.getPoint2D(n).distanceSq(p)) < snapDistanceSq)
+                if ((dist = MainApplication.getMap().mapView.getPoint2D(n).distanceSq(p)) < snapDistanceSq)
                 {
                     List<Node> nlist;
@@ -84,6 +83,7 @@
      */
     private BBox getBBox(Point p, int snapDistance) {
-        return new BBox(Main.map.mapView.getLatLon(p.x - snapDistance, p.y - snapDistance),
-        		Main.map.mapView.getLatLon(p.x + snapDistance, p.y + snapDistance));
+        MapView mapView = MainApplication.getMap().mapView;
+        return new BBox(mapView.getLatLon(p.x - snapDistance, p.y - snapDistance),
+        		        mapView.getLatLon(p.x + snapDistance, p.y + snapDistance));
     }
 
@@ -96,5 +96,5 @@
     public AbstractMap.SimpleEntry<Double, Node> getNearestNode(LatLon platformCoord, StopArea stopArea)
     {
-    	Point p = Main.map.mapView.getPoint(platformCoord);
+    	Point p = MainApplication.getMap().mapView.getPoint(platformCoord);
     	Map<Double, List<Node>> dist_nodes = getNearestNodesImpl(p);
     	Double[] distances = dist_nodes.keySet().toArray(new Double[0]);
@@ -196,8 +196,8 @@
 
         if (ds != null) {
-            double snapDistanceSq = Main.pref.getInteger("mappaint.segment.snap-distance", 200);
+            double snapDistanceSq = Main.pref.getInt("mappaint.segment.snap-distance", 200);
             snapDistanceSq *= snapDistanceSq;
 
-            for (Way w : ds.searchWays(getBBox(p, Main.pref.getInteger("mappaint.segment.snap-distance", 200)))) {
+            for (Way w : ds.searchWays(getBBox(p, Main.pref.getInt("mappaint.segment.snap-distance", 200)))) {
                 Node lastN = null;
                 int i = -2;
@@ -212,6 +212,6 @@
                     }
 
-                    Point2D A = Main.map.mapView.getPoint2D(lastN);
-                    Point2D B = Main.map.mapView.getPoint2D(n);
+                    Point2D A = MainApplication.getMap().mapView.getPoint2D(lastN);
+                    Point2D B = MainApplication.getMap().mapView.getPoint2D(n);
                     double c = A.distanceSq(B);
                     double a = p.distanceSq(B);
@@ -254,6 +254,6 @@
     protected NearestWaySegment getNearestWaySegment(LatLon platformCoord, StopArea stopArea)
     {
-    	
-    	Point p = Main.map.mapView.getPoint(platformCoord);
+        MapView mapView = MainApplication.getMap().mapView;
+    	Point p = mapView.getPoint(platformCoord);
     	Map<Double, List<WaySegment>> dist_waySegments = getNearestWaySegmentsImpl(p);
     	for(Map.Entry<Double, List<WaySegment>> entry : dist_waySegments.entrySet())
@@ -267,9 +267,9 @@
     		
             		EastNorth newPosition = Geometry.closestPointToSegment(n.getEastNorth(),
-              			 lastN.getEastNorth(), Projections.project(platformCoord));
-            		LatLon newNodePosition = Projections.inverseProject(newPosition);
-                	Point2D lastN2D = Main.map.mapView.getPoint2D(lastN);
-                	Point2D n2D = Main.map.mapView.getPoint2D(n);
-            		Point2D newNodePosition2D = Main.map.mapView.getPoint2D(newNodePosition);
+              			 lastN.getEastNorth(), Main.getProjection().latlon2eastNorth(platformCoord));
+            		LatLon newNodePosition = Main.getProjection().eastNorth2latlon(newPosition);
+                	Point2D lastN2D = mapView.getPoint2D(lastN);
+                	Point2D n2D = mapView.getPoint2D(n);
+            		Point2D newNodePosition2D = mapView.getPoint2D(newNodePosition);
             		Double distCurrenNodes =lastN2D.distance(n2D); 
             		if((newNodePosition2D.distance(lastN2D) < distCurrenNodes) && (newNodePosition2D.distance(n2D) < distCurrenNodes))
@@ -291,5 +291,5 @@
     protected Node createNodeOnWay(Node newStopNode, WaySegment waySegment)
     {
-    	Main.main.undoRedo.add(new AddCommand(newStopNode));
+    	Main.main.undoRedo.add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newStopNode));
     	List<Node> wayNodes = waySegment.way.getNodes();
     	wayNodes.add(waySegment.lowerIndex + 1, newStopNode); 
@@ -321,5 +321,6 @@
 		if(nearestNode != null && nearestWaySegment != null)
 		{
-			Double segmentDist = Main.map.mapView.getPoint2D(platformCoord).distanceSq(Main.map.mapView.getPoint2D(nearestWaySegment.newNode));
+		    MapView mapView = MainApplication.getMap().mapView;
+			Double segmentDist = mapView.getPoint2D(platformCoord).distanceSq(mapView.getPoint2D(nearestWaySegment.newNode));
 			Double nodeDistSq =  nearestNode.getKey();
 //			nodeDistSq *= nodeDistSq - 2;
Index: /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopPlugin.java
===================================================================
--- /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopPlugin.java	(revision 33810)
+++ /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizePublicTransportStopPlugin.java	(revision 33811)
@@ -1,5 +1,5 @@
 package ru.rodsoft.openstreetmap.josm.plugins.customizepublictransportstop;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -25,6 +25,5 @@
         super(info);
         stopAreaCreatorAction = CustomizeStopAction.createCustomizeStopAction();
-        Main.main.menu.toolsMenu.add(stopAreaCreatorAction);
-        System.out.println(getPluginDir());
+        MainApplication.getMenu().toolsMenu.add(stopAreaCreatorAction);
     }
     
Index: /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java
===================================================================
--- /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java	(revision 33810)
+++ /applications/editors/josm/plugins/CustomizePublicTransportStop/src/ru/rodsoft/openstreetmap/josm/plugins/customizepublictransportstop/CustomizeStopAreaOperation.java	(revision 33811)
@@ -19,4 +19,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
 
 /**
@@ -274,5 +275,5 @@
 			newRelation.addMember(new RelationMember("", otherMember));
 		}
-		Main.main.undoRedo.add(new AddCommand(newRelation));
+		Main.main.undoRedo.add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newRelation));
 		commands = generalTagAssign(newRelation, commands, stopArea);
 		commands = assignTag(commands, newRelation, OSMTags.TYPE_TAG, OSMTags.PUBLIC_TRANSPORT_TAG);
@@ -485,5 +486,5 @@
 				Node newNode =new Node();
 				newNode.setCoor(centerOfPlatform);
-		    	Main.main.undoRedo.add(new AddCommand(newNode));
+		    	Main.main.undoRedo.add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newNode));
 		    	Main.main.undoRedo.add(new ChangePropertyCommand(newNode, tag, tagValue));
 				commands = assignTag(commands, newNode, tag, tagValue);
