Index: applications/editors/josm/plugins/czechaddress/build.xml
===================================================================
--- applications/editors/josm/plugins/czechaddress/build.xml	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/build.xml	(revision 15203)
@@ -34,6 +34,6 @@
             <attribute name="Author" value="Radomír Černoch"/>
             <attribute name="Plugin-Description" value="Creating and handling address nodes and buildings within Czech Republic."/>
-            <attribute name="Plugin-Mainversion" value="1566"/>
-            <attribute name="Plugin-Version" value="0.1"/>
+            <attribute name="Plugin-Mainversion" value="1607"/>
+            <attribute name="Plugin-Version" value="0.1.1"/>
             <attribute name="Plugin-Class" value="${plugin.basepackage}.CzechAddressPlugin"/>
         </manifest>
@@ -97,5 +97,5 @@
                 <pathelement path="${java.class.path}"/>
             </classpath>
-        <arg value="/home/radek/Desktop/Hustopeče.osm"/>
+        <!--<arg value="/home/radek/Desktop/Hustopeče.osm"/>-->
         </java>
     </target>
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 15203)
@@ -27,4 +27,5 @@
 import org.openstreetmap.josm.plugins.czechaddress.actions.ModifierAction;
 import org.openstreetmap.josm.plugins.czechaddress.actions.SplitAreaByEmptyWayAction;
+import org.openstreetmap.josm.plugins.czechaddress.gui.DatabaseModifier;
 import org.openstreetmap.josm.plugins.czechaddress.gui.FactoryDialog;
 import org.openstreetmap.josm.plugins.czechaddress.intelligence.Reasoner;
@@ -70,5 +71,5 @@
         final MvcrParser parser = new MvcrParser();
         //parser.setFilter(null, null, null, "");
-        parser.setFilter("HUSTOPEČE", "HUSTOPEČE", null, null);
+        //parser.setFilter("HUSTOPEČE", "HUSTOPEČE", null, null);
         parser.setTargetDatabase(mainDatabase);
         parser.setStorageDir(pluginDir);
@@ -119,9 +120,6 @@
         for (House house : houses) pool.add(house);
 
-
-        /*Capitalizator cap = new Capitalizator(Main.ds.allPrimitives(),
-                                              location.getStreets());
-        for (Street s : cap.getClassifiedItems())
-            System.out.println(s.toString() + " --> " + cap.translate(s).getName());*/
+        // Update database according to the map
+        (new DatabaseModifier()).setVisible(true);
 
         // And add them to the reasoner.
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/AddressElement.java	(revision 15203)
@@ -40,4 +40,14 @@
             throw new NullPointerException("You must specify the name of this AddressElement");
         this.name = capitalize(name);
+    }
+
+    /**
+     * Sets the new name of this element.
+     *
+     * <p><b>NOTE:</b> Unlike in the default constructor, the name is <b>not</b>
+     * capitalized.</p>
+     */
+    public void setName(String newName) {
+        name = newName;
     }
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/addressdatabase/House.java	(revision 15203)
@@ -199,5 +199,5 @@
         // If we have added any proposal so far, add the source info as well.
         if (props.size() > 0)
-            props.add(getListFieldDiff("source", prim.get("source:addr"), "mvcr:adresa"));
+            props.add(getListFieldDiff("source:addr", prim.get("source:addr"), "mvcr:adresa"));
 
         return props;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/DatabaseModifier.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/DatabaseModifier.java	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/DatabaseModifier.java	(revision 15203)
@@ -59,13 +59,9 @@
 
         streetTable.setModel(streetModel);
-        streetTable.setDefaultRenderer( Street.class,
-                                        new StreetRenderer());
+        streetTable.setDefaultRenderer( AddressElement.class,
+                                        new AddressElementRenderer());
 
         // And finalize initializing the form.
         setupDialog(mainPanel, new String[] { "ok.png", "cancel.png" });
-        setAlwaysOnTop(false);
-
-        // TODO: Why does it always crash if the modality is set in constructor?
-        setModal(false);
     }
 
@@ -73,4 +69,12 @@
     protected void buttonAction(ActionEvent evt) {
         super.buttonAction(evt);
+
+        if (getValue() == 1) {
+            assert streetModel.elems.size() == streetModel.names.size();
+            
+            for(int i=0; i<streetModel.elems.size(); i++)
+                streetModel.elems.get(i).setName(streetModel.names.get(i));
+        }
+
         setVisible(false);
     }
@@ -151,19 +155,14 @@
     // End of variables declaration//GEN-END:variables
 
-    private class StreetRenderer extends DefaultTableCellRenderer {
+    private class AddressElementRenderer extends DefaultTableCellRenderer {
+
+        public AddressElementRenderer() {}
 
         @Override
-        public Component getTableCellRendererComponent(JTable table,
-                Object value, boolean isSelected, boolean hasFocus,
-                int row, int column) {
-            Component c =  super.getTableCellRendererComponent(table, value,
-                    isSelected, hasFocus, row, column);
-
-            System.out.println("Tady som! " + value);
+        protected void setValue(Object value) {
+            super.setValue(value);
 
             if (value instanceof AddressElement)
                 setText(((AddressElement) value).getName() );
-
-            return c;
         }
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 15201)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 15203)
@@ -31,9 +31,13 @@
  * Dialog for adding/editing an address of a single primitive.
  *
+ * <p><b>TODO:</b> This dialog does not dispose and disconnect from
+ * message handling system after being closed. Reproduce: Create a node
+ * using this dialog, delete it and update reasoner.</p>
+ *
  * @author radomir.cernoch@gmail.com
  */
 public class PointManipulatorDialog extends ExtendedDialog implements StatusListener {
 
-    private Timer  updateMatchesTimes = null;
+    private Timer  updateMatchesTimer = null;
     private Action updateMatchesAction;
     private ProposalContainer proposalContainer;
@@ -88,4 +92,10 @@
         super.buttonAction(evt);
         if (getValue() == 1) {
+            
+            if (updateMatchesTimer.isRunning()) {
+                updateMatchesTimer.stop();
+                updateMatches();
+            }
+
             proposalContainer.applyAll();
 
@@ -291,10 +301,10 @@
 
     private void keyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_keyReleased
-        if (updateMatchesTimes != null)
-            updateMatchesTimes.stop();
-        
-        updateMatchesTimes = new Timer(300, updateMatchesAction);
-        updateMatchesTimes.setRepeats(false);
-        updateMatchesTimes.start();
+        if (updateMatchesTimer != null)
+            updateMatchesTimer.stop();
+        
+        updateMatchesTimer = new Timer(300, updateMatchesAction);
+        updateMatchesTimer.setRepeats(false);
+        updateMatchesTimer.start();
     }//GEN-LAST:event_keyReleased
 
