Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 7091)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java	(revision 7092)
@@ -50,7 +50,7 @@
 /**
  * ChildRelationBrowser is a UI component which provides a tree-like view on the hierarchical
- * structure of relations
+ * structure of relations.
  *
- *
+ * @since 1828
  */
 public class ChildRelationBrowser extends JPanel {
@@ -278,27 +278,11 @@
     }
 
-    /**
-     * The asynchronous task for downloading relation members.
-     *
-     *
-     */
-    class DownloadAllChildrenTask extends PleaseWaitRunnable {
-        private boolean canceled;
-        private int conflictsCount;
-        private Exception lastException;
-        private Relation relation;
-        private Stack<Relation> relationsToDownload;
-        private Set<Long> downloadedRelationIds;
-
-        public DownloadAllChildrenTask(Dialog parent, Relation r) {
-            super(tr("Download relation members"), new PleaseWaitProgressMonitor(parent), false /*
-             * don't
-             * ignore
-             * exception
-             */);
-            this.relation = r;
-            relationsToDownload = new Stack<>();
-            downloadedRelationIds = new HashSet<>();
-            relationsToDownload.push(this.relation);
+    abstract class DownloadTask extends PleaseWaitRunnable {
+        protected boolean canceled;
+        protected int conflictsCount;
+        protected Exception lastException;
+
+        public DownloadTask(String title, Dialog parent) {
+            super(title, new PleaseWaitProgressMonitor(parent), false);
         }
 
@@ -337,4 +321,21 @@
                 );
             }
+        }
+    }
+
+    /**
+     * The asynchronous task for downloading relation members.
+     */
+    class DownloadAllChildrenTask extends DownloadTask {
+        private final Relation relation;
+        private final Stack<Relation> relationsToDownload;
+        private final Set<Long> downloadedRelationIds;
+
+        public DownloadAllChildrenTask(Dialog parent, Relation r) {
+            super(tr("Download relation members"), parent);
+            this.relation = r;
+            relationsToDownload = new Stack<>();
+            downloadedRelationIds = new HashSet<>();
+            relationsToDownload.push(this.relation);
         }
 
@@ -439,53 +440,10 @@
      * The asynchronous task for downloading a set of relations
      */
-    class DownloadRelationSetTask extends PleaseWaitRunnable {
-        private boolean canceled;
-        private int conflictsCount;
-        private Exception lastException;
-        private Set<Relation> relations;
+    class DownloadRelationSetTask extends DownloadTask {
+        private final Set<Relation> relations;
 
         public DownloadRelationSetTask(Dialog parent, Set<Relation> relations) {
-            super(tr("Download relation members"), new PleaseWaitProgressMonitor(parent), false /*
-             * don't
-             * ignore
-             * exception
-             */);
+            super(tr("Download relation members"), parent);
             this.relations = relations;
-        }
-
-        @Override
-        protected void cancel() {
-            canceled = true;
-            OsmApi.getOsmApi().cancel();
-        }
-
-        protected void refreshView(Relation relation){
-            for (int i=0; i < childTree.getRowCount(); i++) {
-                Relation reference = (Relation)childTree.getPathForRow(i).getLastPathComponent();
-                if (reference == relation) {
-                    model.refreshNode(childTree.getPathForRow(i));
-                }
-            }
-        }
-
-        @Override
-        protected void finish() {
-            if (canceled)
-                return;
-            if (lastException != null) {
-                ExceptionDialogUtil.explainException(lastException);
-                return;
-            }
-
-            if (conflictsCount > 0) {
-                JOptionPane.showMessageDialog(
-                        Main.parent,
-                        trn("There was {0} conflict during import.",
-                                "There were {0} conflicts during import.",
-                                conflictsCount, conflictsCount),
-                                trn("Conflict in data", "Conflicts in data", conflictsCount),
-                                JOptionPane.WARNING_MESSAGE
-                );
-            }
         }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7091)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 7092)
@@ -698,4 +698,30 @@
     }
 
+    private static void prepareFileChooser(String url, JFileChooser fc) {
+        if (url == null || url.trim().length() == 0) return;
+        URL sourceUrl = null;
+        try {
+            sourceUrl = new URL(url);
+        } catch(MalformedURLException e) {
+            File f = new File(url);
+            if (f.isFile()) {
+                f = f.getParentFile();
+            }
+            if (f != null) {
+                fc.setCurrentDirectory(f);
+            }
+            return;
+        }
+        if (sourceUrl.getProtocol().startsWith("file")) {
+            File f = new File(sourceUrl.getPath());
+            if (f.isFile()) {
+                f = f.getParentFile();
+            }
+            if (f != null) {
+                fc.setCurrentDirectory(f);
+            }
+        }
+    }
+
     protected class EditSourceEntryDialog extends ExtendedDialog {
 
@@ -765,30 +791,4 @@
                 putValue(SMALL_ICON, ImageProvider.get("open"));
                 putValue(SHORT_DESCRIPTION, tr("Launch a file chooser to select a file"));
-            }
-
-            protected void prepareFileChooser(String url, JFileChooser fc) {
-                if (url == null || url.trim().length() == 0) return;
-                URL sourceUrl = null;
-                try {
-                    sourceUrl = new URL(url);
-                } catch(MalformedURLException e) {
-                    File f = new File(url);
-                    if (f.isFile()) {
-                        f = f.getParentFile();
-                    }
-                    if (f != null) {
-                        fc.setCurrentDirectory(f);
-                    }
-                    return;
-                }
-                if (sourceUrl.getProtocol().startsWith("file")) {
-                    File f = new File(sourceUrl.getPath());
-                    if (f.isFile()) {
-                        f = f.getParentFile();
-                    }
-                    if (f != null) {
-                        fc.setCurrentDirectory(f);
-                    }
-                }
             }
 
@@ -1501,30 +1501,4 @@
             }
 
-            protected void prepareFileChooser(String url, JFileChooser fc) {
-                if (url == null || url.trim().length() == 0) return;
-                URL sourceUrl = null;
-                try {
-                    sourceUrl = new URL(url);
-                } catch(MalformedURLException e) {
-                    File f = new File(url);
-                    if (f.isFile()) {
-                        f = f.getParentFile();
-                    }
-                    if (f != null) {
-                        fc.setCurrentDirectory(f);
-                    }
-                    return;
-                }
-                if (sourceUrl.getProtocol().startsWith("file")) {
-                    File f = new File(sourceUrl.getPath());
-                    if (f.isFile()) {
-                        f = f.getParentFile();
-                    }
-                    if (f != null) {
-                        fc.setCurrentDirectory(f);
-                    }
-                }
-            }
-
             @Override
             public void actionPerformed(ActionEvent e) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7091)
+++ /trunk/src/org/openstreetmap/josm/io/OsmServerBackreferenceReader.java	(revision 7092)
@@ -22,6 +22,5 @@
  * OsmServerBackreferenceReader fetches the primitives from the OSM server which
  * refer to a specific primitive. For a {@link org.openstreetmap.josm.data.osm.Node Node}, ways and relations are retrieved
- * which refer to the node. For a {@link Way} or a {@link Relation}, only relations are
- * read.
+ * which refer to the node. For a {@link Way} or a {@link Relation}, only relations are read.
  *
  * OsmServerBackreferenceReader uses the API calls <code>[node|way|relation]/#id/relations</code>
@@ -32,5 +31,5 @@
  * to complete incomplete primitives.
  *
- *
+ * @since 1806
  */
 public class OsmServerBackreferenceReader extends OsmServerReader {
@@ -123,22 +122,15 @@
     }
 
-    /**
-     * Reads referring ways from the API server and replies them in a {@link DataSet}
-     *
-     * @return the data set
-     * @throws OsmTransferException
-     */
-    protected DataSet getReferringWays(ProgressMonitor progressMonitor) throws OsmTransferException {
+    private DataSet getReferringPrimitives(ProgressMonitor progressMonitor, String type, String message) throws OsmTransferException {
         progressMonitor.beginTask(null, 2);
         try {
-            progressMonitor.indeterminateSubTask(tr("Downloading from OSM Server..."));
+            progressMonitor.subTask(tr("Contacting OSM Server..."));
             StringBuilder sb = new StringBuilder();
-            sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/ways");
+            sb.append(primitiveType.getAPIName()).append("/").append(id).append(type);
 
             try (InputStream in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true))) {
                 if (in == null)
                     return null;
-                progressMonitor.subTask(tr("Downloading referring ways ..."));
+                progressMonitor.subTask(message);
                 return OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, true));
             }
@@ -156,4 +148,14 @@
 
     /**
+     * Reads referring ways from the API server and replies them in a {@link DataSet}
+     *
+     * @return the data set
+     * @throws OsmTransferException
+     */
+    protected DataSet getReferringWays(ProgressMonitor progressMonitor) throws OsmTransferException {
+        return getReferringPrimitives(progressMonitor, "/ways", tr("Downloading referring ways ..."));
+    }
+
+    /**
      * Reads referring relations from the API server and replies them in a {@link DataSet}
      *
@@ -163,27 +165,5 @@
      */
     protected DataSet getReferringRelations(ProgressMonitor progressMonitor) throws OsmTransferException {
-        progressMonitor.beginTask(null, 2);
-        try {
-            progressMonitor.subTask(tr("Contacting OSM Server..."));
-            StringBuilder sb = new StringBuilder();
-            sb.append(primitiveType.getAPIName())
-            .append("/").append(id).append("/relations");
-
-            try (InputStream in = getInputStream(sb.toString(), progressMonitor.createSubTaskMonitor(1, true))) {
-                if (in == null)
-                    return null;
-                progressMonitor.subTask(tr("Downloading referring relations ..."));
-                return OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, true));
-            }
-        } catch(OsmTransferException e) {
-            throw e;
-        } catch (Exception e) {
-            if (cancel)
-                return null;
-            throw new OsmTransferException(e);
-        } finally {
-            progressMonitor.finishTask();
-            activeConnection = null;
-        }
+        return getReferringPrimitives(progressMonitor, "/relations", tr("Downloading referring relations ..."));
     }
 
