Index: applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java	(revision 27936)
+++ applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java	(revision 27937)
@@ -63,13 +63,13 @@
          
     }
-    public void replace(OsmPrimitive firstObject, OsmPrimitive secondObject) {
+    public boolean replace(OsmPrimitive firstObject, OsmPrimitive secondObject) {
         if (firstObject instanceof Way && secondObject instanceof Way) {
-            replaceWayWithWay(Arrays.asList((Way) firstObject, (Way) secondObject));
+            return replaceWayWithWay(Arrays.asList((Way) firstObject, (Way) secondObject));
         } else if (firstObject instanceof Node && secondObject instanceof Node) {
             throw new IllegalArgumentException(tr("To replace a node with a node, use the node merge tool."));
         } else if (firstObject instanceof Node) {
-            replaceNode((Node) firstObject, secondObject);
+            return replaceNode((Node) firstObject, secondObject);
         } else if (secondObject instanceof Node) {
-            replaceNode((Node) secondObject, firstObject);
+            return replaceNode((Node) secondObject, firstObject);
         } else {
             throw new IllegalArgumentException(tr("This tool can only replace a node with a way, a node with a multipolygon, or a way with a way."));
@@ -83,9 +83,9 @@
      * @param target
      */
-    public void replaceNode(Node node, OsmPrimitive target) {
+    public boolean replaceNode(Node node, OsmPrimitive target) {
         if (!OsmPrimitive.getFilteredList(node.getReferrers(), Way.class).isEmpty()) {
             JOptionPane.showMessageDialog(Main.parent, tr("Node belongs to way(s), cannot replace."),
                     TITLE, JOptionPane.INFORMATION_MESSAGE);
-            return;
+            return false;
         }
 
@@ -93,5 +93,5 @@
             JOptionPane.showMessageDialog(Main.parent, tr("Relation is not a multipolygon, cannot be used as a replacement."),
                     TITLE, JOptionPane.INFORMATION_MESSAGE);
-            return;
+            return false;
         }
 
@@ -125,5 +125,5 @@
         if (tagResolutionCommands == null) {
             // user canceled tag merge dialog
-            return;
+            return false;
         }
         commands.addAll(tagResolutionCommands);
@@ -161,7 +161,8 @@
                 tr("Replace geometry for node {0}", node.getDisplayName(DefaultNameFormatter.getInstance())),
                 commands));
-    }
-    
-    public void replaceWayWithWay(List<Way> selection) {
+        return true;
+    }
+    
+    public boolean replaceWayWithWay(List<Way> selection) {
         // determine which way will be replaced and which will provide the geometry
         boolean overrideNewCheck = false;
@@ -190,5 +191,5 @@
                     tr("Please select one way that exists in the database and one new way with correct geometry."),
                     TITLE, JOptionPane.WARNING_MESSAGE);
-            return;
+            return false;
         }
 
@@ -198,5 +199,5 @@
                     tr("The ways must be entirely within the downloaded area."),
                     TITLE, JOptionPane.WARNING_MESSAGE);
-            return;
+            return false;
         }
         
@@ -205,5 +206,5 @@
                     tr("The way to be replaced cannot have any nodes with properties or relation memberships unless they belong to both ways."),
                     TITLE, JOptionPane.WARNING_MESSAGE);
-            return;
+            return false;
         }
 
@@ -214,5 +215,5 @@
         if (tagResolutionCommands == null) {
             // user canceled tag merge dialog
-            return;
+            return false;
         }
         commands.addAll(tagResolutionCommands);
@@ -273,4 +274,5 @@
                 tr("Replace geometry for way {0}", way.getDisplayName(DefaultNameFormatter.getInstance())),
                 commands));
+        return true;
     }
 
