Index: applications/editors/josm/plugins/utilsplugin2/build.xml
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/build.xml	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/build.xml	(revision 30177)
@@ -3,5 +3,5 @@
 
     <!-- enter the SVN commit message -->
-    <property name="commit.message" value="[josm_utilsplugin2]: pasting tags is in core long ago. Please update you ancient JOSM :)"/>
+    <property name="commit.message" value="[josm_utilsplugin2]: Use notifications instead of MessageBoxes"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="6317"/>
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AddIntersectionsAction.java	(revision 30177)
@@ -23,4 +23,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.tools.Geometry;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -39,10 +40,8 @@
         List<Way> ways = OsmPrimitive.getFilteredList(getCurrentDataSet().getSelected(), Way.class);
         if (ways.isEmpty()) {
-            JOptionPane.showMessageDialog(
-                    Main.parent,
-                    tr("Please select one or more ways with intersections of segments."),
-                    tr("Information"),
-                    JOptionPane.INFORMATION_MESSAGE
-            );
+            new Notification(
+               tr("Please select one or more ways with intersections of segments."))
+               .setIcon(JOptionPane.INFORMATION_MESSAGE) 
+               .show();
             return;
         }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/AlignWayNodesAction.java	(revision 30177)
@@ -10,4 +10,5 @@
 import javax.swing.JOptionPane;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.Notification;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -36,5 +37,6 @@
         Way way = ways.iterator().next();
         if( way.getNodesCount() < (way.isClosed() ? 4 : 3) ) {
-            JOptionPane.showMessageDialog(Main.parent, tr("The way with selected nodes can not be straightened."), TITLE, JOptionPane.ERROR_MESSAGE);
+            new Notification(tr("The way with selected nodes can not be straightened."))
+                    .setIcon(JOptionPane.ERROR_MESSAGE).show();
             return;
         }
@@ -66,6 +68,6 @@
 
         if( nodes.size() < 3 ) {
-            JOptionPane.showMessageDialog(Main.parent, tr("Internal error: number of nodes is {0}.", nodes.size()),
-                    TITLE, JOptionPane.ERROR_MESSAGE);
+            new Notification(tr("Internal error: number of nodes is {0}.", nodes.size()))
+                .setIcon(JOptionPane.ERROR_MESSAGE).show();
             return;
         }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/ExtractPointAction.java	(revision 30177)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
 
 import org.openstreetmap.josm.tools.Shortcut;
@@ -37,11 +38,11 @@
     }
 
+    @Override
     public void actionPerformed(ActionEvent e) {
         Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
         List<Node> selectedNodes = OsmPrimitive.getFilteredList(selection, Node.class);
         if (selectedNodes.size()!=1) {
-             JOptionPane.showMessageDialog(Main.parent,
-                    tr("This tool extracts node from its ways and requires single node to be selected."),
-                    tr("Extract node"), JOptionPane.INFORMATION_MESSAGE);
+            new Notification(tr("This tool extracts node from its ways and requires single node to be selected."))
+                .setIcon(JOptionPane.WARNING_MESSAGE).show();
             return;
         }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitObjectAction.java	(revision 30177)
@@ -25,4 +25,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.Notification;
+
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -63,10 +65,5 @@
 
         if (!checkSelection(selection)) {
-            JOptionPane.showMessageDialog(
-                    Main.parent,
-                    tr("The current selection cannot be used for splitting."),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE
-            );
+            showWarningNotification(tr("The current selection cannot be used for splitting."));
             return;
         }
@@ -118,10 +115,8 @@
             }
             if (wayOccurenceCounter.isEmpty()) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        trn("The selected node is not in the middle of any way.",
-                                "The selected nodes are not in the middle of any way.",
-                                selectedNodes.size()),
-                                tr("Warning"),
-                                JOptionPane.WARNING_MESSAGE);
+                showWarningNotification(
+                   trn("The selected node is not in the middle of any way.",
+                       "The selected nodes are not in the middle of any way.",
+                        selectedNodes.size()));
                 return;
             }
@@ -130,10 +125,9 @@
                 if (entry.getValue().equals(selectedNodes.size())) {
                     if (selectedWay != null) {
-                        JOptionPane.showMessageDialog(Main.parent,
-                                trn("There is more than one way using the node you selected. Please select the way also.",
-                                        "There is more than one way using the nodes you selected. Please select the way also.",
-                                        selectedNodes.size()),
-                                        tr("Warning"),
-                                        JOptionPane.WARNING_MESSAGE);
+                        showWarningNotification(
+                            trn("There is more than one way using the node you selected. Please select the way also.",
+                                    "There is more than one way using the nodes you selected. Please select the way also.",
+                                    selectedNodes.size())
+                            );
                         return;
                     }
@@ -143,8 +137,5 @@
 
             if (selectedWay == null) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        tr("The selected nodes do not share the same way."),
-                        tr("Warning"),
-                        JOptionPane.WARNING_MESSAGE);
+                showWarningNotification(tr("The selected nodes do not share the same way."));
                 return;
             }
@@ -154,8 +145,5 @@
         } else if (selectedWay != null && !selectedNodes.isEmpty()) {
             if (!selectedWay.isClosed()) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        tr("The selected way is not closed."),
-                        tr("Warning"),
-                        JOptionPane.WARNING_MESSAGE);
+                showWarningNotification(tr("The selected way is not closed."));
                 return;
             }
@@ -163,17 +151,13 @@
             nds.removeAll(selectedWay.getNodes());
             if (!nds.isEmpty()) {
-                JOptionPane.showMessageDialog(Main.parent,
-                        trn("The selected way does not contain the selected node.",
-                                "The selected way does not contain all the selected nodes.",
-                                selectedNodes.size()),
-                                tr("Warning"),
-                                JOptionPane.WARNING_MESSAGE);
+                showWarningNotification(
+                    trn("The selected way does not contain the selected node.",
+                            "The selected way does not contain all the selected nodes.",
+                            selectedNodes.size()));
                 return;
             }
         } else if (selectedWay != null && selectedNodes.isEmpty()) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    tr("The selected way is not a split way, please select split points or split way too."),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE);
+            showWarningNotification(
+                tr("The selected way is not a split way, please select split points or split way too."));
             return;
         }
@@ -200,8 +184,6 @@
                 (nodeIndex1 == 0 && nodeIndex2 == selectedWay.getNodesCount() - 2) ||
                 (nodeIndex2 == 0 && nodeIndex1 == selectedWay.getNodesCount() - 2)) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    tr("The selected nodes can not be consecutive nodes in the object."),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE);
+            showWarningNotification(
+                tr("The selected nodes can not be consecutive nodes in the object."));
             return;
         }
@@ -278,3 +260,8 @@
         setEnabled(checkSelection(selection));
     }
+    
+    void showWarningNotification(String msg) {
+        new Notification(msg)
+            .setIcon(JOptionPane.WARNING_MESSAGE).show();
+    }
 }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SplitOnIntersectionsAction.java	(revision 30177)
@@ -13,4 +13,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.Notification;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -65,9 +66,7 @@
                     }
                 } else if( refs.size() > 1 ) {
-                    JOptionPane.showMessageDialog(
-                            Main.parent,
-                            tr("There are several ways containing one of the splitting nodes. Select ways participating in this operation."),
-                            tr("Warning"),
-                            JOptionPane.WARNING_MESSAGE);
+                    new Notification(
+                        tr("There are several ways containing one of the splitting nodes. Select ways participating in this operation.")
+                        ).setIcon(JOptionPane.WARNING_MESSAGE).show();  
                     return;
                 }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/actions/SymmetryAction.java	(revision 30177)
@@ -22,4 +22,6 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.Notification;
+
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -60,10 +62,7 @@
         
         if (p1==null || p2==null || nodes.size() < 1) {
-            JOptionPane.showMessageDialog(
-                    Main.parent,
-                    tr("Please select at least two nodes for symmetry axis and something else to mirror."),
-                    tr("Information"),
-                    JOptionPane.INFORMATION_MESSAGE
-            );
+            new Notification(
+                    tr("Please select at least two nodes for symmetry axis and something else to mirror.")
+                ).setIcon(JOptionPane.WARNING_MESSAGE).show();  
             return;
         }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryAction.java	(revision 30177)
@@ -10,4 +10,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.Notification;
 import static org.openstreetmap.josm.tools.I18n.tr;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -36,7 +37,7 @@
         List<OsmPrimitive> selection = new ArrayList<OsmPrimitive>(getCurrentDataSet().getSelected());
         if (selection.size() != 2) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    tr("This tool replaces geometry of one object with another, and so requires exactly two objects to be selected."),
-                    TITLE, JOptionPane.INFORMATION_MESSAGE);
+            new Notification(
+                    tr("This tool replaces geometry of one object with another, and so requires exactly two objects to be selected.")
+                ).setIcon(JOptionPane.WARNING_MESSAGE).show();  
             return;
         }
@@ -55,9 +56,11 @@
             Main.main.undoRedo.add(replaceCommand);
         } catch (IllegalArgumentException ex) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    ex.getMessage(), TITLE, JOptionPane.INFORMATION_MESSAGE);
+            new Notification(
+                ex.getMessage()
+            ).setIcon(JOptionPane.WARNING_MESSAGE).show(); 
         } catch (ReplaceGeometryException ex) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    ex.getMessage(), TITLE, JOptionPane.INFORMATION_MESSAGE);
+            new Notification(
+                ex.getMessage()
+            ).setIcon(JOptionPane.WARNING_MESSAGE).show(); 
         }
     }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/replacegeometry/ReplaceGeometryUtils.java	(revision 30177)
@@ -37,4 +37,6 @@
 
 import edu.princeton.cs.algs4.AssignmentProblem;
+import org.openstreetmap.josm.gui.Notification;
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 /**
@@ -317,7 +319,7 @@
                 catch (Exception e) {
                     useRobust = false;
-                    JOptionPane.showMessageDialog(Main.parent,
-                            tr("Exceeded iteration limit for robust method, using simpler method."),
-                            TITLE, JOptionPane.WARNING_MESSAGE);
+                    new Notification(
+                        tr("Exceeded iteration limit for robust method, using simpler method.")
+                    ).setIcon(JOptionPane.WARNING_MESSAGE).show();     
                     nodeAssoc = new HashMap<Node, Node>();
                 }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysAction.java	(revision 30177)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
 
 import org.openstreetmap.josm.tools.Shortcut;
@@ -42,7 +43,7 @@
             return;
         } else {
-             JOptionPane.showMessageDialog(Main.parent,
-               tr("Please select some ways to find connected and intersecting ways!"),
-               tr("Warning"), JOptionPane.WARNING_MESSAGE);
+             new Notification(
+               tr("Please select some ways to find connected and intersecting ways!")
+               ).setIcon(JOptionPane.WARNING_MESSAGE).show();
         }
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/IntersectedWaysRecursiveAction.java	(revision 30177)
@@ -14,4 +14,6 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
+import static org.openstreetmap.josm.tools.I18n.tr;
 
 import org.openstreetmap.josm.tools.Shortcut;
@@ -42,7 +44,7 @@
             getCurrentDataSet().addSelected(newWays);
         } else {
-             JOptionPane.showMessageDialog(Main.parent,
-               tr("Please select some ways to find all connected and intersecting ways!"),
-               tr("Warning"), JOptionPane.WARNING_MESSAGE);
+              new Notification(
+                tr("Please select some ways to find all connected and intersecting ways!")
+                ).setIcon(JOptionPane.WARNING_MESSAGE).show();
         }
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/MiddleNodesAction.java	(revision 30177)
@@ -14,4 +14,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
 
 import org.openstreetmap.josm.tools.Shortcut;
@@ -38,8 +39,7 @@
         // if no 2 nodes and no ways are selected, do nothing
         if (selectedNodes.size() != 2) {
-            JOptionPane.showMessageDialog(Main.parent,
-                    tr("Please select two nodes connected by way!"),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE);
+            new Notification(
+                tr("Please select two nodes connected by way!")
+            ).setIcon(JOptionPane.WARNING_MESSAGE).show();
             return;
         }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/NodeWayUtils.java	(revision 30177)
@@ -18,8 +18,9 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.Notification;
 import org.openstreetmap.josm.tools.Geometry;
+import static org.openstreetmap.josm.tools.I18n.tr;
 import org.openstreetmap.josm.tools.Pair;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 
@@ -199,8 +200,7 @@
 //                 System.out.printf("%d: %d ways added to selection intersectiong\n",level,c);
                  if (c>maxWays1) {
-                       JOptionPane.showMessageDialog(Main.parent,
-                                tr("Too many ways are added: {0}!",c),
-                                        tr("Warning"),
-                                        JOptionPane.WARNING_MESSAGE);
+                        new Notification(
+                            tr("Too many ways are added: {0}!",c)
+                            ).setIcon(JOptionPane.WARNING_MESSAGE).show();  
                        return;
                  }
@@ -224,8 +224,7 @@
 //                 System.out.printf("%d: %d ways added to selection\n",level,c);
                  if (c>maxWays) {
-                       JOptionPane.showMessageDialog(Main.parent,
-                                tr("Too many ways are added: {0}!",c),
-                                        tr("Warning"),
-                                        JOptionPane.WARNING_MESSAGE);
+                        new Notification(
+                            tr("Too many ways are added: {0}!",c)
+                            ).setIcon(JOptionPane.WARNING_MESSAGE).show();                       
                        return;
                  }
@@ -267,8 +266,7 @@
         }
         if (newNodes.isEmpty()) {
-                JOptionPane.showMessageDialog(Main.parent,
-                    tr("Please select two nodes connected by way!"),
-                    tr("Warning"),
-                    JOptionPane.WARNING_MESSAGE);
+                new Notification(
+                    tr("Please select two nodes connected by way!")
+                ).setIcon(JOptionPane.WARNING_MESSAGE).show();  
             }
     }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectAllInsideAction.java	(revision 30177)
@@ -14,4 +14,6 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
+
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -35,7 +37,8 @@
             getCurrentDataSet().addSelected(insideSelected);
         } else{
-        JOptionPane.showMessageDialog(Main.parent,
-               tr("Nothing found. Please select some closed ways or multipolygons to find all primitives inside them!"),
-               tr("Warning"), JOptionPane.WARNING_MESSAGE);
+            new Notification(
+                tr("Nothing found. Please select some closed ways or multipolygons to find all primitives inside them!"))
+                .setIcon(JOptionPane.WARNING_MESSAGE)
+                .show();  
         }
     }
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectBoundaryAction.java	(revision 30177)
@@ -22,4 +22,6 @@
 import org.openstreetmap.josm.data.osm.Relation;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.Notification;
+
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -42,18 +44,10 @@
         Set<Way> selectedWays = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Way.class);
         Set<Node> selectedNodes = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Node.class);
-        Set<Relation> selectedRelations = OsmPrimitive.getFilteredSet(getCurrentDataSet().getSelected(), Relation.class);
         
         Set<Way> newWays = new HashSet<Way>();
         
         Way w=null;
-        Relation selectedRelation=null;
         
-        if (selectedRelations.size()==1) {
-            selectedRelation = selectedRelations.iterator().next();
-            if (selectedRelation.getMemberPrimitives().contains(lastUsedStartingWay)) {
-                w=lastUsedStartingWay; 
-                // repeated call for selected relation
-            }
-        } else if (selectedWays.isEmpty()) {
+        if (selectedWays.isEmpty()) {
             if (selectedNodes.size()==1 ) {
                 for (OsmPrimitive p : selectedNodes.iterator().next().getReferrers()) {
@@ -81,26 +75,5 @@
         lastUsedStartingWay = w;
         
-        List<Relation> rels=new ArrayList<Relation>();
-        for (OsmPrimitive p : w.getReferrers()) {
-            if (p instanceof Relation && p.isSelectable()) {
-                rels.add((Relation) p);
-            }
-        }
-        if (selectedRelation!=null) {
-            int idx = rels.indexOf(selectedRelation); 
-            // selectedRelation has number idx in active relation list
-            if (idx>=0) {
-               // select next relation
-               if (idx+1<rels.size())
-                   getCurrentDataSet().setSelected(Arrays.asList(rels.get(idx+1)));
-               else 
-                   getCurrentDataSet().setSelected(Arrays.asList(rels.get(0))); 
-               return;
-            }
-        } else if (rels.size()>0) {
-               getCurrentDataSet().setSelected(Arrays.asList(rels.get(0)));
-               return;
-        }
-        
+                       
         // try going left at each turn
         if (! NodeWayUtils.addAreaBoundary(w, newWays, lastUsedLeft) ) {
@@ -111,8 +84,8 @@
             getCurrentDataSet().setSelected(newWays);
         } else{
-        JOptionPane.showMessageDialog(Main.parent,
-               tr("Nothing found. Please select way that is a part of some polygon formed by connected ways"),
-               tr("Warning"), JOptionPane.WARNING_MESSAGE);
-        }
+        new Notification(
+            tr("Nothing found. Please select way that is a part of some polygon formed by connected ways")
+            ).setIcon(JOptionPane.WARNING_MESSAGE).show();            
+    }
     }
 
Index: applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java
===================================================================
--- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30017)
+++ applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/selection/SelectHighwayAction.java	(revision 30177)
@@ -11,4 +11,6 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.*;
+import org.openstreetmap.josm.gui.Notification;
+import static org.openstreetmap.josm.tools.I18n.tr;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -36,5 +38,7 @@
             getCurrentDataSet().setSelected(selectHighwayBetween(selectedWays.get(0), selectedWays.get(1)));
         } else {
-            JOptionPane.showMessageDialog(Main.parent, tr("Please select one or two ways for this action"), "Select Highway", JOptionPane.ERROR_MESSAGE);
+            new Notification(
+                tr("Please select one or two ways for this action")
+            ).setIcon(JOptionPane.WARNING_MESSAGE).show();
         }
     }
