Index: applications/editors/josm/plugins/Create_grid_of_ways/build.xml
===================================================================
--- applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 34498)
+++ applications/editors/josm/plugins/Create_grid_of_ways/build.xml	(revision 34499)
@@ -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="12630"/>
+    <property name="plugin.main.version" value="14153"/>
 
     <!-- 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 34498)
+++ applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java	(revision 34499)
@@ -11,9 +11,9 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -54,5 +54,5 @@
         Collection<Node> nodesWay2 = new LinkedList<>();
         if ((sel.size() != 2) || !(sel.toArray()[0] instanceof Way) || !(sel.toArray()[1] instanceof Way)) {
-            JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with a node in common"));
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Select two ways with a node in common"));
             return;
         }
@@ -64,5 +64,5 @@
                 if (n.equals(m)) {
                     if ( nodeCommon != null ) {
-                        JOptionPane.showMessageDialog(Main.parent, tr("Select two ways with alone a node in common"));
+                        JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Select two ways with alone a node in common"));
                         return;
                     }
@@ -105,5 +105,5 @@
         for (int c=0;c<w2.length;c++)
             cmds.add(new AddCommand(ds, w2[c]));
-        Main.main.undoRedo.add(new SequenceCommand(tr("Create a grid of ways"), cmds));
+        UndoRedoHandler.getInstance().add(new SequenceCommand(tr("Create a grid of ways"), cmds));
         MainApplication.getMap().repaint();
     }
