Ticket #6683: patch.diff
| File patch.diff, 9.7 KB (added by , 15 years ago) |
|---|
-
src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
### Eclipse Workspace Patch 1.0 #P JOSM
112 112 tr("Load relation"), 113 113 new PleaseWaitProgressMonitor( 114 114 dialog 115 ),116 false /* don't ignore exceptions */117 );115 ), 116 false /* don't ignore exceptions */ 117 ); 118 118 this.relation = relation; 119 119 this.path = path; 120 120 } … … 144 144 model.refreshNode(path); 145 145 } 146 146 } 147 );147 ); 148 148 } 149 149 150 150 @Override … … 155 155 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 156 156 } catch(Exception e) { 157 157 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())); 159 159 return; 160 160 } 161 161 this.lastException = e; -
src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
133 133 msg, 134 134 tr("Error"), 135 135 JOptionPane.ERROR_MESSAGE 136 );136 ); 137 137 } 138 138 139 139 @Override … … 176 176 getLayer().onPostDownloadFromServer(); 177 177 } 178 178 } 179 );179 ); 180 180 181 181 if (visitor.getConflicts().isEmpty()) 182 182 return; … … 187 187 visitor.getConflicts().size()), 188 188 tr("Warning"), 189 189 JOptionPane.WARNING_MESSAGE 190 );190 ); 191 191 } 192 192 } catch(Exception e) { 193 193 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())); 195 195 return; 196 196 } 197 197 lastException = e; -
src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
328 328 conflictsCount, conflictsCount), 329 329 trn("Conflict in data", "Conflicts in data", conflictsCount), 330 330 JOptionPane.WARNING_MESSAGE 331 );331 ); 332 332 } 333 333 } 334 334 … … 343 343 + "{0}<br>" 344 344 + "is deleted on the server. It cannot be loaded</html>", 345 345 r.getDisplayName(DefaultNameFormatter.getInstance()) 346 );346 ); 347 347 348 348 JOptionPane.showMessageDialog( 349 349 Main.parent, 350 350 message, 351 351 tr("Relation is deleted"), 352 352 JOptionPane.WARNING_MESSAGE 353 );353 ); 354 354 } 355 355 356 356 /** … … 415 415 } 416 416 } catch (Exception e) { 417 417 if (cancelled) { 418 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e418 System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e 419 419 .toString())); 420 420 return; 421 421 } … … 474 474 conflictsCount, conflictsCount), 475 475 trn("Conflict in data", "Conflicts in data", conflictsCount), 476 476 JOptionPane.WARNING_MESSAGE 477 );477 ); 478 478 } 479 479 } 480 480 … … 508 508 } 509 509 } catch (Exception e) { 510 510 if (cancelled) { 511 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e511 System.out.println(tr("Warning: ignoring exception because task wass cancelled. Exception: {0}", e 512 512 .toString())); 513 513 return; 514 514 } -
src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
83 83 } 84 84 DataSet dataSet = objectReader.parseOsm( 85 85 getProgressMonitor().createSubTaskMonitor(0, false) 86 );86 ); 87 87 if (dataSet == null) 88 88 return; 89 89 synchronized (this) { … … 103 103 Main.map.repaint(); 104 104 } 105 105 } 106 );106 ); 107 107 } catch (Exception e) { 108 108 if (cancelled) { 109 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e109 System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e 110 110 .toString())); 111 111 return; 112 112 } -
src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
40 40 41 41 public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer, Dialog dialog) { 42 42 super(tr("Download relation members"), new PleaseWaitProgressMonitor(dialog), false /* don't ignore exception */); 43 if(parent != null) 43 if(parent != null) { 44 44 this.parents.add(parent); 45 } 45 46 this.children = children; 46 47 this.curLayer = curLayer; 47 48 } 48 49 49 50 public DownloadRelationMemberTask(Relation parent, Collection<OsmPrimitive> children, OsmDataLayer curLayer) { 50 51 super(tr("Download relation members"), false /* don't ignore exception */); 51 if(parent != null) 52 if(parent != null) { 52 53 this.parents.add(parent); 54 } 53 55 this.children = children; 54 56 this.curLayer = curLayer; 55 57 } … … 90 92 } 91 93 92 94 protected String buildDownloadFeedbackMessage() { 93 if (parents.size() == 0) {95 if (parents.size() == 0) 94 96 return trn("Downloading {0} incomplete object", 95 97 "Downloading {0} incomplete objects", 96 98 children.size(), 97 99 children.size()); 98 }else if (parents.size() == 1) {100 else if (parents.size() == 1) { 99 101 Relation parent = parents.iterator().next(); 100 102 return trn("Downloading {0} incomplete child of relation ''{1}''", 101 103 "Downloading {0} incomplete children of relation ''{1}''", 102 104 children.size(), 103 105 children.size(), 104 106 parent.getDisplayName(DefaultNameFormatter.getInstance())); 105 } else {107 } else 106 108 return trn("Downloading {0} incomplete child of {1} parent relations", 107 109 "Downloading {0} incomplete children of {1} parent relations", 108 110 children.size(), 109 111 children.size(), 110 112 parents.size()); 111 }112 113 } 113 114 114 115 @Override … … 121 122 objectReader.append(children); 122 123 progressMonitor.indeterminateSubTask( 123 124 buildDownloadFeedbackMessage() 124 );125 ); 125 126 final DataSet dataSet = objectReader.parseOsm(progressMonitor 126 127 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 127 128 if (dataSet == null) … … 139 140 curLayer.onPostDownloadFromServer(); 140 141 } 141 142 } 142 );143 ); 143 144 144 145 } catch (Exception e) { 145 146 if (cancelled) { 146 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e147 System.out.println(tr("Warning: ignoring exception because task was cancelled. Exception: {0}", e 147 148 .toString())); 148 149 return; 149 150 }
