Index: applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.core.resources.prefs
===================================================================
--- applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.core.resources.prefs	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.core.resources.prefs	(revision 29727)
@@ -1,4 +1,4 @@
-#Mon Jul 20 22:01:52 CEST 2009
 eclipse.preferences.version=1
 encoding//src/org/openstreetmap/josm/plugins/czechaddress/StringUtils.java=UTF-8
 encoding//src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java=UTF-8
+encoding/<project>=UTF-8
Index: applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.jdt.core.prefs	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/.settings/org.eclipse.jdt.core.prefs	(revision 29727)
@@ -1,4 +1,8 @@
-#Thu Nov 05 21:57:41 CET 2009
 eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
@@ -8,5 +12,84 @@
 org.eclipse.jdt.core.compiler.debug.localVariable=generate
 org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
 org.eclipse.jdt.core.compiler.source=1.6
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 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 29727)
@@ -26,4 +26,5 @@
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -163,5 +164,5 @@
         ManagerDialog dialog = new ManagerDialog();
         if (dialog.countAutomaticRenameProposals() > 0)
-            dialog.setVisible(true);
+            dialog.showDialog();
     }
 
@@ -192,10 +193,14 @@
     public void pluginStatusChanged(int message) {
         if (message == MESSAGE_DATABASE_LOADED) {
-            czechMenu = Main.main.menu.addMenu(marktr("Adress"), KeyEvent.VK_Z, 4, ht("/Plugin/CzechAddress"));
-            menuItems.add(MainMenu.add(czechMenu, new PointManipulatorAction()));
-            menuItems.add(MainMenu.add(czechMenu, new GroupManipulatorAction()));
-            menuItems.add(MainMenu.add(czechMenu, new ConflictResolveAction()));
-            menuItems.add(MainMenu.add(czechMenu, new ManagerAction()));
-            menuItems.add(MainMenu.add(czechMenu, new HelpAction()));
+            GuiHelper.runInEDTAndWait(new Runnable() {
+                @Override public void run() {
+                    czechMenu = Main.main.menu.addMenu(marktr("Adress"), KeyEvent.VK_Z, 4, ht("/Plugin/CzechAddress"));
+                    menuItems.add(MainMenu.add(czechMenu, new PointManipulatorAction()));
+                    menuItems.add(MainMenu.add(czechMenu, new GroupManipulatorAction()));
+                    menuItems.add(MainMenu.add(czechMenu, new ConflictResolveAction()));
+                    menuItems.add(MainMenu.add(czechMenu, new ManagerAction()));
+                    menuItems.add(MainMenu.add(czechMenu, new HelpAction()));
+                }
+            });
             return;
         }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ConflictResolveAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ConflictResolveAction.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ConflictResolveAction.java	(revision 29727)
@@ -3,4 +3,5 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin;
@@ -39,5 +40,5 @@
      */
     public void actionPerformed(ActionEvent e) {
-        ConflictResolver.getInstance().setVisible(true);
+        ConflictResolver.getInstance().showDialog();
     }
 }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/GroupManipulatorAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/GroupManipulatorAction.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/GroupManipulatorAction.java	(revision 29727)
@@ -1,5 +1,3 @@
 package org.openstreetmap.josm.plugins.czechaddress.actions;
-
-import org.openstreetmap.josm.plugins.czechaddress.gui.GroupManipulatorDialog;
 
 import java.awt.event.ActionEvent;
@@ -8,4 +6,5 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin;
+import org.openstreetmap.josm.plugins.czechaddress.gui.GroupManipulatorDialog;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -41,5 +40,5 @@
     public void actionPerformed(ActionEvent e) {
         if (CzechAddressPlugin.getLocation() == null) return;
-        GroupManipulatorDialog.getInstence().setVisible(true);
+        GroupManipulatorDialog.getInstance().setVisible(true);
     }
 }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ManagerAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ManagerAction.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/ManagerAction.java	(revision 29727)
@@ -25,5 +25,5 @@
     @Override
 	public void actionPerformed(ActionEvent e) {
-        (new ManagerDialog()).setVisible(true);
+        new ManagerDialog().showDialog();
     }
 }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 29727)
@@ -52,6 +52,5 @@
         if (CzechAddressPlugin.getLocation() == null) return;
 
-        PointManipulatorDialog dialog = new PointManipulatorDialog(primitive);
-        dialog.setVisible(true);
+        new PointManipulatorDialog(primitive).showDialog();
     }
 }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 29727)
@@ -7,6 +7,6 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.LinkedList;
 
 import javax.swing.JOptionPane;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ConflictResolver.java	(revision 29727)
@@ -8,10 +8,12 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;
+
 import javax.swing.ComboBoxModel;
 import javax.swing.DefaultComboBoxModel;
-import javax.swing.event.ListDataListener;
 import javax.swing.Icon;
 import javax.swing.JButton;
 import javax.swing.event.ListDataEvent;
+import javax.swing.event.ListDataListener;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -23,7 +25,7 @@
 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.House;
 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.Street;
+import org.openstreetmap.josm.plugins.czechaddress.gui.utils.UniversalListRenderer;
 import org.openstreetmap.josm.plugins.czechaddress.intelligence.Reasoner;
 import org.openstreetmap.josm.plugins.czechaddress.intelligence.ReasonerListener;
-import org.openstreetmap.josm.plugins.czechaddress.gui.utils.UniversalListRenderer;
 import org.openstreetmap.josm.tools.ImageProvider;
 
@@ -218,5 +220,5 @@
             mainField.setSelectedIndex(index);
             mainField.repaint();
-            setVisible(true);
+            showDialog();
         }
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/FactoryDialog.java	(revision 29727)
@@ -1,5 +1,3 @@
 package org.openstreetmap.josm.plugins.czechaddress.gui;
-
-import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.Component;
@@ -21,4 +19,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 import org.openstreetmap.josm.plugins.czechaddress.CzechAddressPlugin;
 import org.openstreetmap.josm.plugins.czechaddress.MapUtils;
@@ -88,5 +87,9 @@
 
         if (message == MESSAGE_DATABASE_LOADED) {
-            relocateButton.setEnabled(true);
+            GuiHelper.runInEDTAndWait(new Runnable() {
+                @Override public void run() {
+                    relocateButton.setEnabled(true);
+                }
+            });
             return;
         }
@@ -95,9 +98,13 @@
             DataSet.addSelectionListener(this);
 
-            streetModel.setParent(CzechAddressPlugin.getLocation());
-            relocateButton.setText("Změnit místo");
-            streetComboBox.setEnabled(true);
-            houseList.setEnabled(true);
-            keepOddityCheckBox.setEnabled(true);
+            GuiHelper.runInEDTAndWait(new Runnable() {
+                @Override public void run() {
+                streetModel.setParent(CzechAddressPlugin.getLocation());
+                relocateButton.setText("Změnit místo");
+                streetComboBox.setEnabled(true);
+                houseList.setEnabled(true);
+                keepOddityCheckBox.setEnabled(true);
+                }
+            });
             return;
         }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/GroupManipulatorDialog.java	(revision 29727)
@@ -33,5 +33,5 @@
 
     private static GroupManipulatorDialog singleton = null;
-    public static GroupManipulatorDialog getInstence() {
+    public static GroupManipulatorDialog getInstance() {
         if (singleton == null)
             singleton = new GroupManipulatorDialog();
@@ -57,4 +57,6 @@
         setContent(mainPanel);
         setButtonIcons(new String[] {"ok.png", "cancel.png"});
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
         setDefaultCloseOperation(DISPOSE_ON_CLOSE);
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 29727)
@@ -41,6 +41,5 @@
 
     public static ElementWithStreets selectLocation() {
-        LocationSelector ls = new LocationSelector();
-        ls.setVisible(true);
+        LocationSelector ls = (LocationSelector) new LocationSelector().showDialog();
 
         if (ls.getValue() == 1)
@@ -58,4 +57,5 @@
         setButtonIcons(new String[] {"ok.png", "cancel.png"});
         setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 29727)
@@ -74,4 +74,6 @@
         setContent(mainPanel);
         setButtonIcons(new String[] {"ok.png", "cancel.png"});
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
     }
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 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 29727)
@@ -82,4 +82,6 @@
         setContent(mainPanel, false);
         setButtonIcons(new String[] { "ok.png", "cancel.png" });
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
         setDefaultCloseOperation(DISPOSE_ON_CLOSE);
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/EditorFactory.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/EditorFactory.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/EditorFactory.java	(revision 29727)
@@ -31,6 +31,5 @@
 
     public static boolean editStreet(Street street) {
-        StreetEditor dialog = new StreetEditor(street);
-        dialog.setVisible(true);
+        StreetEditor dialog = (StreetEditor) new StreetEditor(street).showDialog();
         if (dialog.getValue() == 1) {
             Reasoner r = Reasoner.getInstance();
@@ -49,6 +48,5 @@
 
     public static boolean editHouse(House house) {
-        HouseEditor dialog = new HouseEditor(house);
-        dialog.setVisible(true);
+        HouseEditor dialog = (HouseEditor) new HouseEditor(house).showDialog();
         if (dialog.getValue() == 1) {
             Reasoner r = Reasoner.getInstance();
@@ -66,6 +64,5 @@
 
     public static boolean editSuburb(Suburb suburb) {
-        SuburbEditor dialog = new SuburbEditor(suburb);
-        dialog.setVisible(true);
+        SuburbEditor dialog = (SuburbEditor) new SuburbEditor(suburb).showDialog();
         if (dialog.getValue() == 1) {
             suburb.setName(dialog.getSuburbName());
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/HouseEditor.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/HouseEditor.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/HouseEditor.java	(revision 29727)
@@ -36,4 +36,6 @@
         setContent(mainPanel);
         this.setButtonIcons(new String[] {"ok.png", "cancel.png"});
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/StreetEditor.java	(revision 29727)
@@ -2,7 +2,7 @@
 
 import javax.swing.DefaultComboBoxModel;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.ExtendedDialog;
-import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.AddressElement;
 import org.openstreetmap.josm.plugins.czechaddress.addressdatabase.House;
@@ -47,4 +47,6 @@
         setContent(mainPanel);
         this.setButtonIcons(new String[] {"ok.png", "cancel.png"});
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java	(revision 29726)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/databaseeditors/SuburbEditor.java	(revision 29727)
@@ -2,4 +2,5 @@
 
 import javax.swing.DefaultComboBoxModel;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.ExtendedDialog;
@@ -55,4 +56,6 @@
         setContent(mainPanel);
         this.setButtonIcons(new String[] {"ok.png", "cancel.png"});
+        setDefaultButton(1);
+        setCancelButton(2);
         setupDialog();
     }
