Index: trunk/src/org/openstreetmap/josm/actions/MoveAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 12758)
+++ trunk/src/org/openstreetmap/josm/actions/MoveAction.java	(revision 12759)
@@ -144,5 +144,5 @@
                 ((MoveCommand) c).moveAgain(distx, disty);
             } else {
-                c = new MoveCommand(selection, distx, disty);
+                c = new MoveCommand(ds, selection, distx, disty);
                 MainApplication.undoRedo.add(c);
             }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 12758)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java	(revision 12759)
@@ -1244,5 +1244,5 @@
                 virtualCmds.add(new ChangeCommand(ds, w, wnew));
             }
-            virtualCmds.add(new MoveCommand(virtualNode, startEN, currentEN));
+            virtualCmds.add(new MoveCommand(ds, virtualNode, startEN, currentEN));
             String text = trn("Add and move a virtual new node to way",
                     "Add and move a virtual new node to {0} ways", virtualWays.size(),
Index: trunk/src/org/openstreetmap/josm/command/MoveCommand.java
===================================================================
--- trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 12758)
+++ trunk/src/org/openstreetmap/josm/command/MoveCommand.java	(revision 12759)
@@ -16,4 +16,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 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;
@@ -92,5 +93,19 @@
      */
     public MoveCommand(Collection<OsmPrimitive> objects, double x, double y) {
-        super(objects.iterator().next().getDataSet());
+        this(objects.iterator().next().getDataSet(), objects, x, y);
+    }
+
+    /**
+     * Constructs a new {@code MoveCommand} and assign the initial object set and movement vector.
+     * @param ds the dataset context for moving these primitives. Must not be null.
+     * @param objects The primitives to move. Must neither be null.
+     * @param x X difference movement. Coordinates are in northern/eastern
+     * @param y Y difference movement. Coordinates are in northern/eastern
+     * @throws NullPointerException if objects is null or contain null item
+     * @throws NoSuchElementException if objects is empty
+     * @since 12759
+     */
+    public MoveCommand(DataSet ds, Collection<OsmPrimitive> objects, double x, double y) {
+        super(ds);
         startEN = null;
         saveCheckpoint(); // (0,0) displacement will be saved
@@ -106,14 +121,38 @@
     /**
      * Constructs a new {@code MoveCommand} to move a collection of primitives.
+     * @param ds the dataset context for moving these primitives. Must not be null.
      * @param objects The primitives to move
      * @param start The starting position (northern/eastern)
      * @param end The ending position (northern/eastern)
+     * @since 12759
+     */
+    public MoveCommand(DataSet ds, Collection<OsmPrimitive> objects, EastNorth start, EastNorth end) {
+        this(Objects.requireNonNull(ds, "ds"),
+             Objects.requireNonNull(objects, "objects"),
+             Objects.requireNonNull(end, "end").getX() - Objects.requireNonNull(start, "start").getX(),
+             Objects.requireNonNull(end, "end").getY() - Objects.requireNonNull(start, "start").getY());
+        startEN = start;
+    }
+
+    /**
+     * Constructs a new {@code MoveCommand} to move a collection of primitives.
+     * @param objects The primitives to move
+     * @param start The starting position (northern/eastern)
+     * @param end The ending position (northern/eastern)
      */
     public MoveCommand(Collection<OsmPrimitive> objects, EastNorth start, EastNorth end) {
-        this(
-                Objects.requireNonNull(objects, "objects"),
-                Objects.requireNonNull(end, "end").getX() - Objects.requireNonNull(start, "start").getX(),
-                Objects.requireNonNull(end, "end").getY() - Objects.requireNonNull(start, "start").getY());
-        startEN = start;
+        this(Objects.requireNonNull(objects, "objects").iterator().next().getDataSet(), objects, start, end);
+    }
+
+    /**
+     * Constructs a new {@code MoveCommand} to move a primitive.
+     * @param ds the dataset context for moving these primitives. Must not be null.
+     * @param p The primitive to move
+     * @param start The starting position (northern/eastern)
+     * @param end The ending position (northern/eastern)
+     * @since 12759
+     */
+    public MoveCommand(DataSet ds, OsmPrimitive p, EastNorth start, EastNorth end) {
+        this(ds, Collections.singleton(Objects.requireNonNull(p, "p")), start, end);
     }
 
@@ -125,9 +164,5 @@
      */
     public MoveCommand(OsmPrimitive p, EastNorth start, EastNorth end) {
-        this(
-                Collections.singleton(Objects.requireNonNull(p, "p")),
-                Objects.requireNonNull(end, "end").getX() - Objects.requireNonNull(start, "start").getX(),
-                Objects.requireNonNull(end, "end").getY() - Objects.requireNonNull(start, "start").getY());
-        startEN = start;
+        this(Collections.singleton(Objects.requireNonNull(p, "p")), start, end);
     }
 
