Index: trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 5525)
+++ trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 5526)
@@ -100,19 +100,19 @@
      *            won't be assigned a shortcut unless the user configures one. If you pass null here,
      *            the user CANNOT configure a shortcut for your action.
-     * @param register register this action for the toolbar preferences?
+     * @param registerInToolbar register this action for the toolbar preferences?
      * @param toolbarId identifier for the toolbar preferences. The iconName is used, if this parameter is null
      * @param installAdapters false, if you don't want to install layer changed and selection changed adapters
      */
-    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, String toolbarId, boolean installAdapters) {
-        this(name, iconName == null ? null : ImageProvider.get(iconName), tooltip, shortcut, register,
+    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar, String toolbarId, boolean installAdapters) {
+        this(name, iconName == null ? null : ImageProvider.get(iconName), tooltip, shortcut, registerInToolbar,
                 toolbarId == null ? iconName : toolbarId, installAdapters);
     }
 
-    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register, boolean installAdapters) {
-        this(name, iconName, tooltip, shortcut, register, null, installAdapters);
-    }
-
-    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean register) {
-        this(name, iconName, tooltip, shortcut, register, null, true);
+    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar, boolean installAdapters) {
+        this(name, iconName, tooltip, shortcut, registerInToolbar, null, installAdapters);
+    }
+
+    public JosmAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) {
+        this(name, iconName, tooltip, shortcut, registerInToolbar, null, true);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/ValidateAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 5525)
+++ trunk/src/org/openstreetmap/josm/actions/ValidateAction.java	(revision 5526)
@@ -101,4 +101,10 @@
     }
 
+    @Override
+    public void destroy() {
+        // Hack - this action should stay forever because it could be added to toolbar
+        // Do not call super.destroy() here
+    }
+
     /**
      * Asynchronous task for running a collection of tests against a collection
Index: trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 5525)
+++ trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java	(revision 5526)
@@ -22,4 +22,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.ValidateAction;
 import org.openstreetmap.josm.data.projection.Epsg4326;
 import org.openstreetmap.josm.data.projection.Lambert;
@@ -67,4 +68,7 @@
     public static ValidatorLayer errorLayer = null;
 
+    /** The validate action */
+    public ValidateAction validateAction = new ValidateAction();
+
     /** Grid detail, multiplier of east,north values for valuable cell sizing */
     public static double griddetail;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 5525)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/ValidatorDialog.java	(revision 5526)
@@ -33,5 +33,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.AutoScaleAction;
-import org.openstreetmap.josm.actions.ValidateAction;
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.SelectionChangedListener;
@@ -130,5 +129,5 @@
         buttons.add(selectButton);
 
-        buttons.add(new SideButton(new ValidateAction()));
+        buttons.add(new SideButton(Main.main.validator.validateAction));
 
         fixButton = new SideButton(new AbstractAction() {
