Index: applications/editors/josm/plugins/Create_grid_of_ways/build.xml
===================================================================
--- applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 33855)
+++ applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 33856)
@@ -4,5 +4,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="10580"/>
+    <property name="plugin.main.version" value="12630"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java
===================================================================
--- applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 33855)
+++ applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 33856)
@@ -16,7 +16,9 @@
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -46,5 +48,6 @@
     @Override
     public void actionPerformed(ActionEvent e) {
-        Collection<OsmPrimitive> sel = Main.getLayerManager().getEditDataSet().getSelected();
+        DataSet ds = getLayerManager().getEditDataSet();
+        Collection<OsmPrimitive> sel = ds.getSelected();
         Collection<Node> nodesWay1 = new LinkedList<>();
         Collection<Node> nodesWay2 = new LinkedList<>();
@@ -90,5 +93,5 @@
                 }
                 Node nodeOfGrid = new Node(new LatLon(n2.getCoor().lat()+latDif,n2.getCoor().lon()+lonDif));
-                cmds.add(new AddCommand(nodeOfGrid));
+                cmds.add(new AddCommand(ds, nodeOfGrid));
                 w1[c1].addNode(nodeOfGrid);
                 w2[c2++].addNode(nodeOfGrid);
@@ -98,9 +101,9 @@
         }
         for (int c=0;c<w1.length;c++)
-            cmds.add(new AddCommand(w1[c]));
+            cmds.add(new AddCommand(ds, w1[c]));
         for (int c=0;c<w2.length;c++)
-            cmds.add(new AddCommand(w2[c]));
+            cmds.add(new AddCommand(ds, w2[c]));
         Main.main.undoRedo.add(new SequenceCommand(tr("Create a grid of ways"), cmds));
-        Main.map.repaint();
+        MainApplication.getMap().repaint();
     }
 }
Index: applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java
===================================================================
--- applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java	(revision 33855)
+++ applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java	(revision 33856)
@@ -1,13 +1,13 @@
 package CreateGridOfWaysPlugin;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
-import org.openstreetmap.josm.gui.MainMenu;
 
 public class CreateGridOfWaysPlugin extends Plugin {
     public CreateGridOfWaysPlugin(PluginInformation info) {
         super(info);
-        MainMenu.add(Main.main.menu.moreToolsMenu, new CreateGridOfWaysAction());
+        MainMenu.add(MainApplication.getMenu().moreToolsMenu, new CreateGridOfWaysAction());
     }
 }
