Index: /applications/editors/josm/plugins/HouseNumberTaggingTool/README
===================================================================
--- /applications/editors/josm/plugins/HouseNumberTaggingTool/README	(revision 29474)
+++ /applications/editors/josm/plugins/HouseNumberTaggingTool/README	(revision 29475)
@@ -2,5 +2,5 @@
 =================================
 
-Simple tool to tag house numbers. Select house and press 'Y'. Select your addr-tags and press OK.
+Simple tool to tag house numbers. Select house and press 'k'. Select your addr-tags and press OK.
 
 author: Oliver Raupach, oliver@raupach.cc
Index: /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/Dto.java
===================================================================
--- /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/Dto.java	(revision 29474)
+++ /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/Dto.java	(revision 29475)
@@ -8,9 +8,5 @@
 public class Dto implements Serializable
 {
-
-   /**
-    * 
-    */
-   private static final long serialVersionUID = -4025800761473341695L;
+   private static final long serialVersionUID = -4035800761473241695L;
 
    private boolean saveBuilding = true;
@@ -22,4 +18,5 @@
    private boolean saveHousenumber = true;
 
+   private String building = "yes";
    private String country;
    private String state;
@@ -28,4 +25,5 @@
    private String street;
    private String housenumber;
+   private int housenumberChangeValue = 0;
 
    public boolean isSaveBuilding()
@@ -158,3 +156,23 @@
       this.saveState = saveState;
    }
+
+   public int getHousenumberChangeValue()
+   {
+      return housenumberChangeValue;
+   }
+
+   public void setHousenumberChangeValue(int housenumberChangeValue)
+   {
+      this.housenumberChangeValue = housenumberChangeValue;
+   }
+
+   public String getBuilding()
+   {
+      return building;
+   }
+
+   public void setBuilding(String building)
+   {
+      this.building = building;
+   }
 }
Index: /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/LaunchAction.java
===================================================================
--- /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/LaunchAction.java	(revision 29474)
+++ /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/LaunchAction.java	(revision 29475)
@@ -14,7 +14,4 @@
 {
 
-   /**
-    * 
-    */
    private static final long serialVersionUID = -3508864293222033185L;
    private OsmPrimitive selection = null;
Index: plications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagData.java
===================================================================
--- /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagData.java	(revision 29474)
+++ 	(revision )
@@ -1,29 +1,0 @@
-package org.openstreetmap.josm.plugins.housenumbertool;
-
-import java.io.Serializable;
-
-public class TagData implements Serializable
-{
-
-   /**
-	 * 
-	 */
-	private static final long serialVersionUID = -8522743126103045878L;
-	private String value;
-   
-   public TagData(String value)
-   {
-      this.value = value;
-   }
-   public String getValue()
-   {
-      return value;
-   }
-   public void setValue(String value)
-   {
-      this.value = value;
-   }
-   
-   
-   
-}
Index: /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java
===================================================================
--- /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java	(revision 29474)
+++ /applications/editors/josm/plugins/HouseNumberTaggingTool/src/org/openstreetmap/josm/plugins/housenumbertool/TagDialog.java	(revision 29475)
@@ -4,5 +4,7 @@
 import static org.openstreetmap.josm.tools.I18n.trn;
 
-import java.awt.*;
+import java.awt.Dimension;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
 import java.io.File;
@@ -12,4 +14,5 @@
 import java.io.ObjectOutputStream;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.TreeSet;
@@ -18,5 +21,8 @@
 
 import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JSlider;
 import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
@@ -45,9 +51,14 @@
    public static final String TAG_ADDR_HOUSENUMBER = "addr:housenumber";
    public static final String TAG_ADDR_STREET = "addr:street";
-   /**
-    * 
-    */
+
+   public static final String[] buildingStrings = {"yes", "apartments", "chapel", "church", "commercial", "dormitory", "hotel", "house", "residential", "terrace",  "industrial", "retail", "warehouse", "cathedral",  "civic", "hospital", "school", "train_station", "transportation", "university", "public", "bridge", "bunker", "cabin", "construction", "farm_auxiliary", "garage", "garages" , "greenhouse", "hangar", "hut", "roof", "shed", "stable" };
+   
+   private static final int FPS_MIN = -2;
+   private static final int FPS_MAX = 2;
+   
    private static final long serialVersionUID = 6414385452106276923L;
+
    static private final Logger logger = Logger.getLogger(TagDialog.class.getName());
+
    private String pluginDir;
    private AutoCompletionManager acm;
@@ -55,7 +66,7 @@
 
    public static final String TEMPLATE_DATA = "/template.data";
-  
+
    private AutoCompletingComboBox country;
-    private AutoCompletingComboBox state;
+   private AutoCompletingComboBox state;
    private AutoCompletingComboBox city;
    private AutoCompletingComboBox postcode;
@@ -64,28 +75,25 @@
    private JCheckBox buildingEnabled;
    private JCheckBox countryEnabled;
-    private JCheckBox stateEnabled;
+   private JCheckBox stateEnabled;
    private JCheckBox cityEnabled;
    private JCheckBox zipEnabled;
    private JCheckBox streetEnabled;
    private JCheckBox housenumberEnabled;
+   private JSlider housenumberChangeSequence;
+   private JComboBox building;
 
    public TagDialog(String pluginDir, OsmPrimitive p_selection)
    {
-       super(Main.parent,
-               tr("House Number Editor"),
-               new String[] { tr("OK"), tr("Cancel")},
-               true
-       );
+      super(Main.parent, tr("House Number Editor"), new String[] { tr("OK"), tr("Cancel") }, true);
       this.pluginDir = pluginDir;
       this.selection = p_selection;
 
-       JPanel editPanel = createContentPane();
-
+      JPanel editPanel = createContentPane();
 
       setContent(editPanel);
-       setButtonIcons(new String[] {"ok.png", "cancel.png" });
-       setDefaultButton(1);
-       setupDialog();
-       getRootPane().setDefaultButton(defaultButton);
+      setButtonIcons(new String[] { "ok.png", "cancel.png" });
+      setDefaultButton(1);
+      setupDialog();
+      getRootPane().setDefaultButton(defaultButton);
 
       // middle of the screen
@@ -102,334 +110,365 @@
    }
 
-    private JPanel createContentPane() {
-        acm = selection.getDataSet().getAutoCompletionManager();
-
-        Dto dto = loadDto();
-
-        JPanel editPanel = new JPanel(new GridBagLayout());
-        GridBagConstraints c = new GridBagConstraints();
-
-        buildingEnabled = new JCheckBox(TAG_BUILDING);
-        buildingEnabled.setFocusable(false);
-        buildingEnabled.setSelected(dto.isSaveBuilding());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 0;
-        c.weightx = 0;
-        editPanel.add(buildingEnabled, c);
-
-        JTextField building = new JTextField();
-        building.setPreferredSize(new Dimension(200, 24));
-        building.setText("yes");
-        building.setEditable(false);
-        c.gridx = 1;
-        c.gridy = 0;
-        c.weightx = 1;
-        editPanel.add(building, c);
-
-        // country
-        countryEnabled = new JCheckBox(TAG_ADDR_COUNTRY);
-        countryEnabled.setFocusable(false);
-        countryEnabled.setSelected(dto.isSaveCountry());
-        c = new GridBagConstraints();
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 1;
-        c.weightx = 0;
-        editPanel.add(countryEnabled, c);
-
-        country = new AutoCompletingComboBox();
-        country.setPossibleACItems(acm.getValues(TAG_ADDR_COUNTRY));
-        country.setPreferredSize(new Dimension(200, 24));
-        country.setEditable(true);
-        country.setSelectedItem(dto.getCountry());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 1;
-        c.weightx = 1;
-        editPanel.add(country, c);
-
-        // state
-        stateEnabled = new JCheckBox(TAG_ADDR_STATE);
-        stateEnabled.setFocusable(false);
-        stateEnabled.setSelected(dto.isSaveState());
-        c = new GridBagConstraints();
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 2;
-        c.weightx = 0;
-        editPanel.add(stateEnabled, c);
-
-        state = new AutoCompletingComboBox();
-        state.setPossibleACItems(acm.getValues(TAG_ADDR_STATE));
-        state.setPreferredSize(new Dimension(200, 24));
-        state.setEditable(true);
-        state.setSelectedItem(dto.getState());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 2;
-        c.weightx = 1;
-        editPanel.add(state, c);
-
-        // city
-        cityEnabled = new JCheckBox(TAG_ADDR_CITY);
-        cityEnabled.setFocusable(false);
-        cityEnabled.setSelected(dto.isSaveCity());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 3;
-        c.weightx = 0;
-        editPanel.add(cityEnabled, c);
-
-        city = new AutoCompletingComboBox();
-        city.setPossibleACItems(acm.getValues(TAG_ADDR_CITY));
-        city.setPreferredSize(new Dimension(200, 24));
-        city.setEditable(true);
-        city.setSelectedItem(dto.getCity());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 3;
-        c.weightx = 1;
-        editPanel.add(city, c);
-
-        // postcode
-        zipEnabled = new JCheckBox(TAG_ADDR_POSTCODE);
-        zipEnabled.setFocusable(false);
-        zipEnabled.setSelected(dto.isSavePostcode());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 4;
-        c.weightx = 0;
-        editPanel.add(zipEnabled, c);
-
-        postcode = new AutoCompletingComboBox();
-        postcode.setPossibleACItems(acm.getValues(TAG_ADDR_POSTCODE));
-        postcode.setPreferredSize(new Dimension(200, 24));
-        postcode.setEditable(true);
-        postcode.setSelectedItem(dto.getPostcode());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 4;
-        c.weightx = 1;
-        editPanel.add(postcode, c);
-
-        // street
-        streetEnabled = new JCheckBox(TAG_ADDR_STREET);
-        streetEnabled.setFocusable(false);
-        streetEnabled.setSelected(dto.isSaveStreet());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 5;
-        c.weightx = 0;
-        editPanel.add(streetEnabled, c);
-
-        street = new AutoCompletingComboBox();
-        street.setPossibleItems(getPossibleStreets());
-        street.setPreferredSize(new Dimension(200, 24));
-        street.setEditable(true);
-        street.setSelectedItem(dto.getStreet());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 5;
-        c.weightx = 1;
-        editPanel.add(street, c);
-
-        // housenumber
-        housenumberEnabled = new JCheckBox(TAG_ADDR_HOUSENUMBER);
-        housenumberEnabled.setFocusable(false);
-        housenumberEnabled.setSelected(dto.isSaveHousenumber());
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 0;
-        c.gridy = 6;
-        c.weightx = 0;
-        editPanel.add(housenumberEnabled, c);
-
-        housnumber = new JTextField();
-        housnumber.setPreferredSize(new Dimension(200, 24));
-        int number = 0;
-        try {
-            number = Integer.valueOf(dto.getHousenumber()) + 2;
-        } catch (NumberFormatException e) {
-        }
-        if (number > 0)
-           housnumber.setText(String.valueOf(number));
-        c.fill = GridBagConstraints.HORIZONTAL;
-        c.gridx = 1;
-        c.gridy = 6;
-        c.weightx = 1;
-        editPanel.add(housnumber, c);
-        return editPanel;
-    }
-
-    @Override
-    protected void buttonAction(int buttonIndex, ActionEvent evt) {
-        if (buttonIndex == 0) {
-            Dto dto = new Dto();
-            dto.setSaveBuilding(buildingEnabled.isSelected());
-            dto.setSaveCity(cityEnabled.isSelected());
-            dto.setSaveCountry(countryEnabled.isSelected());
-            dto.setSaveState(stateEnabled.isSelected());
-            dto.setSaveHousenumber(housenumberEnabled.isSelected());
-            dto.setSavePostcode(zipEnabled.isSelected());
-            dto.setSaveStreet(streetEnabled.isSelected());
-
-            dto.setCity(getAutoCompletingComboBoxValue(city));
-            dto.setCountry(getAutoCompletingComboBoxValue(country));
-            dto.setHousenumber(housnumber.getText());
-            dto.setPostcode(getAutoCompletingComboBoxValue(postcode));
-            dto.setStreet(getAutoCompletingComboBoxValue(street));
-            dto.setState(getAutoCompletingComboBoxValue(state));
-
-            updateJOSMSelection(selection, dto);
-            saveDto(dto);
-        }
-        setVisible(false);
-    }
-
-    private String getAutoCompletingComboBoxValue(AutoCompletingComboBox box) {
-    	Object item = box.getSelectedItem();
-    	if ( item != null)
-    	{
-    		if (item instanceof String)
-    		{
-    			return (String) item;
-    		}
-    		if (item instanceof AutoCompletionListItem)
-    		{
-    			return ((AutoCompletionListItem) item).getValue();
-    		}
-    		return item.toString();
-    	}
-    	else
-    	{
-    		return "";
-    	}
-    }
-
-    protected void saveDto(Dto dto)
-    {
-    	 File path = new File(pluginDir);
-    	 File fileName = new File(pluginDir + TagDialog.TEMPLATE_DATA);
-    	 
-       try
-       {
+   private JPanel createContentPane()
+   {
+      acm = selection.getDataSet().getAutoCompletionManager();
+
+      Dto dto = loadDto();
+
+      JPanel editPanel = new JPanel(new GridBagLayout());
+      GridBagConstraints c = new GridBagConstraints();
+
+      buildingEnabled = new JCheckBox(TAG_BUILDING);
+      buildingEnabled.setFocusable(false);
+      buildingEnabled.setSelected(dto.isSaveBuilding());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 0;
+      c.weightx = 0;
+      editPanel.add(buildingEnabled, c);
+
+      Arrays.sort(buildingStrings);
+      building = new JComboBox(buildingStrings);
+      building.setSelectedItem(dto.getBuilding()); 
+      building.setMaximumRowCount(50);
+      c.gridx = 1;
+      c.gridy = 0;
+      c.weightx = 1;
+      editPanel.add(building, c);
+      
+      // country
+      countryEnabled = new JCheckBox(TAG_ADDR_COUNTRY);
+      countryEnabled.setFocusable(false);
+      countryEnabled.setSelected(dto.isSaveCountry());
+      c = new GridBagConstraints();
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 1;
+      c.weightx = 0;
+      editPanel.add(countryEnabled, c);
+
+      country = new AutoCompletingComboBox();
+      country.setPossibleACItems(acm.getValues(TAG_ADDR_COUNTRY));
+      country.setPreferredSize(new Dimension(200, 24));
+      country.setEditable(true);
+      country.setSelectedItem(dto.getCountry());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 1;
+      c.weightx = 1;
+      editPanel.add(country, c);
+
+      // state
+      stateEnabled = new JCheckBox(TAG_ADDR_STATE);
+      stateEnabled.setFocusable(false);
+      stateEnabled.setSelected(dto.isSaveState());
+      c = new GridBagConstraints();
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 2;
+      c.weightx = 0;
+      editPanel.add(stateEnabled, c);
+
+      state = new AutoCompletingComboBox();
+      state.setPossibleACItems(acm.getValues(TAG_ADDR_STATE));
+      state.setPreferredSize(new Dimension(200, 24));
+      state.setEditable(true);
+      state.setSelectedItem(dto.getState());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 2;
+      c.weightx = 1;
+      editPanel.add(state, c);
+
+      // city
+      cityEnabled = new JCheckBox(TAG_ADDR_CITY);
+      cityEnabled.setFocusable(false);
+      cityEnabled.setSelected(dto.isSaveCity());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 3;
+      c.weightx = 0;
+      editPanel.add(cityEnabled, c);
+
+      city = new AutoCompletingComboBox();
+      city.setPossibleACItems(acm.getValues(TAG_ADDR_CITY));
+      city.setPreferredSize(new Dimension(200, 24));
+      city.setEditable(true);
+      city.setSelectedItem(dto.getCity());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 3;
+      c.weightx = 1;
+      editPanel.add(city, c);
+
+      // postcode
+      zipEnabled = new JCheckBox(TAG_ADDR_POSTCODE);
+      zipEnabled.setFocusable(false);
+      zipEnabled.setSelected(dto.isSavePostcode());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 4;
+      c.weightx = 0;
+      editPanel.add(zipEnabled, c);
+
+      postcode = new AutoCompletingComboBox();
+      postcode.setPossibleACItems(acm.getValues(TAG_ADDR_POSTCODE));
+      postcode.setPreferredSize(new Dimension(200, 24));
+      postcode.setEditable(true);
+      postcode.setSelectedItem(dto.getPostcode());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 4;
+      c.weightx = 1;
+      editPanel.add(postcode, c);
+
+      // street
+      streetEnabled = new JCheckBox(TAG_ADDR_STREET);
+      streetEnabled.setFocusable(false);
+      streetEnabled.setSelected(dto.isSaveStreet());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 5;
+      c.weightx = 0;
+      editPanel.add(streetEnabled, c);
+
+      street = new AutoCompletingComboBox();
+      street.setPossibleItems(getPossibleStreets());
+      street.setPreferredSize(new Dimension(200, 24));
+      street.setEditable(true);
+      street.setSelectedItem(dto.getStreet());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 5;
+      c.weightx = 1;
+      editPanel.add(street, c);
+
+      // housenumber
+      housenumberEnabled = new JCheckBox(TAG_ADDR_HOUSENUMBER);
+      housenumberEnabled.setFocusable(false);
+      housenumberEnabled.setSelected(dto.isSaveHousenumber());
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 6;
+      c.weightx = 0;
+      editPanel.add(housenumberEnabled, c);
+
+      housnumber = new JTextField();
+      housnumber.setPreferredSize(new Dimension(200, 24));
+      
+      int number = 0;
+      try
+      {
+         number = Integer.valueOf(dto.getHousenumber()) + dto.getHousenumberChangeValue();
+      }
+      catch (NumberFormatException e)
+      {
+      }
+      if (number > 0)
+      {
+         housnumber.setText(String.valueOf(number));
+      }
+      
+      
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 1;
+      c.gridy = 6;
+      c.weightx = 1;
+      editPanel.add(housnumber, c);
+      
+      JLabel seqLabel = new JLabel(tr("Housenumber increment:"));
+      c.fill = GridBagConstraints.HORIZONTAL;
+      c.gridx = 0;
+      c.gridy = 7;
+      c.weightx = 0;
+      editPanel.add(seqLabel, c);
+
+      housenumberChangeSequence = new JSlider(JSlider.HORIZONTAL,  FPS_MIN, FPS_MAX, dto.getHousenumberChangeValue());
+      housenumberChangeSequence.setPaintTicks(true);
+      housenumberChangeSequence.setMajorTickSpacing(1);
+      housenumberChangeSequence.setMinorTickSpacing(1);
+      housenumberChangeSequence.setPaintLabels(true);
+      housenumberChangeSequence.setSnapToTicks(true);
+      c.gridx = 1;
+      c.gridy = 7;
+      c.weightx = 1;
+      editPanel.add(housenumberChangeSequence, c);
+   
+      return editPanel;
+   }
+
+   @Override
+   protected void buttonAction(int buttonIndex, ActionEvent evt)
+   {
+      if (buttonIndex == 0)
+      {
+         Dto dto = new Dto();
+         dto.setSaveBuilding(buildingEnabled.isSelected());
+         dto.setSaveCity(cityEnabled.isSelected());
+         dto.setSaveCountry(countryEnabled.isSelected());
+         dto.setSaveState(stateEnabled.isSelected());
+         dto.setSaveHousenumber(housenumberEnabled.isSelected());
+         dto.setSavePostcode(zipEnabled.isSelected());
+         dto.setSaveStreet(streetEnabled.isSelected());
+
+         dto.setBuilding((String) building.getSelectedItem());
+         dto.setCity(getAutoCompletingComboBoxValue(city));
+         dto.setCountry(getAutoCompletingComboBoxValue(country));
+         dto.setHousenumber(housnumber.getText());
+         dto.setPostcode(getAutoCompletingComboBoxValue(postcode));
+         dto.setStreet(getAutoCompletingComboBoxValue(street));
+         dto.setState(getAutoCompletingComboBoxValue(state));
+         dto.setHousenumberChangeValue(housenumberChangeSequence.getValue());
          
-          path.mkdirs();
-
-         
-          FileOutputStream file = new FileOutputStream(fileName);
-          ObjectOutputStream o = new ObjectOutputStream(file);
-          o.writeObject(dto);
-          o.close();
-       }
-       catch (Exception ex)
-       {
-          logger.log(Level.SEVERE, ex.getMessage());
-          
-          if (fileName != null)
-          {  
-        	  fileName.delete();
-          }
-       }
-    }
-
-    protected void updateJOSMSelection(OsmPrimitive selection, Dto dto)
-    {
-       ArrayList<Command> commands = new ArrayList<Command>();
-
-       if (dto.isSaveBuilding())
-       {
-          String value = selection.get(TagDialog.TAG_BUILDING);
-          if (value == null || (value != null && !value.equals("yes")))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_BUILDING, "yes");
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSaveCity())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_CITY);
-          if (value == null || (value != null && !value.equals(dto.getCity())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_CITY, dto.getCity());
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSaveCountry())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_COUNTRY);
-          if (value == null || (value != null && !value.equals(dto.getCountry())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_COUNTRY, dto.getCountry());
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSaveHousenumber())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_HOUSENUMBER);
-          if (value == null || (value != null && !value.equals(dto.getHousenumber())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_HOUSENUMBER, dto.getHousenumber());
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSavePostcode())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_POSTCODE);
-          if (value == null || (value != null && !value.equals(dto.getPostcode())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_POSTCODE, dto.getPostcode());
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSaveStreet())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_STREET);
-          if (value == null || (value != null && !value.equals(dto.getStreet())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STREET, dto.getStreet());
-             commands.add(command);
-          }
-       }
-
-       if (dto.isSaveState())
-       {
-          String value = selection.get(TagDialog.TAG_ADDR_STATE);
-          if (value == null || (value != null && !value.equals(dto.getState())))
-          {
-             ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STATE, dto.getState());
-             commands.add(command);
-          }
-       }
-
-       if (commands.size() > 0)
-       {
-          SequenceCommand sequenceCommand = new SequenceCommand(trn("Updating properties of up to {0} object", "Updating properties of up to {0} objects", commands.size(), commands.size()), commands);
-
-          // executes the commands and adds them to the undo/redo chains
-          Main.main.undoRedo.add(sequenceCommand);
-       }
-    }
-
-    private Collection<String> getPossibleStreets() {
-        /**
-         * Generates a list of all visible names of highways in order to do
-         * autocompletion on the road name.
-         */
-            final TreeSet<String> names = new TreeSet<String>();
-            for (OsmPrimitive osm : Main.main.getCurrentDataSet()
-                    .allNonDeletedPrimitives()) {
-                if (osm.getKeys() != null && osm.keySet().contains("highway")
-                        && osm.keySet().contains("name")) {
-                    names.add(osm.get("name"));
-                }
-            }
-            return names;
-        }
+         updateJOSMSelection(selection, dto);
+         saveDto(dto);
+      }
+      setVisible(false);
+   }
+
+   private String getAutoCompletingComboBoxValue(AutoCompletingComboBox box)
+   {
+      Object item = box.getSelectedItem();
+      if (item != null)
+      {
+         if (item instanceof String)
+         {
+            return (String) item;
+         }
+         if (item instanceof AutoCompletionListItem)
+         {
+            return ((AutoCompletionListItem) item).getValue();
+         }
+         return item.toString();
+      }
+      else
+      {
+         return "";
+      }
+   }
+
+   protected void saveDto(Dto dto)
+   {
+      File path = new File(pluginDir);
+      File fileName = new File(pluginDir + TagDialog.TEMPLATE_DATA);
+
+      try
+      {
+         path.mkdirs();
+
+         FileOutputStream file = new FileOutputStream(fileName);
+         ObjectOutputStream o = new ObjectOutputStream(file);
+         o.writeObject(dto);
+         o.close();
+      }
+      catch (Exception ex)
+      {
+         logger.log(Level.SEVERE, ex.getMessage());
+
+         if (fileName != null)
+         {
+            fileName.delete();
+         }
+      }
+   }
+
+   protected void updateJOSMSelection(OsmPrimitive selection, Dto dto)
+   {
+      ArrayList<Command> commands = new ArrayList<Command>();
+
+      if (dto.isSaveBuilding())
+      {
+         String value = selection.get(TagDialog.TAG_BUILDING);
+         if (value == null || (value != null && !value.equals(dto.getBuilding())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_BUILDING, dto.getBuilding());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSaveCity())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_CITY);
+         if (value == null || (value != null && !value.equals(dto.getCity())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_CITY, dto.getCity());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSaveCountry())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_COUNTRY);
+         if (value == null || (value != null && !value.equals(dto.getCountry())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_COUNTRY, dto.getCountry());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSaveHousenumber())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_HOUSENUMBER);
+         if (value == null || (value != null && !value.equals(dto.getHousenumber())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_HOUSENUMBER, dto.getHousenumber());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSavePostcode())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_POSTCODE);
+         if (value == null || (value != null && !value.equals(dto.getPostcode())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_POSTCODE, dto.getPostcode());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSaveStreet())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_STREET);
+         if (value == null || (value != null && !value.equals(dto.getStreet())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STREET, dto.getStreet());
+            commands.add(command);
+         }
+      }
+
+      if (dto.isSaveState())
+      {
+         String value = selection.get(TagDialog.TAG_ADDR_STATE);
+         if (value == null || (value != null && !value.equals(dto.getState())))
+         {
+            ChangePropertyCommand command = new ChangePropertyCommand(selection, TagDialog.TAG_ADDR_STATE, dto.getState());
+            commands.add(command);
+         }
+      }
+
+      if (commands.size() > 0)
+      {
+         SequenceCommand sequenceCommand = new SequenceCommand(trn("Updating properties of up to {0} object", "Updating properties of up to {0} objects", commands.size(), commands.size()), commands);
+
+         // executes the commands and adds them to the undo/redo chains
+         Main.main.undoRedo.add(sequenceCommand);
+      }
+   }
+
+   private Collection<String> getPossibleStreets()
+   {
+      /**
+       * Generates a list of all visible names of highways in order to do autocompletion on the road name.
+       */
+      TreeSet<String> names = new TreeSet<String>();
+      for (OsmPrimitive osm : Main.main.getCurrentDataSet().allNonDeletedPrimitives())
+      {
+         if (osm.getKeys() != null && osm.keySet().contains("highway") && osm.keySet().contains("name"))
+         {
+            names.add(osm.get("name"));
+         }
+      }
+      return names;
+   }
 
    private Dto loadDto()
@@ -437,8 +476,8 @@
       Dto dto = new Dto();
       File fileName = new File(pluginDir + TagDialog.TEMPLATE_DATA);
-      
+
       try
       {
-        
+
          if (fileName.exists())
          {
@@ -451,10 +490,10 @@
          else
          {
-        	 dto.setCity(selection.get(TagDialog.TAG_ADDR_CITY));
-        	 dto.setCountry(selection.get(TagDialog.TAG_ADDR_COUNTRY)); 
-        	 dto.setHousenumber(selection.get(TagDialog.TAG_ADDR_HOUSENUMBER));
-        	 dto.setPostcode(selection.get(TagDialog.TAG_ADDR_POSTCODE));
-        	 dto.setStreet(selection.get(TagDialog.TAG_ADDR_STREET));
-        	 dto.setState(selection.get(TagDialog.TAG_ADDR_STATE));
+            dto.setCity(selection.get(TagDialog.TAG_ADDR_CITY));
+            dto.setCountry(selection.get(TagDialog.TAG_ADDR_COUNTRY));
+            dto.setHousenumber(selection.get(TagDialog.TAG_ADDR_HOUSENUMBER));
+            dto.setPostcode(selection.get(TagDialog.TAG_ADDR_POSTCODE));
+            dto.setStreet(selection.get(TagDialog.TAG_ADDR_STREET));
+            dto.setState(selection.get(TagDialog.TAG_ADDR_STATE));
          }
 
@@ -464,6 +503,6 @@
          logger.log(Level.SEVERE, ex.getMessage());
          if (fileName != null)
-         {  
-       	  	fileName.delete();
+         {
+            fileName.delete();
          }
       }
