Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/FixUnresolvedStreetsAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/FixUnresolvedStreetsAction.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/FixUnresolvedStreetsAction.java	(revision 23924)
@@ -48,8 +48,9 @@
 	@Override
 	public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
+		/* this changes the dialog contents, so we do nothing here
 		this.newSelection = newSelection;
 		if (addressEditContainer != null) {
 			addressEditContainer.invalidate(newSelection);
-		}
+		}*/
 	}
 
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AbstractAddressEditAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AbstractAddressEditAction.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AbstractAddressEditAction.java	(revision 23924)
@@ -19,11 +19,18 @@
 import org.openstreetmap.josm.plugins.addressEdit.AddressEditContainer;
 
+/**
+ * Base class for all address related action. An action can work as well on all addresses collected by the
+ * container or on the active selection.
+ * By default, the action is disabled and the updateEnabledState(...) have to be implemented by
+ * subclasses. There are also two separate <tt>actionPerformedXX</tt> methods to do the action on
+ * container or on selection items.
+ * Most actions will work in both cases, so it is recommended to have one single method which
+ * accepts a list of addresses or streets and executes the tasks to be done by this action. 
+ * @author Oliver Wieland <oliver.wieland@online.de>
+ * 
+ */
+
+@SuppressWarnings("serial")
 public abstract class AbstractAddressEditAction extends JosmAction {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 3080414353417044998L;
-
 	private AddressEditSelectionEvent event;
 	protected AddressEditContainer container;
@@ -114,5 +121,9 @@
 			event = null; // consume event
 		} else {
-			actionPerformed(arg0);
+			if (container != null) {
+				addressEditActionPerformed(container);
+			} else { // call super class hook
+				actionPerformed(arg0);
+			}
 		}
 	}
@@ -120,9 +131,15 @@
 
 	/**
-	 * Redirected action handler
+	 * Redirected action handler for doing actions on a address selection.
 	 * @param ev
 	 */
 	public abstract void addressEditActionPerformed(AddressEditSelectionEvent ev);
 	
+	/**
+	 * Redirected action handler for doing actions on an address container.
+	 * @param ev
+	 */
+	public abstract void addressEditActionPerformed(AddressEditContainer container);
+	
 	
 
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AddressEditDialog.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AddressEditDialog.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AddressEditDialog.java	(revision 23924)
@@ -56,13 +56,13 @@
 import org.openstreetmap.josm.plugins.addressEdit.StreetNode;
 import org.openstreetmap.josm.plugins.addressEdit.StringUtils;
-
+import org.openstreetmap.josm.tools.ImageProvider;
+
+@SuppressWarnings("serial")
 public class AddressEditDialog extends JDialog implements ActionListener, ListSelectionListener, IAddressEditContainerListener {
 	private static final String UNRESOLVED_HEADER_FMT = tr("Unresolved Addresses (%d)");
 	private static final String STREET_HEADER_FMT = tr("Streets (%d)");
 	private static final String OK_COMMAND = tr("Close");
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 6251676464816335631L;
+	private static final String SELECT_AND_CLOSE = tr("Select and close");
+	
 	private AddressEditContainer editContainer;
 	private JTable unresolvedTable;
@@ -73,9 +73,11 @@
 	private ApplyAllGuessesAction applyAllGuessesAction = new ApplyAllGuessesAction();
 	private GuessAddressDataAction guessAddressAction = new GuessAddressDataAction();
+	private SelectAddressesInMapAction selectAddressesInMapAction = new SelectAddressesInMapAction();
 	
 	private AbstractAddressEditAction[] actions = new AbstractAddressEditAction[] {
 		resolveAction,
 		guessAddressAction,
-		applyAllGuessesAction
+		applyAllGuessesAction,
+		selectAddressesInMapAction
 	};
 	private JLabel streetLabel;
@@ -89,5 +91,5 @@
 	 */
 	public AddressEditDialog(AddressEditContainer addressEditContainer) throws HeadlessException  {
-		super(JOptionPane.getFrameForComponent(Main.parent), tr("Edit Addresses"), false);
+		super(JOptionPane.getFrameForComponent(Main.parent), tr("Fix unresolved addresses"), false);
 	
 		this.editContainer = addressEditContainer; 
@@ -135,4 +137,8 @@
 				SideButton applyAllGuesses = new SideButton(applyAllGuessesAction);															   
 				unresolvedButtons.add(applyAllGuesses);
+				
+				unresolvedButtons.add(new JSeparator());
+				SideButton selectInMap = new SideButton(selectAddressesInMapAction);															   
+				unresolvedButtons.add(selectInMap);
 				unresolvedPanel.add(unresolvedButtons, BorderLayout.SOUTH);
 			} catch (Exception e) {				
@@ -163,6 +169,8 @@
 		
 		JPanel buttonPanel = new JPanel(new GridLayout(1,10));
-		JButton ok = new JButton(OK_COMMAND);
+		JButton ok = new JButton(OK_COMMAND, ImageProvider.getIfAvailable(null, "ok"));
 		ok.addActionListener(this);
+		JButton selectAndClose = new JButton(SELECT_AND_CLOSE);
+		selectAndClose.addActionListener(this);
 		
 		// Murks
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/ApplyAllGuessesAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/ApplyAllGuessesAction.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/ApplyAllGuessesAction.java	(revision 23924)
@@ -44,15 +44,4 @@
 	}
 
-	/* (non-Javadoc)
-	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#actionPerformed(java.awt.event.ActionEvent)
-	 */
-	@Override
-	public void actionPerformed(ActionEvent arg0) {
-		if (container == null || container.getUnresolvedAddresses() == null) return;
-		
-		List<AddressNode> addrToFix = container.getUnresolvedAddresses();
-		applyGuesses(addrToFix);
-	}
-
 	private void applyGuesses(List<AddressNode> addrToFix) {
 		List<AddressNode> addrToFixShadow = new ArrayList<AddressNode>(addrToFix);
@@ -66,3 +55,11 @@
 		// do nothing here
 	}
+
+	@Override
+	public void addressEditActionPerformed(AddressEditContainer container) {
+		if (container == null || container.getUnresolvedAddresses() == null) return;
+		
+		List<AddressNode> addrToFix = container.getUnresolvedAddresses();
+		applyGuesses(addrToFix);		
+	}
 }
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AssignAddressToStreetAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AssignAddressToStreetAction.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/AssignAddressToStreetAction.java	(revision 23924)
@@ -37,6 +37,5 @@
 	public void addressEditActionPerformed(AddressEditSelectionEvent ev) {		
 		StreetNode streetNode = ev.getSelectedStreet();
-		
-		
+				
 		if (streetNode != null && ev.getSelectedUnresolvedAddresses() != null) {
 			for (AddressNode addrNode : ev.getSelectedUnresolvedAddresses()) {
@@ -61,4 +60,9 @@
 	}
 
+	@Override
+	public void addressEditActionPerformed(AddressEditContainer container) {
+		// we only accept a selection: nothing to do here		
+	}
+
 
 }
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/GuessAddressDataAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/GuessAddressDataAction.java	(revision 23923)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/GuessAddressDataAction.java	(revision 23924)
@@ -24,4 +24,11 @@
 import org.openstreetmap.josm.plugins.addressEdit.AddressNode;
 
+/**
+ * Guesses address tags by picking the closest street node with a name. The same is done (some day)
+ * with city, post code, state,...
+ * @author Oliver Wieland <oliver.wieland@online.de>
+ * 
+ */
+
 @SuppressWarnings("serial")
 public class GuessAddressDataAction extends AbstractAddressEditAction {
@@ -33,22 +40,45 @@
 	}
 
+	/* (non-Javadoc)
+	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#updateEnabledState(org.openstreetmap.josm.plugins.addressEdit.gui.AddressEditSelectionEvent)
+	 */
+	@Override
+	public void updateEnabledState(AddressEditSelectionEvent ev) {
+		setEnabled(ev != null && ev.getUnresolvedAddressTable() != null);
+	}
+
+	@Override
+	protected void updateEnabledState(AddressEditContainer container) {
+		setEnabled(container != null && container.getNumberOfIncompleteAddresses() > 0);
+	}
+
+	@Override
+	public void addressEditActionPerformed(AddressEditContainer container) {
+		if (container == null) return;
+		if (container.getUnresolvedAddresses() == null) return;
+				
+		internalGuessAddresses(container.getIncompleteAddresses());
+	}
+
 	@Override
 	public void addressEditActionPerformed(AddressEditSelectionEvent ev) {
+		if (ev == null || ev.getSelectedUnresolvedAddresses() == null) return;
+		
+		// guess tags for selected addresses only
+		internalGuessAddresses(ev.getSelectedUnresolvedAddresses());
 	}
 	
-	/* (non-Javadoc)
-	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#actionPerformed(java.awt.event.ActionEvent)
+	/**
+	 * Internal method to start several threads guessing tag values for the given list of addresses.
+	 * @param addrNodes
 	 */
-	@Override
-	public void actionPerformed(ActionEvent arg0) {
-		if (container == null) return;
-		if (container.getUnresolvedAddresses() == null) return;
-		
+	private void internalGuessAddresses(List<AddressNode> nodes) {
+		// setup thread pool
 		for (int i = 0; i < threads.length; i++) {
 			threads[i] = new AddressFinderThread();
 		}
-						
-		List<AddressNode> addrNodes = new ArrayList<AddressNode>();		
-		addrNodes.addAll(container.getIncompleteAddresses());
+		
+		// work on a shadowed copy
+		List<AddressNode> addrNodes = new ArrayList<AddressNode>(nodes);
 		for (AddressNode aNode : addrNodes) {
 			if (aNode.hasStreetName()) continue;
@@ -76,17 +106,3 @@
 	}
 
-	/* (non-Javadoc)
-	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#updateEnabledState(org.openstreetmap.josm.plugins.addressEdit.gui.AddressEditSelectionEvent)
-	 */
-	@Override
-	public void updateEnabledState(AddressEditSelectionEvent ev) {
-		// do nothing here
-	}
-
-	@Override
-	protected void updateEnabledState(AddressEditContainer container) {
-		setEnabled(container != null && container.getNumberOfIncompleteAddresses() > 0);
-	}
-
-	
 }
Index: /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/SelectAddressesInMapAction.java
===================================================================
--- /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/SelectAddressesInMapAction.java	(revision 23924)
+++ /applications/editors/josm/plugins/AddressEdit/src/org/openstreetmap/josm/plugins/addressEdit/gui/SelectAddressesInMapAction.java	(revision 23924)
@@ -0,0 +1,101 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under 
+ * the terms of the GNU General Public License as published by the 
+ * Free Software Foundation, either version 3 of the License, or 
+ * (at your option) any later version. 
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+ * See the GNU General Public License for more details. 
+ * 
+ * You should have received a copy of the GNU General Public License along with this program. 
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+/**
+ * This program is free software: you can redistribute it and/or modify it under 
+ * the terms of the GNU General Public License as published by the 
+ * Free Software Foundation, either version 3 of the License, or 
+ * (at your option) any later version. 
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+ * See the GNU General Public License for more details. 
+ * 
+ * You should have received a copy of the GNU General Public License along with this program. 
+ * If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* File created on 30.10.2010 */
+package org.openstreetmap.josm.plugins.addressEdit.gui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.plugins.addressEdit.AddressEditContainer;
+import org.openstreetmap.josm.plugins.addressEdit.AddressNode;
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+/**
+ *
+ * @author Oliver Wieland <oliver.wieland@online.de>
+ * 
+ */
+
+@SuppressWarnings("serial")
+public class SelectAddressesInMapAction extends AbstractAddressEditAction {
+
+	public SelectAddressesInMapAction() {
+		// we simply use the existing icon :-|
+		super(tr("Select in map"), "selectall", "Selects selected addresses in the map");
+	}
+
+	/* (non-Javadoc)
+	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#addressEditActionPerformed(org.openstreetmap.josm.plugins.addressEdit.gui.AddressEditSelectionEvent)
+	 */
+	@Override
+	public void addressEditActionPerformed(AddressEditSelectionEvent ev) {
+		if (ev == null) return;
+		
+		internalSelectAddresses(ev.getSelectedUnresolvedAddresses());
+	}
+
+	@Override
+	public void addressEditActionPerformed(AddressEditContainer container) {
+		internalSelectAddresses(container.getUnresolvedAddresses());		
+	}
+
+	/* (non-Javadoc)
+	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#updateEnabledState(org.openstreetmap.josm.plugins.addressEdit.AddressEditContainer)
+	 */
+	@Override
+	protected void updateEnabledState(AddressEditContainer container) {
+		setEnabled(container != null && container.getNumberOfIncompleteAddresses() > 0);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.openstreetmap.josm.plugins.addressEdit.gui.AbstractAddressEditAction#updateEnabledState(org.openstreetmap.josm.plugins.addressEdit.gui.AddressEditSelectionEvent)
+	 */
+	@Override
+	protected void updateEnabledState(AddressEditSelectionEvent event) {
+		setEnabled(event != null && event.getSelectedUnresolvedAddresses() != null);
+	}
+
+	/**
+	 * Internal helper to select the given addresses in the map. 
+	 * @param addrToSel
+	 */
+	private void internalSelectAddresses(List<AddressNode> addrToSel) {
+		if (addrToSel == null) return;
+		
+		List<OsmPrimitive> sel = new ArrayList<OsmPrimitive>();
+		
+		for (AddressNode aNode : addrToSel) {
+			sel.add(aNode.getOsmObject());
+		}
+
+		getCurrentDataSet().setSelected(sel);
+	}
+
+}
