Index: /applications/editors/josm/plugins/touchscreenhelper/build.xml
===================================================================
--- /applications/editors/josm/plugins/touchscreenhelper/build.xml	(revision 33831)
+++ /applications/editors/josm/plugins/touchscreenhelper/build.xml	(revision 33832)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="JOSM/touchscreenhelper: Added T shortcut, hold T to activate temporarily"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="10580"/>
+    <property name="plugin.main.version" value="12630"/>
     <property name="plugin.author" value="glebius@glebius.int.ru"/>
     <property name="plugin.class" value="touchscreenhelper.TouchScreenHelperPlugin"/>
Index: /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/BrowseAction.java
===================================================================
--- /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/BrowseAction.java	(revision 33831)
+++ /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/BrowseAction.java	(revision 33832)
@@ -10,7 +10,7 @@
 import java.awt.event.MouseMotionListener;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.mapmode.MapMode;
 import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -22,9 +22,9 @@
     private TimedKeyReleaseListener listener;
 
-    public BrowseAction(MapFrame mapFrame) {
+    public BrowseAction() {
         super(tr("Browse"), "browse", tr("Browse map with left button"),
             Shortcut.registerShortcut("touchscreenhelper:browse", tr("Mode: {0}", tr("Browse map with left button")),
                 KeyEvent.VK_T, Shortcut.DIRECT),
-            mapFrame, Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
+            Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
         MapFrame.addMapModeChangeListener(this);
     }
@@ -37,6 +37,6 @@
     @Override public void enterMode() {
         super.enterMode();
-        Main.map.mapView.addMouseListener(this);
-        Main.map.mapView.addMouseMotionListener(this);
+        MainApplication.getMap().mapView.addMouseListener(this);
+        MainApplication.getMap().mapView.addMouseMotionListener(this);
 
         listener = new TimedKeyReleaseListener() {
@@ -45,5 +45,5 @@
                 if (evt.getKeyCode() == getShortcut().getKeyStroke().getKeyCode()) {
                     if (oldMapMode != null && !(oldMapMode instanceof BrowseAction))
-                    Main.map.selectMapMode(oldMapMode);
+                    MainApplication.getMap().selectMapMode(oldMapMode);
                 }
             }
@@ -54,6 +54,6 @@
         super.exitMode();
 
-        Main.map.mapView.removeMouseListener(this);
-        Main.map.mapView.removeMouseMotionListener(this);
+        MainApplication.getMap().mapView.removeMouseListener(this);
+        MainApplication.getMap().mapView.removeMouseMotionListener(this);
         listener.stop();
     }
@@ -69,7 +69,7 @@
         if (mousePosMove == null)
             startMovement(e);
-        EastNorth center = Main.map.mapView.getCenter();
-        EastNorth mouseCenter = Main.map.mapView.getEastNorth(e.getX(), e.getY());
-        Main.map.mapView.zoomTo(new EastNorth(
+        EastNorth center = MainApplication.getMap().mapView.getCenter();
+        EastNorth mouseCenter = MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY());
+        MainApplication.getMap().mapView.zoomTo(new EastNorth(
             mousePosMove.east() + center.east() - mouseCenter.east(),
             mousePosMove.north() + center.north() - mouseCenter.north()));
@@ -93,5 +93,5 @@
             return;
         movementInPlace = true;
-        mousePosMove = Main.map.mapView.getEastNorth(e.getX(), e.getY());
+        mousePosMove = MainApplication.getMap().mapView.getEastNorth(e.getX(), e.getY());
     }
 
Index: /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TimedKeyReleaseListener.java
===================================================================
--- /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TimedKeyReleaseListener.java	(revision 33831)
+++ /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TimedKeyReleaseListener.java	(revision 33832)
@@ -15,8 +15,8 @@
 import javax.swing.Timer;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.Logging;
 
 public class TimedKeyReleaseListener implements AWTEventListener {
-    private final TreeSet<Integer> set = new TreeSet<Integer>();
+    private final TreeSet<Integer> set = new TreeSet<>();
     private Timer timer;
     protected KeyEvent releaseEvent;
@@ -37,5 +37,5 @@
                     AWTEvent.KEY_EVENT_MASK);
         } catch (SecurityException ex) {
-            Main.error(ex);
+            Logging.error(ex);
         }
     }
@@ -67,5 +67,5 @@
             Toolkit.getDefaultToolkit().removeAWTEventListener(this);
         } catch (SecurityException ex) {
-            Main.error(ex);
+            Logging.error(ex);
         }
     }
Index: /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TouchScreenHelperPlugin.java
===================================================================
--- /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TouchScreenHelperPlugin.java	(revision 33831)
+++ /applications/editors/josm/plugins/touchscreenhelper/src/touchscreenhelper/TouchScreenHelperPlugin.java	(revision 33832)
@@ -2,5 +2,4 @@
 package touchscreenhelper;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.IconToggleButton;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -14,8 +13,7 @@
 
     @Override
-    public void mapFrameInitialized(MapFrame oldFrame,
-        MapFrame newFrame) {
+    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
         if (oldFrame == null && newFrame != null) {
-            Main.map.addMapMode(new IconToggleButton(new BrowseAction(Main.map)));
+            newFrame.addMapMode(new IconToggleButton(new BrowseAction()));
         }
     }
