Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorTreePanel.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorTreePanel.java	(revision 10494)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ErrorTreePanel.java	(revision 10502)
@@ -1,5 +1,12 @@
 package org.openstreetmap.josm.plugins.validator;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.Map;
 import java.util.Map.Entry;
 
@@ -8,5 +15,8 @@
 import javax.swing.JTree;
 import javax.swing.ToolTipManager;
-import javax.swing.tree.*;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.DefaultTreeModel;
+import javax.swing.tree.TreePath;
+import javax.swing.tree.TreeSelectionModel;
 
 import org.openstreetmap.josm.plugins.validator.util.Bag;
@@ -125,6 +135,8 @@
 		}
 
-		Map<Severity, Bag<String, TestError>> errorTree = new HashMap<Severity, Bag<String, TestError>>();
-		Map<Severity, HashMap<String, Bag<String, TestError>>> errorTreeDeep = new HashMap<Severity, HashMap<String, Bag<String, TestError>>>();
+		Map<Severity, Bag<String, TestError>> errorTree
+		= new HashMap<Severity, Bag<String, TestError>>();
+		Map<Severity, HashMap<String, Bag<String, TestError>>> errorTreeDeep
+		= new HashMap<Severity, HashMap<String, Bag<String, TestError>>>();
 		for(Severity s : Severity.values())
 		{
@@ -135,4 +147,6 @@
 		for(TestError e : errors)
 		{
+			if(e.getIgnored())
+				continue;
 			Severity s = e.getSeverity();
 			String d = e.getDescription();
@@ -176,5 +190,8 @@
 
 				if( oldSelectedRows.contains(msgErrors.getKey()))
-					 expandedPaths.add( new TreePath( new Object[] {rootNode, severityNode, messageNode} ) );
+				{
+					 expandedPaths.add( new TreePath( new Object[]
+					 {rootNode, severityNode, messageNode} ) );
+				}
 
 				for (TestError error : errors) 
@@ -189,10 +206,16 @@
 				// Group node
 				Bag <String, TestError> errorlist = bag.getValue();
-				String nmsg = bag.getKey() + " (" + errorlist.size() + ")";
-				DefaultMutableTreeNode groupNode = new DefaultMutableTreeNode(nmsg);
-				severityNode.add(groupNode);
-
-				if( oldSelectedRows.contains(bag.getKey()))
-					 expandedPaths.add( new TreePath( new Object[] {rootNode, severityNode, groupNode} ) );
+				DefaultMutableTreeNode groupNode = null;
+				if(errorlist.size() > 1)
+				{
+					String nmsg = bag.getKey() + " (" + errorlist.size() + ")";
+					groupNode = new DefaultMutableTreeNode(nmsg);
+					severityNode.add(groupNode);
+					if( oldSelectedRows.contains(bag.getKey()))
+					{
+						 expandedPaths.add( new TreePath( new Object[]
+						 {rootNode, severityNode, groupNode} ) );
+					}
+				}
 
 				for(Entry<String, List<TestError>> msgErrors : errorlist.entrySet())
@@ -202,8 +225,22 @@
 					String msg = msgErrors.getKey() + " (" + errors.size() + ")";
 					DefaultMutableTreeNode messageNode = new DefaultMutableTreeNode(msg);
-					groupNode.add(messageNode);
+					if(groupNode != null)
+						groupNode.add(messageNode);
+					else
+						severityNode.add(messageNode);
 
 					if( oldSelectedRows.contains(msgErrors.getKey()))
-						 expandedPaths.add( new TreePath( new Object[] {rootNode, severityNode, groupNode, messageNode} ) );
+					{
+						if(groupNode != null)
+						{
+							expandedPaths.add(new TreePath(new Object[]
+							{rootNode, severityNode, groupNode, messageNode}));
+						}
+						else
+						{
+							expandedPaths.add(new TreePath(new Object[]
+							{rootNode, severityNode, messageNode}));
+						}
+					}
 
 					for (TestError error : errors) 
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 10494)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java	(revision 10502)
@@ -4,5 +4,18 @@
 
 import java.lang.reflect.InvocationTargetException;
-import java.util.*;
+import java.io.BufferedReader;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -38,4 +51,6 @@
 	/** The list of errors per layer*/
 	Map<Layer, List<TestError>> layerErrors = new HashMap<Layer, List<TestError>>();
+
+	public Collection<String> ignoredErrors = new TreeSet<String>();
 
 	/**
@@ -66,4 +81,33 @@
 	{
 		initializeTests( getTests() );
+		loadIgnoredErrors();
+	}
+
+	private void loadIgnoredErrors() {
+		ignoredErrors.clear();
+		if(Main.pref.getBoolean(PreferenceEditor.PREF_USE_IGNORE, true))
+		{
+			try {
+				final BufferedReader in = new BufferedReader(new FileReader(Util.getPluginDir() + "ignorederrors"));
+				for (String line = in.readLine(); line != null; line = in.readLine()) {
+					ignoredErrors.add(line);
+				}
+			}
+			catch (final FileNotFoundException e) {}
+			catch (final IOException e) {
+				e.printStackTrace();
+			}
+		}
+	}
+
+	public void saveIgnoredErrors() {
+		try {
+			final PrintWriter out = new PrintWriter(new FileWriter(Util.getPluginDir() + "ignorederrors"), false);
+			for (String e : ignoredErrors)
+				out.println(e);
+			out.close();
+		} catch (final IOException e) {
+			e.printStackTrace();
+		}
 	}
 
@@ -102,5 +146,5 @@
 		}
 		if( newFrame != null )
-			hooks.add( 0, new ValidateUploadHook() );
+			hooks.add( 0, new ValidateUploadHook(this) );
 	}
 
@@ -183,5 +227,6 @@
 				if( test.enabled )
 				{
-					test.getClass().getMethod("initialize", new Class[] { OSMValidatorPlugin.class} ).invoke(null, new Object[] {this});
+					test.getClass().getMethod("initialize", new Class[]
+					{ OSMValidatorPlugin.class} ).invoke(null, new Object[] {this});
 				}
 			}
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java	(revision 10494)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateAction.java	(revision 10502)
@@ -20,22 +20,23 @@
  * This action iterates through all active tests and give them the data, so that
  * each one can test it.
- * 
+ *
  * @author frsantos
  */
-public class ValidateAction extends JosmAction 
+public class ValidateAction extends JosmAction
 {
 	private OSMValidatorPlugin plugin;
 
 	/** Serializable ID */
-    private static final long serialVersionUID = -2304521273582574603L;
+	private static final long serialVersionUID = -2304521273582574603L;
 
 	/** Last selection used to validate */
 	private Collection<OsmPrimitive> lastSelection;
-	
-    /**
+
+	/**
 	 * Constructor
 	 */
 	public ValidateAction(OSMValidatorPlugin plugin) {
-		super(tr("Validation"), "validator", tr("Performs the data validation"), KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK + KeyEvent.ALT_MASK, true);
+		super(tr("Validation"), "validator", tr("Performs the data validation"),
+		KeyEvent.VK_V, KeyEvent.CTRL_DOWN_MASK + KeyEvent.ALT_MASK, true);
 		this.plugin = plugin;
 	}
@@ -45,5 +46,5 @@
 		doValidate(ev, true);
 	}
-	
+
 	/**
 	 * Does the validation.
@@ -52,5 +53,5 @@
 	 * is selected) are validated. If it is false, last selected items are
 	 * revalidated
-	 * 
+	 *
 	 * @param ev The event
 	 * @param getSelectedItems If selected or last selected items must be validated
@@ -58,11 +59,11 @@
 	public void doValidate(@SuppressWarnings("unused") ActionEvent ev, boolean getSelectedItems)
 	{
-        if( plugin.validateAction == null || Main.map == null || !Main.map.isVisible() )
-            return;
-        
+		if( plugin.validateAction == null || Main.map == null || !Main.map.isVisible() )
+			return;
+
 		Collection<Test> tests = OSMValidatorPlugin.getEnabledTests(false);
 		if( tests.isEmpty() )
 			return;
-		
+
 		Collection<OsmPrimitive> selection;
 		if( getSelectedItems )
@@ -109,5 +110,5 @@
 				for(String state : s)
 				{
-					if(state != null && plugin.validationDialog.ignoredErrors.contains(state))
+					if(state != null && plugin.ignoredErrors.contains(state))
 					{
 						error.setIgnored(true);
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java	(revision 10494)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidateUploadHook.java	(revision 10502)
@@ -4,7 +4,11 @@
 
 import java.awt.GridBagLayout;
-import java.util.*;
+import java.util.Collection;
+import java.util.ArrayList;
+import java.util.List;
 
-import javax.swing.*;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
 
 import org.openstreetmap.josm.Main;
@@ -19,5 +23,5 @@
  * This action iterates through all active tests and give them the data, so that
  * each one can test it.
- * 
+ *
  * @author frsantos
  */
@@ -25,55 +29,88 @@
 {
 	/** Serializable ID */
-    private static final long serialVersionUID = -2304521273582574603L;
+	private static final long serialVersionUID = -2304521273582574603L;
 
-    /**
-     * Validate the modified data before uploading
-     */
-    public boolean checkUpload(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete)
-    {
-        Collection<Test> tests = OSMValidatorPlugin.getEnabledTests(true);
-        if( tests.isEmpty() )
-            return true;
-        
-        AgregatePrimitivesVisitor v = new AgregatePrimitivesVisitor();
-        v.visit(add);
-        Collection<OsmPrimitive> selection = v.visit(update);
+	private OSMValidatorPlugin plugin;
 
-        List<TestError> errors = new ArrayList<TestError>(30);
-        for(Test test : tests) 
-        {
-            test.setBeforeUpload(true);
-            test.setPartialSelection(true);
-            test.startTest();
-            test.visit(selection);
-            test.endTest();
-            errors.addAll( test.getErrors() );
-        }
-        tests = null;
-        
-        return displayErrorScreen(errors);
-    }
-    
-    /**
-     * Displays a screen where the actions that would be taken are displayed and
-     * give the user the possibility to cancel the upload.
-     * @param errors The errors displayed in the screen
-     * @return <code>true</code>, if the upload should continue. <code>false</code>
-     *          if the user requested cancel.
-     */
-    private boolean displayErrorScreen(List<TestError> errors) 
-    {
-        if( errors == null || errors.isEmpty() ) 
-        {
-            return true;
-        }
+	public ValidateUploadHook(OSMValidatorPlugin plugin)
+	{
+		this.plugin = plugin;
+	}
 
-        JPanel p = new JPanel(new GridBagLayout());
-        ErrorTreePanel errorPanel = new ErrorTreePanel(errors);
-        errorPanel.expandAll();
-        p.add(new JScrollPane(errorPanel), GBC.eol());
+	/**
+	 * Validate the modified data before uploading
+	 */
+	public boolean checkUpload(Collection<OsmPrimitive> add, Collection<OsmPrimitive> update, Collection<OsmPrimitive> delete)
+	{
+		Collection<Test> tests = OSMValidatorPlugin.getEnabledTests(true);
+		if( tests.isEmpty() )
+			return true;
 
-        return JOptionPane.showConfirmDialog(Main.parent, p, tr("Data with errors. Upload anyway?"),
-                                             JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
-    }    
+		AgregatePrimitivesVisitor v = new AgregatePrimitivesVisitor();
+		v.visit(add);
+		Collection<OsmPrimitive> selection = v.visit(update);
+
+		List<TestError> errors = new ArrayList<TestError>(30);
+		for(Test test : tests)
+		{
+			test.setBeforeUpload(true);
+			test.setPartialSelection(true);
+			test.startTest();
+			test.visit(selection);
+			test.endTest();
+			errors.addAll( test.getErrors() );
+		}
+		tests = null;
+		if(errors == null || errors.isEmpty())
+			return true;
+
+		if(Main.pref.getBoolean(PreferenceEditor.PREF_USE_IGNORE, true))
+		{
+			int nume = 0;
+			for(TestError error : errors)
+			{
+				List<String> s = new ArrayList<String>();
+				s.add(error.getIgnoreState());
+				s.add(error.getIgnoreGroup());
+				s.add(error.getIgnoreSubGroup());
+				for(String state : s)
+				{
+					if(state != null && plugin.ignoredErrors.contains(state))
+					{
+						error.setIgnored(true);
+					}
+				}
+				if(!error.getIgnored())
+					++nume;
+			}
+			if(nume == 0)
+				return true;
+		}
+		return displayErrorScreen(errors);
+	}
+
+	/**
+	 * Displays a screen where the actions that would be taken are displayed and
+	 * give the user the possibility to cancel the upload.
+	 * @param errors The errors displayed in the screen
+	 * @return <code>true</code>, if the upload should continue. <code>false</code>
+	 *          if the user requested cancel.
+	 */
+	private boolean displayErrorScreen(List<TestError> errors)
+	{
+		JPanel p = new JPanel(new GridBagLayout());
+		ErrorTreePanel errorPanel = new ErrorTreePanel(errors);
+		errorPanel.expandAll();
+		p.add(new JScrollPane(errorPanel), GBC.eol());
+
+		int res  = JOptionPane.showConfirmDialog(Main.parent, p,
+		tr("Data with errors. Upload anyway?"), JOptionPane.YES_NO_OPTION);
+		if(res == JOptionPane.NO_OPTION)
+		{
+			plugin.validationDialog.tree.setErrors(errors);
+			plugin.validationDialog.setVisible(true);
+			Main.ds.fireSelectionChanged(Main.ds.getSelected());
+		}
+		return res == JOptionPane.YES_OPTION;
+	}
 }
Index: applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
===================================================================
--- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java	(revision 10494)
+++ applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java	(revision 10502)
@@ -6,18 +6,22 @@
 import java.awt.BorderLayout;
 import java.awt.GridLayout;
-import java.awt.event.*;
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseAdapter;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.Map.Entry;
-
-import javax.swing.*;
+import java.util.Set;
+
+import javax.swing.JPanel;
+import javax.swing.JOptionPane;
+import javax.swing.JScrollPane;
 import javax.swing.event.TreeSelectionEvent;
 import javax.swing.event.TreeSelectionListener;
-import javax.swing.tree.*;
+import javax.swing.tree.DefaultMutableTreeNode;
+import javax.swing.tree.TreePath;
 
 import org.openstreetmap.josm.Main;
@@ -49,6 +53,4 @@
 	protected ErrorTreePanel tree;
 
-	public Collection<String> ignoredErrors = new TreeSet<String>();
-
 	private SideButton fixButton; /** The fix button */
 	private SideButton ignoreButton; /** The ignore button */
@@ -94,33 +96,4 @@
 		}
 		add(buttonPanel, BorderLayout.SOUTH);
-		loadIgnoredErrors();
-	}
-
-	private void loadIgnoredErrors() {
-		ignoredErrors.clear();
-		if(Main.pref.getBoolean(PreferenceEditor.PREF_USE_IGNORE, true))
-		{
-			try {
-				final BufferedReader in = new BufferedReader(new FileReader(Util.getPluginDir() + "ignorederrors"));
-				for (String line = in.readLine(); line != null; line = in.readLine()) {
-					ignoredErrors.add(line);
-				}
-			}
-			catch (final FileNotFoundException e) {}
-			catch (final IOException e) {
-				e.printStackTrace();
-			}
-		}
-	}
-
-	private void saveIgnoredErrors() {
-		try {
-			final PrintWriter out = new PrintWriter(new FileWriter(Util.getPluginDir() + "ignorederrors"), false);
-			for (String e : ignoredErrors)
-				out.println(e);
-			out.close();
-		} catch (final IOException e) {
-			e.printStackTrace();
-		}
 	}
 
@@ -235,5 +208,5 @@
 					}
 					for(String s : state)
-						ignoredErrors.add(s);
+						plugin.ignoredErrors.add(s);
 					continue;
 				}
@@ -256,5 +229,5 @@
 					String state = error.getIgnoreState();
 					if(state != null)
-						ignoredErrors.add(state);
+						plugin.ignoredErrors.add(state);
 					changed = true;
 					error.setIgnored(true);
@@ -265,42 +238,42 @@
 		{
 			tree.resetErrors();
-			saveIgnoredErrors();
+			plugin.saveIgnoredErrors();
 			Main.map.repaint();
 		}
 	}
 
-    /**
-     * Sets the selection of the map to the current selected items.
-     */
-    @SuppressWarnings("unchecked")
-    private void setSelectedItems() 
-    {
-        if( tree == null )
-            return;
-        
-        Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(40);
-
-        TreePath[] selectedPaths = tree.getSelectionPaths();
-        if( selectedPaths == null)
-            return;
-        
-        for( TreePath path : selectedPaths)
-        {
-        	DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
-    		Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
-    		while( children.hasMoreElements() )
-    		{
-        		DefaultMutableTreeNode childNode = children.nextElement();
-        		Object nodeInfo = childNode.getUserObject();
-        		if( nodeInfo instanceof TestError)
-        		{
-        			TestError error = (TestError)nodeInfo;
-        			sel.addAll( error.getPrimitives() );
-        		}
-    		}
-        }
-        
-        Main.ds.setSelected(sel);
-    }
+	/**
+	 * Sets the selection of the map to the current selected items.
+	 */
+	@SuppressWarnings("unchecked")
+	private void setSelectedItems()
+	{
+		if( tree == null )
+			return;
+
+		Collection<OsmPrimitive> sel = new HashSet<OsmPrimitive>(40);
+
+		TreePath[] selectedPaths = tree.getSelectionPaths();
+		if( selectedPaths == null)
+			return;
+
+		for( TreePath path : selectedPaths)
+		{
+			DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
+			Enumeration<DefaultMutableTreeNode> children = node.breadthFirstEnumeration();
+			while( children.hasMoreElements() )
+			{
+				DefaultMutableTreeNode childNode = children.nextElement();
+				Object nodeInfo = childNode.getUserObject();
+				if( nodeInfo instanceof TestError)
+				{
+					TestError error = (TestError)nodeInfo;
+					sel.addAll( error.getPrimitives() );
+				}
+			}
+		}
+
+		Main.ds.setSelected(sel);
+	}
 
 	public void actionPerformed(ActionEvent e)
@@ -317,30 +290,30 @@
 	}
 
-    /**
-     * Checks for fixes in selected element and, if needed, adds to the sel parameter all selected elements
-     * @param sel The collection where to add all selected elements
-     * @param addSelected if true, add all selected elements to collection
-     * @return whether the selected elements has any fix
-     */
-    @SuppressWarnings("unchecked")
+	/**
+	 * Checks for fixes in selected element and, if needed, adds to the sel parameter all selected elements
+	 * @param sel The collection where to add all selected elements
+	 * @param addSelected if true, add all selected elements to collection
+	 * @return whether the selected elements has any fix
+	 */
+	@SuppressWarnings("unchecked")
 	private boolean setSelection(Collection<OsmPrimitive> sel, boolean addSelected)
 	{
 		boolean hasFixes = false;
 
-        DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
-        if( lastSelectedNode != null && !lastSelectedNode.equals(node) )
-        {
-            Enumeration<DefaultMutableTreeNode> children = lastSelectedNode.breadthFirstEnumeration();
-            while( children.hasMoreElements() )
-            {
-                DefaultMutableTreeNode childNode = children.nextElement();
-                Object nodeInfo = childNode.getUserObject();
-                if( nodeInfo instanceof TestError)
-                {
-                    TestError error = (TestError)nodeInfo;
-                    error.setSelected(false);
-                }
-            }  
-        }
+		DefaultMutableTreeNode node = (DefaultMutableTreeNode)tree.getLastSelectedPathComponent();
+		if( lastSelectedNode != null && !lastSelectedNode.equals(node) )
+		{
+			Enumeration<DefaultMutableTreeNode> children = lastSelectedNode.breadthFirstEnumeration();
+			while( children.hasMoreElements() )
+			{
+				DefaultMutableTreeNode childNode = children.nextElement();
+				Object nodeInfo = childNode.getUserObject();
+				if( nodeInfo instanceof TestError)
+				{
+					TestError error = (TestError)nodeInfo;
+					error.setSelected(false);
+				}
+			}
+		}
 
 		lastSelectedNode = node;
@@ -368,5 +341,5 @@
 		if(ignoreButton != null)
 			ignoreButton.setEnabled(true);
-		
+
 		return hasFixes;
 	}
@@ -375,5 +348,5 @@
 	 * Watches for clicks.
 	 */
-	public class ClickWatch extends MouseAdapter 
+	public class ClickWatch extends MouseAdapter
 	{
 		@Override
@@ -401,5 +374,5 @@
 	 * Watches for tree selection.
 	 */
-	public class SelectionWatch implements TreeSelectionListener 
+	public class SelectionWatch implements TreeSelectionListener
 	{
 		@SuppressWarnings("unchecked")
