Ticket #6683: patch.diff

File patch.diff, 9.7 KB (added by Casiope, 15 years ago)
  • src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java

    ### Eclipse Workspace Patch 1.0
    #P JOSM
     
    112112                    tr("Load relation"),
    113113                    new PleaseWaitProgressMonitor(
    114114                            dialog
    115                     ),
    116                     false /* don't ignore exceptions */
    117             );
     115                            ),
     116                            false /* don't ignore exceptions */
     117                    );
    118118            this.relation = relation;
    119119            this.path = path;
    120120        }
     
    144144                            model.refreshNode(path);
    145145                        }
    146146                    }
    147             );
     147                    );
    148148        }
    149149
    150150        @Override
     
    155155                        .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
    156156            } catch(Exception e) {
    157157                if (cancelled) {
    158                     System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception was: {0}", e.toString()));
     158                    System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e.toString()));
    159159                    return;
    160160                }
    161161                this.lastException = e;
  • src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java

     
    133133                msg,
    134134                tr("Error"),
    135135                JOptionPane.ERROR_MESSAGE
    136         );
     136                );
    137137    }
    138138
    139139    @Override
     
    176176                                getLayer().onPostDownloadFromServer();
    177177                            }
    178178                        }
    179                 );
     179                        );
    180180
    181181                if (visitor.getConflicts().isEmpty())
    182182                    return;
     
    187187                                visitor.getConflicts().size()),
    188188                                tr("Warning"),
    189189                                JOptionPane.WARNING_MESSAGE
    190                 );
     190                        );
    191191            }
    192192        } catch(Exception e) {
    193193            if (cancelled) {
    194                 System.out.println(tr("Warning: Ignoring exception because task is cancelled. Exception: {0}", e.toString()));
     194                System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e.toString()));
    195195                return;
    196196            }
    197197            lastException = e;
  • src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java

     
    328328                                conflictsCount, conflictsCount),
    329329                                trn("Conflict in data", "Conflicts in data", conflictsCount),
    330330                                JOptionPane.WARNING_MESSAGE
    331                 );
     331                        );
    332332            }
    333333        }
    334334
     
    343343                    + "{0}<br>"
    344344                    + "is deleted on the server. It cannot be loaded</html>",
    345345                    r.getDisplayName(DefaultNameFormatter.getInstance())
    346             );
     346                    );
    347347
    348348            JOptionPane.showMessageDialog(
    349349                    Main.parent,
    350350                    message,
    351351                    tr("Relation is deleted"),
    352352                    JOptionPane.WARNING_MESSAGE
    353             );
     353                    );
    354354        }
    355355
    356356        /**
     
    415415                }
    416416            } catch (Exception e) {
    417417                if (cancelled) {
    418                     System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e
     418                    System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e
    419419                            .toString()));
    420420                    return;
    421421                }
     
    474474                                conflictsCount, conflictsCount),
    475475                                trn("Conflict in data", "Conflicts in data", conflictsCount),
    476476                                JOptionPane.WARNING_MESSAGE
    477                 );
     477                        );
    478478            }
    479479        }
    480480
     
    508508                }
    509509            } catch (Exception e) {
    510510                if (cancelled) {
    511                     System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e
     511                    System.out.println(tr("Warning: ignoring exception because task wass cancelled. Exception: {0}", e
    512512                            .toString()));
    513513                    return;
    514514                }
  • src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java

     
    8383                }
    8484                DataSet dataSet = objectReader.parseOsm(
    8585                        getProgressMonitor().createSubTaskMonitor(0, false)
    86                 );
     86                        );
    8787                if (dataSet == null)
    8888                    return;
    8989                synchronized (this) {
     
    103103                            Main.map.repaint();
    104104                        }
    105105                    }
    106             );
     106                    );
    107107        } catch (Exception e) {
    108108            if (cancelled) {
    109                 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e
     109                System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e
    110110                        .toString()));
    111111                return;
    112112            }
  • src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java

     
    4040
    4141    public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer, Dialog dialog) {
    4242        super(tr("Download relation members"), new PleaseWaitProgressMonitor(dialog), false /* don't ignore exception */);
    43         if(parent != null)
     43        if(parent != null) {
    4444            this.parents.add(parent);
     45        }
    4546        this.children = children;
    4647        this.curLayer = curLayer;
    4748    }
    4849
    4950    public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer) {
    5051        super(tr("Download relation members"), false /* don't ignore exception */);
    51         if(parent != null)
     52        if(parent != null) {
    5253            this.parents.add(parent);
     54        }
    5355        this.children = children;
    5456        this.curLayer = curLayer;
    5557    }
     
    9092    }
    9193
    9294    protected String buildDownloadFeedbackMessage() {
    93         if (parents.size() == 0) {
     95        if (parents.size() == 0)
    9496            return trn("Downloading {0} incomplete object",
    9597                    "Downloading {0} incomplete objects",
    9698                    children.size(),
    9799                    children.size());
    98         } else if (parents.size() == 1) {
     100        else if (parents.size() == 1) {
    99101            Relation parent = parents.iterator().next();
    100102            return trn("Downloading {0} incomplete child of relation ''{1}''",
    101103                    "Downloading {0} incomplete children of relation ''{1}''",
    102104                    children.size(),
    103105                    children.size(),
    104106                    parent.getDisplayName(DefaultNameFormatter.getInstance()));
    105         } else {
     107        } else
    106108            return trn("Downloading {0} incomplete child of {1} parent relations",
    107109                    "Downloading {0} incomplete children of  {1} parent relations",
    108110                    children.size(),
    109111                    children.size(),
    110112                    parents.size());
    111         }
    112113    }
    113114
    114115    @Override
     
    121122            objectReader.append(children);
    122123            progressMonitor.indeterminateSubTask(
    123124                    buildDownloadFeedbackMessage()
    124             );
     125                    );
    125126            final DataSet dataSet = objectReader.parseOsm(progressMonitor
    126127                    .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false));
    127128            if (dataSet == null)
     
    139140                            curLayer.onPostDownloadFromServer();
    140141                        }
    141142                    }
    142             );
     143                    );
    143144
    144145        } catch (Exception e) {
    145146            if (cancelled) {
    146                 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e
     147                System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e
    147148                        .toString()));
    148149                return;
    149150            }