Changeset 4310 in josm
- Timestamp:
- 2011-08-11T00:26:21+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 70 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
r3083 r4310 75 75 private class DownloadOpenChangesetsTask extends PleaseWaitRunnable { 76 76 77 private boolean cancel led;77 private boolean canceled; 78 78 private OsmServerChangesetReader reader; 79 79 private List<Changeset> changesets; … … 92 92 @Override 93 93 protected void cancel() { 94 this.cancel led = true;94 this.canceled = true; 95 95 reader.cancel(); 96 96 } … … 105 105 } 106 106 ChangesetCache.getInstance().update(changesets); 107 if (!cancel led && lastException == null) {107 if (!canceled && lastException == null) { 108 108 onPostDownloadOpenChangesets(); 109 109 } … … 129 129 try { 130 130 userInfo = fetchUserInfo(); 131 if (cancel led)131 if (canceled) 132 132 return; 133 133 reader = new OsmServerChangesetReader(); … … 138 138 ); 139 139 } catch(Exception e) { 140 if (cancel led)140 if (canceled) 141 141 return; 142 142 lastException = e; … … 144 144 } 145 145 146 public boolean isCancel led() {147 return cancel led;146 public boolean isCanceled() { 147 return canceled; 148 148 } 149 149 -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r3510 r4310 226 226 if (!completeWayTags.isApplicableToPrimitive() || !parentRelations.isEmpty()) { 227 227 dialog.setVisible(true); 228 if (dialog.isCancel led())228 if (dialog.isCanceled()) 229 229 throw new UserCancelException(); 230 230 } -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r4045 r4310 366 366 if (!resolveTagConflicts(areas)) 367 367 return; 368 //user cancel led, do nothing.368 //user canceled, do nothing. 369 369 370 370 try { … … 570 570 if (!completeWayTags.isApplicableToPrimitive() || !parentRelations.isEmpty()) { 571 571 dialog.setVisible(true); 572 if (dialog.isCancel led())572 if (dialog.isCanceled()) 573 573 return false; 574 574 } -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r4045 r4310 248 248 if (! nodeTags.isApplicableToPrimitive() || relationToNodeReferences.size() > 1) { 249 249 dialog.setVisible(true); 250 if (dialog.isCancel led())250 if (dialog.isCanceled()) 251 251 return null; 252 252 } -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r4247 r4310 87 87 private List<File> successfullyOpenedFiles = new ArrayList<File>(); 88 88 private FileFilter fileFilter; 89 private boolean cancel led;89 private boolean canceled; 90 90 private boolean recordHistory = false; 91 91 … … 114 114 @Override 115 115 protected void cancel() { 116 this.cancel led = true;116 this.canceled = true; 117 117 } 118 118 … … 291 291 public void importData(FileImporter importer, List<File> files) { 292 292 if (importer.isBatchImporter()) { 293 if (cancel led) return;293 if (canceled) return; 294 294 String msg; 295 295 if (files.size() == 1) { … … 305 305 } else { 306 306 for (File f : files) { 307 if (cancel led) return;307 if (canceled) return; 308 308 getProgressMonitor().indeterminateSubTask(tr("Opening file ''{0}'' ...", f.getAbsolutePath())); 309 309 if (importer.importDataHandleExceptions(f, getProgressMonitor().createSubTaskMonitor(1, false))) { -
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r4045 r4310 77 77 gc.anchor = GridBagConstraints.FIRST_LINE_START; 78 78 all.add(new JLabel(tr("Enter URL to download:")), gc); 79 HistoryComboBox uploadAd resses = new HistoryComboBox();80 uploadAd resses.setToolTipText(tr("Enter an URL from where data should be downloaded"));81 restoreUploadAddressHistory(uploadAd resses);79 HistoryComboBox uploadAddresses = new HistoryComboBox(); 80 uploadAddresses.setToolTipText(tr("Enter an URL from where data should be downloaded")); 81 restoreUploadAddressHistory(uploadAddresses); 82 82 gc.gridy = 1; 83 all.add(uploadAd resses, gc);83 all.add(uploadAddresses, gc); 84 84 gc.gridy = 2; 85 85 gc.fill = GridBagConstraints.BOTH; … … 99 99 dialog.showDialog(); 100 100 if (dialog.getValue() != 1) return; 101 remindUploadAddressHistory(uploadAd resses);102 openUrl(layer.isSelected(), uploadAd resses.getText());101 remindUploadAddressHistory(uploadAddresses); 102 openUrl(layer.isSelected(), uploadAddresses.getText()); 103 103 } 104 104 -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
r4191 r4310 21 21 import org.openstreetmap.josm.io.OsmServerLocationReader; 22 22 import org.openstreetmap.josm.io.OsmServerReader; 23 import org.openstreetmap.josm.io.OsmTransferCancel ledException;23 import org.openstreetmap.josm.io.OsmTransferCanceledException; 24 24 import org.openstreetmap.josm.io.OsmTransferException; 25 25 import org.xml.sax.SAXException; … … 89 89 } catch(Exception e) { 90 90 if (isCanceled()) { 91 System.out.println(tr("Ignoring exception because download has been cancel led. Exception was: {0}", e.toString()));91 System.out.println(tr("Ignoring exception because download has been canceled. Exception was: {0}", e.toString())); 92 92 return; 93 93 } 94 if (e instanceof OsmTransferCancel ledException) {94 if (e instanceof OsmTransferCanceledException) { 95 95 setCanceled(true); 96 96 return; -
trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadReferrersTask.java
r4094 r4310 41 41 */ 42 42 public class DownloadReferrersTask extends PleaseWaitRunnable { 43 private boolean cancel led;43 private boolean canceled; 44 44 private Exception lastException; 45 45 private OsmServerReader reader; … … 61 61 super("Download referrers", false /* don't ignore exception*/); 62 62 CheckParameterUtil.ensureParameterNotNull(targetLayer, "targetLayer"); 63 cancel led = false;63 canceled = false; 64 64 this.children = new HashMap<Long, OsmPrimitiveType>(); 65 65 if (children != null) { … … 85 85 super("Download referrers", false /* don't ignore exception*/); 86 86 CheckParameterUtil.ensureParameterNotNull(targetLayer, "targetLayer"); 87 cancel led = false;87 canceled = false; 88 88 this.children = new HashMap<Long, OsmPrimitiveType>(); 89 89 if (children != null) { … … 115 115 throw new IllegalArgumentException(MessageFormat.format("Id > 0 required, got {0}", id)); 116 116 CheckParameterUtil.ensureParameterNotNull(type, "type"); 117 cancel led = false;117 canceled = false; 118 118 this.children = new HashMap<Long, OsmPrimitiveType>(); 119 119 this.children.put(id, type); … … 136 136 if (primitiveId.isNew()) 137 137 throw new IllegalArgumentException(MessageFormat.format("Cannot download referrers for new primitives (ID {0})", primitiveId.getUniqueId())); 138 cancel led = false;138 canceled = false; 139 139 this.children = new HashMap<Long, OsmPrimitiveType>(); 140 140 this.children.put(primitiveId.getUniqueId(), primitiveId.getType()); … … 145 145 @Override 146 146 protected void cancel() { 147 cancel led = true;147 canceled = true; 148 148 synchronized(this) { 149 149 if (reader != null) { … … 155 155 @Override 156 156 protected void finish() { 157 if (cancel led)157 if (canceled) 158 158 return; 159 159 if (lastException != null) { … … 227 227 int i=1; 228 228 for (Entry<Long, OsmPrimitiveType> entry: children.entrySet()) { 229 if (cancel led)229 if (canceled) 230 230 return; 231 231 String msg = ""; … … 240 240 } 241 241 } catch(Exception e) { 242 if (cancel led)242 if (canceled) 243 243 return; 244 244 lastException = e; -
trunk/src/org/openstreetmap/josm/actions/upload/ApiPreconditionCheckerHook.java
r3719 r4310 17 17 import org.openstreetmap.josm.io.OsmApi; 18 18 import org.openstreetmap.josm.io.OsmApiInitializationException; 19 import org.openstreetmap.josm.io.OsmTransferCancel ledException;19 import org.openstreetmap.josm.io.OsmTransferCanceledException; 20 20 21 21 public class ApiPreconditionCheckerHook implements UploadHook { … … 39 39 return false; 40 40 } 41 } catch(OsmTransferCancel ledException e){41 } catch(OsmTransferCanceledException e){ 42 42 return false; 43 43 } catch (OsmApiInitializationException e) { -
trunk/src/org/openstreetmap/josm/actions/upload/ValidateUploadHook.java
r4097 r4310 133 133 134 134 ExtendedDialog ed = new ExtendedDialog(Main.parent, 135 tr("Su picious data found. Upload anyway?"),135 tr("Suspicious data found. Upload anyway?"), 136 136 new String[] {tr("Continue upload"), tr("Cancel")}); 137 137 ed.setButtonIcons(new String[] {"ok.png", "cancel.png"}); -
trunk/src/org/openstreetmap/josm/data/Preferences.java
r4243 r4310 529 529 } catch(IOException e1) { 530 530 e1.printStackTrace(); 531 System.err.println(tr("Warning: Failed to initialize preferences. Failed to reset preference file to default: {0}", getPreferenceFile()));531 System.err.println(tr("Warning: Failed to initialize preferences. Failed to reset preference file to default: {0}", getPreferenceFile())); 532 532 } 533 533 } -
trunk/src/org/openstreetmap/josm/data/Version.java
r4259 r4310 110 110 } catch(NumberFormatException e) { 111 111 version = 0; 112 System.err.println(tr("Warning: unexpected JOSM version number in revis on file, value is ''{0}''", value));112 System.err.println(tr("Warning: unexpected JOSM version number in revision file, value is ''{0}''", value)); 113 113 } 114 114 } else { -
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r4126 r4310 736 736 if (result == null) { 737 737 System.out.println(tr("JOSM expected to find primitive [{0} {1}] in dataset but it is not there. Please report this " 738 + " at http://josm.openstreetmap.de. This is not a critical error, it should be safe to continue in your work.",738 + "at http://josm.openstreetmap.de/. This is not a critical error, it should be safe to continue in your work.", 739 739 primitiveId.getType(), Long.toString(primitiveId.getUniqueId()))); 740 740 new Exception().printStackTrace(); -
trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/MapRendererFactory.java
r4196 r4310 39 39 public class MapRendererFactory { 40 40 41 /** preference key for the therenderer class name. Default: class name for {@link StyledMapRenderer}41 /** preference key for the renderer class name. Default: class name for {@link StyledMapRenderer} 42 42 * 43 43 */ -
trunk/src/org/openstreetmap/josm/data/validation/Test.java
r4059 r4310 217 217 } 218 218 219 public boolean isCancel led() {220 return progressMonitor.isCancel led();219 public boolean isCanceled() { 220 return progressMonitor.isCanceled(); 221 221 } 222 222 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
r4073 r4310 102 102 map.put(en, s.w); 103 103 } 104 if(isCancel led())104 if(isCanceled()) 105 105 return; 106 106 } … … 114 114 map.clear(); 115 115 for (MyWaySegment s : ways) { 116 if(isCancel led())116 if(isCanceled()) 117 117 return; 118 118 for (Node en : s.nearbyNodes(mindist)) { … … 134 134 map.clear(); 135 135 for (MyWaySegment s : ways) { 136 if(isCancel led())136 if(isCanceled()) 137 137 return; 138 138 for (Node en : s.nearbyNodes(minmiddledist)) { … … 154 154 for (MyWaySegment s : ways) { 155 155 for (Node en : s.nearbyNodes(minmiddledist)) { 156 if(isCancel led())156 if(isCanceled()) 157 157 return; 158 158 if (!othernodes.contains(en)) { -
trunk/src/org/openstreetmap/josm/gui/PleaseWaitRunnable.java
r4191 r4310 23 23 */ 24 24 public abstract class PleaseWaitRunnable implements Runnable, CancelListener { 25 private boolean cancel led = false;25 private boolean canceled = false; 26 26 private boolean ignoreException; 27 27 private final String title; … … 113 113 114 114 public final void run() { 115 if (cancel led)115 if (canceled) 116 116 return; // since realRun isn't executed, do not call to finish 117 117 -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r3720 r4310 435 435 HtmlPanel msg = new HtmlPanel(); 436 436 msg.setText(tr("<html>Alternatively you may enter a <strong>tile address</strong> for a single tile " 437 + "in the format <i>zoomlevel/x/y</i>, i.e. <i>15/256/223</i>. Tile ad resses "437 + "in the format <i>zoomlevel/x/y</i>, i.e. <i>15/256/223</i>. Tile addresses " 438 438 + "in the format <i>zoom,x,y</i> or <i>zoom;x;y</i> are valid too.</html>")); 439 439 pnl.add(msg); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r4191 r4310 284 284 gc.gridy = 0; 285 285 lblMergedVersion = new JLabel(tr("Merged version")); 286 lblMergedVersion.setToolTipText(tr("List of merged elements. They will replace the my elements when the merge decisions are applied."));286 lblMergedVersion.setToolTipText(tr("List of merged elements. They will replace the list of my elements when the merge decisions are applied.")); 287 287 add(lblMergedVersion, gc); 288 288 -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
r4116 r4310 23 23 /** 24 24 * This is the model for resolving conflicts in the properties of the 25 * {@see OsmPrimitive}s. In particular, it represents conflicts in the coordi ates of {@see Node}s and25 * {@see OsmPrimitive}s. In particular, it represents conflicts in the coordinates of {@see Node}s and 26 26 * the deleted or visible state of {@see OsmPrimitive}s. 27 27 * -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
r4162 r4310 394 394 public KeepMyCoordinatesAction() { 395 395 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeepmine")); 396 putValue(Action.SHORT_DESCRIPTION, tr("Keep my coordi ates"));396 putValue(Action.SHORT_DESCRIPTION, tr("Keep my coordinates")); 397 397 } 398 398 … … 409 409 public KeepTheirCoordinatesAction() { 410 410 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs/conflict", "tagkeeptheir")); 411 putValue(Action.SHORT_DESCRIPTION, tr("Keep their coordi ates"));411 putValue(Action.SHORT_DESCRIPTION, tr("Keep their coordinates")); 412 412 } 413 413 -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/CombinePrimitiveResolverDialog.java
r3719 r4310 66 66 * merged to, see {@see #setTargetPrimitive(OsmPrimitive)}. 67 67 * 68 * After the dialog is closed use {@see #isCancel led()} to check whether the user canceled68 * After the dialog is closed use {@see #isCanceled()} to check whether the user canceled 69 69 * the dialog. If it wasn't canceled you may build a collection of {@see Command} objects 70 70 * which reflect the conflict resolution decisions the user made in the dialog: … … 93 93 private TagConflictResolver pnlTagConflictResolver; 94 94 private RelationMemberConflictResolver pnlRelationMemberConflictResolver; 95 private boolean cancel led;95 private boolean canceled; 96 96 private JPanel pnlButtons; 97 97 private OsmPrimitive targetPrimitive; … … 318 318 } 319 319 320 protected void setCancel led(boolean cancelled) {321 this.cancel led = cancelled;322 } 323 324 public boolean isCancel led() {325 return cancel led;320 protected void setCanceled(boolean canceled) { 321 this.canceled = canceled; 322 } 323 324 public boolean isCanceled() { 325 return canceled; 326 326 } 327 327 … … 332 332 new WindowGeometry(getClass().getName() + ".geometry", WindowGeometry.centerInWindow(Main.parent, 333 333 new Dimension(600, 400))).applySafe(this); 334 setCancel led(false);334 setCanceled(false); 335 335 btnApply.requestFocusInWindow(); 336 336 } else { … … 350 350 351 351 public void actionPerformed(ActionEvent arg0) { 352 setCancel led(true);352 setCanceled(true); 353 353 setVisible(false); 354 354 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r4157 r4310 329 329 if (s instanceof MapCSSStyleSource) 330 330 return tr("mapcss"); 331 return tr("unk own");331 return tr("unknown"); 332 332 } 333 333 -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetContentDownloadTask.java
r3083 r4310 20 20 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 21 21 import org.openstreetmap.josm.io.OsmServerChangesetReader; 22 import org.openstreetmap.josm.io.OsmTransferCancel ledException;22 import org.openstreetmap.josm.io.OsmTransferCanceledException; 23 23 import org.openstreetmap.josm.io.OsmTransferException; 24 24 import org.xml.sax.SAXException; … … 186 186 getProgressMonitor().worked(1); 187 187 } 188 } catch(OsmTransferCancel ledException e) {189 // the download was cancel led by the user. This exception is caught if the188 } catch(OsmTransferCanceledException e) { 189 // the download was canceled by the user. This exception is caught if the 190 190 // user canceled the authentication dialog. 191 191 // -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetHeaderDownloadTask.java
r3083 r4310 182 182 } catch(OsmTransferException e) { 183 183 if (canceled) 184 // ignore exception if cancel led184 // ignore exception if canceled 185 185 return; 186 186 // remember other exceptions -
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java
r3530 r4310 21 21 import org.openstreetmap.josm.io.OsmServerChangesetReader; 22 22 import org.openstreetmap.josm.io.OsmServerUserInfoReader; 23 import org.openstreetmap.josm.io.OsmTransferCancel ledException;23 import org.openstreetmap.josm.io.OsmTransferCanceledException; 24 24 import org.openstreetmap.josm.io.OsmTransferException; 25 25 import org.openstreetmap.josm.tools.BugReportExceptionHandler; … … 171 171 changesetReader = null; 172 172 } 173 } catch(OsmTransferCancel ledException e) {173 } catch(OsmTransferCanceledException e) { 174 174 // thrown if user cancel the authentication dialog 175 175 canceled = true; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r4308 r4310 278 278 */ 279 279 class DownloadAllChildrenTask extends PleaseWaitRunnable { 280 private boolean cancel led;280 private boolean canceled; 281 281 private int conflictsCount; 282 282 private Exception lastException; … … 299 299 @Override 300 300 protected void cancel() { 301 cancel led = true;301 canceled = true; 302 302 OsmApi.getOsmApi().cancel(); 303 303 } … … 314 314 @Override 315 315 protected void finish() { 316 if (cancel led)316 if (canceled) 317 317 return; 318 318 if (lastException != null) { … … 391 391 protected void realRun() throws SAXException, IOException, OsmTransferException { 392 392 try { 393 while(! relationsToDownload.isEmpty() && !cancel led) {393 while(! relationsToDownload.isEmpty() && !canceled) { 394 394 Relation r = relationsToDownload.pop(); 395 395 if (r.isNew()) { … … 415 415 } 416 416 } catch (Exception e) { 417 if (cancel led) {418 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e417 if (canceled) { 418 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 419 419 .toString())); 420 420 return; … … 429 429 */ 430 430 class DownloadRelationSetTask extends PleaseWaitRunnable { 431 private boolean cancel led;431 private boolean canceled; 432 432 private int conflictsCount; 433 433 private Exception lastException; … … 445 445 @Override 446 446 protected void cancel() { 447 cancel led = true;447 canceled = true; 448 448 OsmApi.getOsmApi().cancel(); 449 449 } … … 460 460 @Override 461 461 protected void finish() { 462 if (cancel led)462 if (canceled) 463 463 return; 464 464 if (lastException != null) { … … 494 494 try { 495 495 Iterator<Relation> it = relations.iterator(); 496 while(it.hasNext() && !cancel led) {496 while(it.hasNext() && !canceled) { 497 497 Relation r = it.next(); 498 498 if (r.isNew()) { … … 508 508 } 509 509 } catch (Exception e) { 510 if (cancel led) {511 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e510 if (canceled) { 511 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 512 512 .toString())); 513 513 return; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationMemberTask.java
r4308 r4310 32 32 */ 33 33 public class DownloadRelationMemberTask extends PleaseWaitRunnable { 34 private boolean cancel led;34 private boolean canceled; 35 35 private Exception lastException; 36 36 private final Set<Relation> parents = new HashSet<Relation>(); … … 72 72 @Override 73 73 protected void cancel() { 74 cancel led = true;74 canceled = true; 75 75 synchronized(this) { 76 76 if (objectReader != null) { … … 83 83 protected void finish() { 84 84 Main.map.repaint(); 85 if (cancel led)85 if (canceled) 86 86 return; 87 87 if (lastException != null) { … … 105 105 } else { 106 106 return trn("Downloading {0} incomplete child of {1} parent relations", 107 "Downloading {0} incomplete children of 107 "Downloading {0} incomplete children of {1} parent relations", 108 108 children.size(), 109 109 children.size(), … … 116 116 try { 117 117 synchronized (this) { 118 if (cancel led) return;118 if (canceled) return; 119 119 objectReader = new MultiFetchServerObjectReader(); 120 120 } … … 129 129 dataSet.deleteInvisible(); 130 130 synchronized (this) { 131 if (cancel led) return;131 if (canceled) return; 132 132 objectReader = null; 133 133 } … … 143 143 144 144 } catch (Exception e) { 145 if (cancel led) {146 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e145 if (canceled) { 146 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 147 147 .toString())); 148 148 return; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/DownloadRelationTask.java
r4308 r4310 28 28 */ 29 29 public class DownloadRelationTask extends PleaseWaitRunnable { 30 private boolean cancel led;30 private boolean canceled; 31 31 private Exception lastException; 32 32 private Collection<Relation> relations; … … 52 52 @Override 53 53 protected void cancel() { 54 cancel led = true;54 canceled = true; 55 55 synchronized(this) { 56 56 if (objectReader != null) { … … 62 62 @Override 63 63 protected void finish() { 64 if (cancel led)64 if (canceled) 65 65 return; 66 66 if (lastException != null) { … … 79 79 getProgressMonitor().setCustomText(tr("({0}/{1}): Downloading relation ''{2}''...", i,relations.size(),relation.getDisplayName(DefaultNameFormatter.getInstance()))); 80 80 synchronized (this) { 81 if (cancel led) return;81 if (canceled) return; 82 82 objectReader = new OsmServerObjectReader(relation.getPrimitiveId(), true /* full download */); 83 83 } … … 88 88 return; 89 89 synchronized (this) { 90 if (cancel led) return;90 if (canceled) return; 91 91 objectReader = null; 92 92 } … … 106 106 ); 107 107 } catch (Exception e) { 108 if (cancel led) {109 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e108 if (canceled) { 109 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e 110 110 .toString())); 111 111 return; -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r4308 r4310 39 39 * new Runnable() { 40 40 * public void run() { 41 * if (task.isCancel led() || task.hasError())41 * if (task.isCanceled() || task.hasError()) 42 42 * return; 43 43 * List<Relation> parents = task.getParents(); … … 52 52 */ 53 53 public class ParentRelationLoadingTask extends PleaseWaitRunnable{ 54 private boolean cancel led;54 private boolean canceled; 55 55 private Exception lastException; 56 56 private DataSet referrers; … … 93 93 94 94 /** 95 * Replies true if this has been cancel led by the user.96 * 97 * @return true if this has been cancel led by the user.98 */ 99 public boolean isCancel led() {100 return cancel led;95 * Replies true if this has been canceled by the user. 96 * 97 * @return true if this has been canceled by the user. 98 */ 99 public boolean isCanceled() { 100 return canceled; 101 101 } 102 102 … … 120 120 @Override 121 121 protected void cancel() { 122 cancel led = true;122 canceled = true; 123 123 OsmApi.getOsmApi().cancel(); 124 124 } … … 139 139 @Override 140 140 protected void finish() { 141 if (cancel led) return;141 if (canceled) return; 142 142 if (lastException != null) { 143 143 showLastException(); … … 191 191 } 192 192 } catch(Exception e) { 193 if (cancel led) {194 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e.toString()));193 if (canceled) { 194 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e.toString())); 195 195 return; 196 196 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ReferringRelationsBrowser.java
r3479 r4310 109 109 new Runnable() { 110 110 public void run() { 111 if (task.isCancel led() || task.hasError())111 if (task.isCanceled() || task.hasError()) 112 112 return; 113 113 model.populate(task.getParents()); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationTree.java
r4308 r4310 102 102 */ 103 103 class RelationLoader extends PleaseWaitRunnable { 104 private boolean cancel led;104 private boolean canceled; 105 105 private Exception lastException; 106 106 private Relation relation; … … 122 122 protected void cancel() { 123 123 OsmApi.getOsmApi().cancel(); 124 this.cancel led = true;124 this.canceled = true; 125 125 } 126 126 127 127 @Override 128 128 protected void finish() { 129 if (cancel led)129 if (canceled) 130 130 return; 131 131 if (lastException != null) { … … 155 155 .createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false)); 156 156 } catch(Exception e) { 157 if (cancel led) {158 System.out.println(tr("Warning: Ignoring exception because task was cancel led. Exception: {0}", e.toString()));157 if (canceled) { 158 System.out.println(tr("Warning: Ignoring exception because task was canceled. Exception: {0}", e.toString())); 159 159 return; 160 160 } -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r3083 r4310 47 47 public class HistoryLoadTask extends PleaseWaitRunnable { 48 48 49 private boolean cancel led = false;49 private boolean canceled = false; 50 50 private Exception lastException = null; 51 51 private HashSet<PrimitiveId> toLoad; … … 160 160 protected void cancel() { 161 161 OsmApi.getOsmApi().cancel(); 162 cancel led = true;162 canceled = true; 163 163 } 164 164 165 165 @Override 166 166 protected void finish() { 167 if (isCancel led())167 if (isCanceled()) 168 168 return; 169 169 if (lastException != null) { … … 179 179 try { 180 180 for(PrimitiveId pid: toLoad) { 181 if (cancel led) {181 if (canceled) { 182 182 break; 183 183 } … … 196 196 ds = reader.parseHistory(progressMonitor.createSubTaskMonitor(1, false)); 197 197 } catch(OsmTransferException e) { 198 if (cancel led)198 if (canceled) 199 199 return; 200 200 throw e; … … 208 208 } 209 209 210 public boolean isCancel led() {211 return cancel led;210 public boolean isCanceled() { 211 return canceled; 212 212 } 213 213 -
trunk/src/org/openstreetmap/josm/gui/io/AbstractIOTask.java
r3083 r4310 8 8 public abstract class AbstractIOTask implements Runnable { 9 9 10 /** indicates whether the task has been cancel led */11 private boolean cancel led;10 /** indicates whether the task has been canceled */ 11 private boolean canceled; 12 12 /** indicates whether the task has been failed */ 13 13 private boolean failed; … … 16 16 17 17 public AbstractIOTask() { 18 cancel led = false;18 canceled = false; 19 19 failed = false; 20 20 lastException = null; … … 22 22 23 23 /** 24 * Replies true if the task has been cancel led24 * Replies true if the task has been canceled 25 25 * 26 * @return true if the task has been cancel led26 * @return true if the task has been canceled 27 27 */ 28 public boolean isCancel led() {29 return cancel led;28 public boolean isCanceled() { 29 return canceled; 30 30 } 31 31 32 32 /** 33 * Set whether this task has been cancel led33 * Set whether this task has been canceled 34 34 * 35 * @param cancel led true, if the task has been cancelled; false otherwise35 * @param canceled true, if the task has been canceled; false otherwise 36 36 */ 37 protected void setCancel led(boolean cancelled) {38 this.cancel led = cancelled;37 protected void setCanceled(boolean canceled) { 38 this.canceled = canceled; 39 39 } 40 40 … … 77 77 /** 78 78 * Replies true if this task was successful, i.e. if it wasn't 79 * cancel led and didn't fail79 * canceled and didn't fail 80 80 * 81 81 * @return true if this task was successful 82 82 */ 83 83 public boolean isSuccessful() { 84 return !isCancel led() && !isFailed();84 return !isCanceled() && !isFailed(); 85 85 } 86 86 -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetDialog.java
r3501 r4310 42 42 /** the list */ 43 43 private JList lstOpenChangesets; 44 /** true if the user cancel led the dialog */44 /** true if the user canceled the dialog */ 45 45 private boolean canceled; 46 46 /** the list model */ -
trunk/src/org/openstreetmap/josm/gui/io/CloseChangesetTask.java
r3083 r4310 23 23 */ 24 24 public class CloseChangesetTask extends PleaseWaitRunnable { 25 private boolean cancel led;25 private boolean canceled; 26 26 private Exception lastException; 27 27 private Collection<Changeset> changesets; … … 46 46 @Override 47 47 protected void cancel() { 48 this.cancel led = true;48 this.canceled = true; 49 49 OsmApi.getOsmApi().cancel(); 50 50 } … … 52 52 @Override 53 53 protected void finish() { 54 if (cancel led)54 if (canceled) 55 55 return; 56 56 if (lastException != null) { … … 70 70 try { 71 71 for (Changeset cs: changesets) { 72 if (cancel led) return;72 if (canceled) return; 73 73 if (cs == null || cs.getId() <= 0 || ! cs.isOpen()) { 74 74 continue; … … 79 79 } 80 80 } catch(Exception e) { 81 if (cancel led)81 if (canceled) 82 82 return; 83 83 lastException = e; -
trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
r3083 r4310 30 30 public class DownloadOpenChangesetsTask extends PleaseWaitRunnable { 31 31 32 private boolean cancel led;32 private boolean canceled; 33 33 private OsmServerChangesetReader reader; 34 34 private List<Changeset> changesets; … … 48 48 @Override 49 49 protected void cancel() { 50 this.cancel led = true;50 this.canceled = true; 51 51 synchronized(this) { 52 52 if (reader != null) { … … 71 71 return; 72 72 } 73 if (cancel led)return;73 if (canceled)return; 74 74 if (lastException != null) { 75 75 ExceptionDialogUtil.explainException(lastException); … … 133 133 refreshUserIdentity(); 134 134 } 135 if (cancel led)return;135 if (canceled)return; 136 136 synchronized(this) { 137 137 reader = new OsmServerChangesetReader(); … … 155 155 ); 156 156 } catch(Exception e) { 157 if (cancel led)157 if (canceled) 158 158 return; 159 159 lastException = e; … … 161 161 } 162 162 163 public boolean isCancel led() {164 return cancel led;163 public boolean isCanceled() { 164 return canceled; 165 165 } 166 166 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java
r3083 r4310 143 143 * <ul> 144 144 * <li>{@see UploadOrSaveState#OK} if {@see #getLayer() was successfully uploaded</li> 145 * <li>{@see UploadOrSaveState# CANCELLED} if uploading {@see #getLayer() was cancelled</li>145 * <li>{@see UploadOrSaveState#canceled} if uploading {@see #getLayer() was canceled</li> 146 146 * <li>{@see UploadOrSaveState#FAILED} if uploading {@see #getLayer() has failed</li> 147 147 * </ul> … … 166 166 * <ul> 167 167 * <li>{@see UploadOrSaveState#OK} if {@see #getLayer() was successfully saved to file</li> 168 * <li>{@see UploadOrSaveState# CANCELLED} if saving {@see #getLayer() was cancelled</li>168 * <li>{@see UploadOrSaveState#canceled} if saving {@see #getLayer() was canceled</li> 169 169 * <li>{@see UploadOrSaveState#FAILED} if saving {@see #getLayer() has failed</li> 170 170 * </ul> -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
r4114 r4310 52 52 return; 53 53 } 54 if (!isCancel led()) {54 if (!isCanceled()) { 55 55 layerInfo.getLayer().onPostSaveToFile(); 56 56 } … … 63 63 @Override 64 64 public void cancel() { 65 setCancel led(true);65 setCanceled(true); 66 66 } 67 67 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
r3501 r4310 50 50 PROCEED, 51 51 /** 52 * save/upload of layers was not successful or user cancel led52 * save/upload of layers was not successful or user canceled 53 53 * operation 54 54 */ … … 392 392 private ProgressMonitor monitor; 393 393 private ExecutorService worker; 394 private boolean cancel led;394 private boolean canceled; 395 395 private Future<?> currentFuture; 396 396 private AbstractIOTask currentTask; … … 404 404 protected void uploadLayers(List<SaveLayerInfo> toUpload) { 405 405 for (final SaveLayerInfo layerInfo: toUpload) { 406 if (cancel led) {407 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);406 if (canceled) { 407 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 408 408 continue; 409 409 } … … 418 418 dialog.setVisible(true); 419 419 if (dialog.isCanceled()) { 420 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);420 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 421 421 continue; 422 422 } … … 435 435 currentFuture.get(); 436 436 } catch(CancellationException e) { 437 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);437 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 438 438 } catch(Exception e) { 439 439 e.printStackTrace(); … … 441 441 ExceptionDialogUtil.explainException(e); 442 442 } 443 if (currentTask.isCancel led()) {444 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);443 if (currentTask.isCanceled()) { 444 model.setUploadState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 445 445 } else if (currentTask.isFailed()) { 446 446 currentTask.getLastException().printStackTrace(); … … 457 457 protected void saveLayers(List<SaveLayerInfo> toSave) { 458 458 for (final SaveLayerInfo layerInfo: toSave) { 459 if (cancel led) {460 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);459 if (canceled) { 460 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 461 461 continue; 462 462 } … … 469 469 currentFuture.get(); 470 470 } catch(CancellationException e) { 471 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);471 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 472 472 } catch(Exception e) { 473 473 e.printStackTrace(); … … 475 475 ExceptionDialogUtil.explainException(e); 476 476 } 477 if (currentTask.isCancel led()) {478 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCEL LED);477 if (currentTask.isCanceled()) { 478 model.setSaveState(layerInfo.getLayer(), UploadOrSaveState.CANCELED); 479 479 } else if (currentTask.isFailed()) { 480 480 if (currentTask.getLastException() != null) { … … 496 496 String msg = trn( 497 497 "<html>An upload and/or save operation of one layer with modifications<br>" 498 + "was cancel led or has failed.</html>",498 + "was canceled or has failed.</html>", 499 499 "<html>Upload and/or save operations of {0} layers with modifications<br>" 500 + "were cancel led or have failed.</html>",500 + "were canceled or have failed.</html>", 501 501 numProblems, 502 502 numProblems … … 524 524 warnBecauseOfUnsavedData(); 525 525 model.setMode(Mode.EDITING_DATA); 526 if (cancel led) {526 if (canceled) { 527 527 setUserAction(UserAction.CANCEL); 528 528 closeDialog(); … … 538 538 currentTask.cancel(); 539 539 } 540 cancel led = true;540 canceled = true; 541 541 } 542 542 } -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayersModel.java
r4114 r4310 197 197 int ret = 0; 198 198 for (SaveLayerInfo info: layerInfo) { 199 if (UploadOrSaveState.CANCEL LED.equals(info.getSaveState())200 || UploadOrSaveState.CANCEL LED.equals(info.getUploadState())) {199 if (UploadOrSaveState.CANCELED.equals(info.getSaveState()) 200 || UploadOrSaveState.CANCELED.equals(info.getUploadState())) { 201 201 ret++; 202 202 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r4191 r4310 183 183 184 184 185 // make sure the theconfiguration panels listen to each other185 // make sure the configuration panels listen to each other 186 186 // changes 187 187 // -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r4100 r4310 122 122 try { 123 123 ProgressMonitor m = monitor.createSubTaskMonitor(ProgressMonitor.ALL_TICKS, false); 124 if (isCancel led()) return;124 if (isCanceled()) return; 125 125 writer.uploadOsm(strategy, toUpload, changeset, m); 126 126 processedPrimitives.addAll((Collection) writer.getProcessedPrimitives()); // OsmPrimitive in => OsmPrimitive out … … 136 136 } 137 137 } catch (Exception sxe) { 138 if (isCancel led()) {139 System.out.println("Ignoring exception caught because upload is cancel led. Exception is: " + sxe.toString());138 if (isCanceled()) { 139 System.out.println("Ignoring exception caught because upload is canceled. Exception is: " + sxe.toString()); 140 140 return; 141 141 } … … 143 143 } 144 144 145 if (isCancel led())145 if (isCanceled()) 146 146 return; 147 147 layer.cleanupAfterUpload(processedPrimitives); … … 154 154 @Override 155 155 public void cancel() { 156 setCancel led(true);156 setCanceled(true); 157 157 if (writer != null) { 158 158 writer.cancel(); -
trunk/src/org/openstreetmap/josm/gui/io/UploadOrSaveState.java
r3083 r4310 12 12 FAILED, 13 13 /** 14 * uploading or saving a data layer was cancel led14 * uploading or saving a data layer was canceled 15 15 */ 16 CANCEL LED16 CANCELED 17 17 } -
trunk/src/org/openstreetmap/josm/gui/io/UploadPrimitivesTask.java
r4191 r4310 29 29 import org.openstreetmap.josm.io.OsmApiPrimitiveGoneException; 30 30 import org.openstreetmap.josm.io.OsmServerWriter; 31 import org.openstreetmap.josm.io.OsmTransferCancel ledException;31 import org.openstreetmap.josm.io.OsmTransferCanceledException; 32 32 import org.openstreetmap.josm.io.OsmTransferException; 33 33 import org.openstreetmap.josm.tools.ImageProvider; … … 39 39 */ 40 40 public class UploadPrimitivesTask extends AbstractUploadTask { 41 private boolean uploadCancel led = false;41 private boolean uploadCanceled = false; 42 42 private Exception lastException = null; 43 43 private APIDataSet toUpload; … … 236 236 // 237 237 break; 238 } catch(OsmTransferCancel ledException e) {238 } catch(OsmTransferCanceledException e) { 239 239 e.printStackTrace(); 240 uploadCancel led = true;240 uploadCanceled = true; 241 241 break uploadloop; 242 242 } catch(OsmApiPrimitiveGoneException e) { … … 283 283 } 284 284 } catch (Exception e) { 285 if (uploadCancel led) {285 if (uploadCanceled) { 286 286 System.out.println(tr("Ignoring caught exception because upload is canceled. Exception is: {0}", e.toString())); 287 287 } else { … … 289 289 } 290 290 } 291 if (uploadCancel led && processedPrimitives.isEmpty()) return;291 if (uploadCanceled && processedPrimitives.isEmpty()) return; 292 292 cleanupAfterUpload(); 293 293 } 294 294 295 295 @Override protected void finish() { 296 if (uploadCancel led)296 if (uploadCanceled) 297 297 return; 298 298 … … 353 353 354 354 @Override protected void cancel() { 355 uploadCancel led = true;355 uploadCanceled = true; 356 356 synchronized(this) { 357 357 if (writer != null) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r4241 r4310 90 90 private static final class Loader extends PleaseWaitRunnable { 91 91 92 private boolean cancel led = false;92 private boolean canceled = false; 93 93 private GeoImageLayer layer; 94 94 private Collection<File> selection; … … 118 118 } 119 119 120 if (cancel led)120 if (canceled) 121 121 return; 122 122 progressMonitor.subTask(tr("Read photos...")); … … 131 131 for (File f : files) { 132 132 133 if (cancel led) {133 if (canceled) { 134 134 break; 135 135 } … … 161 161 for (File f : sel) { 162 162 163 if(cancel led) {163 if(canceled) { 164 164 break; 165 165 } … … 241 241 } 242 242 243 if (! cancel led && layer.data.size() > 0) {243 if (! canceled && layer.data.size() > 0) { 244 244 boolean noGeotagFound = true; 245 245 for (ImageEntry e : layer.data) { … … 256 256 257 257 @Override protected void cancel() { 258 cancel led = true;258 canceled = true; 259 259 } 260 260 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/TextElement.java
r4281 r4310 162 162 * Replies the label to be rendered for the primitive {@code osm}. 163 163 * 164 * @param osm the theOSM object164 * @param osm the OSM object 165 165 * @return the label, or null, if {@code osm} is null or if no label can be 166 166 * derived for {@code osm} -
trunk/src/org/openstreetmap/josm/gui/oauth/OAuthAuthorizationWizard.java
r4191 r4310 251 251 252 252 /** 253 * Replies true if the dialog was cancel led254 * 255 * @return true if the dialog was cancel led253 * Replies true if the dialog was canceled 254 * 255 * @return true if the dialog was canceled 256 256 */ 257 257 public boolean isCanceled() { -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java
r4191 r4310 32 32 import org.openstreetmap.josm.gui.progress.NullProgressMonitor; 33 33 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 34 import org.openstreetmap.josm.io.OsmTransferCancel ledException;34 import org.openstreetmap.josm.io.OsmTransferCanceledException; 35 35 import org.openstreetmap.josm.tools.CheckParameterUtil; 36 36 … … 119 119 * @throws OsmOAuthAuthorizationException thrown if something goes wrong when retrieving the request token 120 120 */ 121 public OAuthToken getRequestToken(ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCancel ledException {121 public OAuthToken getRequestToken(ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCanceledException { 122 122 if (monitor == null) { 123 123 monitor = NullProgressMonitor.INSTANCE; … … 130 130 } catch(OAuthCommunicationException e){ 131 131 if (canceled) 132 throw new OsmTransferCancel ledException();132 throw new OsmTransferCanceledException(); 133 133 throw new OsmOAuthAuthorizationException(e); 134 134 } catch(OAuthException e){ 135 135 if (canceled) 136 throw new OsmTransferCancel ledException();136 throw new OsmTransferCanceledException(); 137 137 throw new OsmOAuthAuthorizationException(e); 138 138 } finally { … … 152 152 * @see #getRequestToken(ProgressMonitor) 153 153 */ 154 public OAuthToken getAccessToken(ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCancel ledException {154 public OAuthToken getAccessToken(ProgressMonitor monitor) throws OsmOAuthAuthorizationException, OsmTransferCanceledException { 155 155 if (monitor == null) { 156 156 monitor = NullProgressMonitor.INSTANCE; … … 163 163 } catch(OAuthCommunicationException e){ 164 164 if (canceled) 165 throw new OsmTransferCancel ledException();165 throw new OsmTransferCanceledException(); 166 166 throw new OsmOAuthAuthorizationException(e); 167 167 } catch(OAuthException e){ 168 168 if (canceled) 169 throw new OsmTransferCancel ledException();169 throw new OsmTransferCanceledException(); 170 170 throw new OsmOAuthAuthorizationException(e); 171 171 } finally { … … 465 465 * @throws IllegalArgumentException thrown if privileges is null 466 466 * @throws OsmOAuthAuthorizationException thrown if the authorisation fails 467 * @throws OsmTransferCancel ledException thrown if the task is cancelled by the user468 */ 469 public void authorise(OAuthToken requestToken, String osmUserName, String osmPassword, OsmPrivileges privileges, ProgressMonitor monitor) throws IllegalArgumentException, OsmOAuthAuthorizationException, OsmTransferCancel ledException{467 * @throws OsmTransferCanceledException thrown if the task is canceled by the user 468 */ 469 public void authorise(OAuthToken requestToken, String osmUserName, String osmPassword, OsmPrivileges privileges, ProgressMonitor monitor) throws IllegalArgumentException, OsmOAuthAuthorizationException, OsmTransferCanceledException{ 470 470 CheckParameterUtil.ensureParameterNotNull(requestToken, "requestToken"); 471 471 CheckParameterUtil.ensureParameterNotNull(osmUserName, "osmUserName"); … … 482 482 String sessionId = fetchOsmWebsiteSessionId(); 483 483 if (canceled) 484 throw new OsmTransferCancel ledException();484 throw new OsmTransferCanceledException(); 485 485 monitor.worked(1); 486 486 … … 488 488 authenticateOsmSession(sessionId, osmUserName, osmPassword); 489 489 if (canceled) 490 throw new OsmTransferCancel ledException();490 throw new OsmTransferCanceledException(); 491 491 monitor.worked(1); 492 492 … … 494 494 sendAuthorisationRequest(sessionId, requestToken, privileges); 495 495 if (canceled) 496 throw new OsmTransferCancel ledException();496 throw new OsmTransferCanceledException(); 497 497 monitor.worked(1); 498 498 … … 500 500 logoutOsmSession(sessionId); 501 501 if (canceled) 502 throw new OsmTransferCancel ledException();502 throw new OsmTransferCanceledException(); 503 503 monitor.worked(1); 504 504 } catch(OsmOAuthAuthorizationException e) { 505 505 if (canceled) 506 throw new OsmTransferCancel ledException();506 throw new OsmTransferCanceledException(); 507 507 throw e; 508 508 } finally { -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveAccessTokenTask.java
r3530 r4310 14 14 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 15 15 import org.openstreetmap.josm.gui.help.HelpUtil; 16 import org.openstreetmap.josm.io.OsmTransferCancel ledException;16 import org.openstreetmap.josm.io.OsmTransferCanceledException; 17 17 import org.openstreetmap.josm.io.OsmTransferException; 18 18 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 84 84 } 85 85 accessToken = client.getAccessToken(getProgressMonitor().createSubTaskMonitor(0, false)); 86 } catch(OsmTransferCancel ledException e) {86 } catch(OsmTransferCanceledException e) { 87 87 return; 88 88 } catch (OsmOAuthAuthorizationException e) { -
trunk/src/org/openstreetmap/josm/gui/oauth/RetrieveRequestTokenTask.java
r3530 r4310 14 14 import org.openstreetmap.josm.gui.PleaseWaitRunnable; 15 15 import org.openstreetmap.josm.gui.help.HelpUtil; 16 import org.openstreetmap.josm.io.OsmTransferCancel ledException;16 import org.openstreetmap.josm.io.OsmTransferCanceledException; 17 17 import org.openstreetmap.josm.io.OsmTransferException; 18 18 import org.openstreetmap.josm.tools.CheckParameterUtil; … … 78 78 } 79 79 requestToken = client.getRequestToken(getProgressMonitor().createSubTaskMonitor(0, false)); 80 } catch(OsmTransferCancel ledException e) {80 } catch(OsmTransferCanceledException e) { 81 81 return; 82 82 } catch (OsmOAuthAuthorizationException e) { -
trunk/src/org/openstreetmap/josm/gui/preferences/RemoteControlPreference.java
r3806 r4310 86 86 wrapper.add(alwaysAskUserConfirm, GBC.eol().fill(GBC.HORIZONTAL)); 87 87 88 final JLabel portLabel = new JLabel("<html>"+tr("JOSM will always listen at port 8111 on localhost. " +88 final JLabel portLabel = new JLabel("<html>"+tr("JOSM will always listen at port 8111 on localhost. " + 89 89 "This port is not configurable because it is referenced by external applications talking to JOSM.") + "</html>"); 90 90 portLabel.setFont(portLabel.getFont().deriveFont(Font.PLAIN)); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginUpdatePolicyPanel.java
r3236 r4310 74 74 bgVersionBasedUpdatePolicy.add(btn); 75 75 76 btn = new JRadioButton(tr("Always update without hasking"));76 btn = new JRadioButton(tr("Always update without asking")); 77 77 rbVersionBasedUpatePolicy.put(Policy.ALWAYS, btn); 78 78 bgVersionBasedUpdatePolicy.add(btn); … … 116 116 bgTimeBasedUpdatePolicy.add(btn); 117 117 118 btn = new JRadioButton(tr("Always update without hasking"));118 btn = new JRadioButton(tr("Always update without asking")); 119 119 btn.addChangeListener(changeListener); 120 120 rbTimeBasedUpatePolicy.put(Policy.ALWAYS, btn); -
trunk/src/org/openstreetmap/josm/gui/progress/AbstractProgressMonitor.java
r3083 r4310 181 181 } 182 182 183 public boolean isCancel led() {183 public boolean isCanceled() { 184 184 return cancelHandler.isCanceled(); 185 185 } -
trunk/src/org/openstreetmap/josm/gui/progress/NullProgressMonitor.java
r3408 r4310 43 43 } 44 44 45 public boolean isCancel led() {45 public boolean isCanceled() { 46 46 return false; 47 47 } -
trunk/src/org/openstreetmap/josm/gui/progress/ProgressMonitor.java
r3083 r4310 115 115 ProgressMonitor createSubTaskMonitor(int ticks, boolean internal); 116 116 117 boolean isCancel led();117 boolean isCanceled(); 118 118 void cancel(); 119 119 void addCancelListener(CancelListener listener); -
trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java
r4191 r4310 441 441 442 442 /** 443 * Replies the t he tags in this tag editor model as {@see TagCollection}.444 * 445 * @return the t he tags in this tag editor model as {@see TagCollection}443 * Replies the tags in this tag editor model as {@see TagCollection}. 444 * 445 * @return the tags in this tag editor model as {@see TagCollection} 446 446 */ 447 447 public TagCollection getTagCollection() { -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r4191 r4310 51 51 private TagCellEditor editor = null; 52 52 53 /** a list of components to which focus can be transferred without hstopping53 /** a list of components to which focus can be transferred without stopping 54 54 * cell editing this table. 55 55 */ -
trunk/src/org/openstreetmap/josm/io/GpxImporter.java
r3372 r4310 56 56 } 57 57 if (!parsedProperly) { 58 JOptionPane.showMessageDialog(null, tr("Error occur ed while parsing gpx file {0}. Only part of the file will be available", file.getName()));58 JOptionPane.showMessageDialog(null, tr("Error occurred while parsing gpx file {0}. Only a part of the file will be available.", file.getName())); 59 59 } 60 60 } -
trunk/src/org/openstreetmap/josm/io/JpgImporter.java
r3083 r4310 42 42 addRecursiveFiles(files, visitedDirs, sel, progressMonitor.createSubTaskMonitor(1, true)); 43 43 44 if (progressMonitor.isCancel led())44 if (progressMonitor.isCanceled()) 45 45 return; 46 46 … … 56 56 private void addRecursiveFiles(List<File> files, Set<String> visitedDirs, List<File> sel, ProgressMonitor progressMonitor) throws IOException { 57 57 58 if (progressMonitor.isCancel led())58 if (progressMonitor.isCanceled()) 59 59 return; 60 60 -
trunk/src/org/openstreetmap/josm/io/OsmApi.java
r4191 r4310 146 146 } 147 147 148 public void initialize(ProgressMonitor monitor) throws OsmApiInitializationException, OsmTransferCancel ledException {148 public void initialize(ProgressMonitor monitor) throws OsmApiInitializationException, OsmTransferCanceledException { 149 149 initialize(monitor, false); 150 150 } … … 156 156 * @exception OsmApiInitializationException thrown, if an exception occurs 157 157 */ 158 public void initialize(ProgressMonitor monitor, boolean fastFail) throws OsmApiInitializationException, OsmTransferCancel ledException {158 public void initialize(ProgressMonitor monitor, boolean fastFail) throws OsmApiInitializationException, OsmTransferCanceledException { 159 159 if (initialized) 160 160 return; … … 213 213 initialized = false; 214 214 throw new OsmApiInitializationException(e); 215 } catch(OsmTransferCancel ledException e){215 } catch(OsmTransferCanceledException e){ 216 216 throw e; 217 217 } catch(OsmTransferException e) { … … 477 477 } 478 478 479 private void sleepAndListen(int retry, ProgressMonitor monitor) throws OsmTransferCancel ledException {479 private void sleepAndListen(int retry, ProgressMonitor monitor) throws OsmTransferCanceledException { 480 480 System.out.print(tr("Waiting 10 seconds ... ")); 481 481 for(int i=0; i < 10; i++) { … … 484 484 } 485 485 if (cancel) 486 throw new OsmTransferCancel ledException();486 throw new OsmTransferCanceledException(); 487 487 try { 488 488 Thread.sleep(1000); … … 646 646 } catch(IOException e){ 647 647 throw new OsmTransferException(e); 648 } catch(OsmTransferCancel ledException e){648 } catch(OsmTransferCanceledException e){ 649 649 throw e; 650 650 } catch(OsmTransferException e) { -
trunk/src/org/openstreetmap/josm/io/OsmChangeBuilder.java
r4100 r4310 91 91 if (primitives == null) return; 92 92 if (!prologWritten) 93 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write f rst."));93 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write first.")); 94 94 for (IPrimitive p : primitives) { 95 95 write(p); … … 109 109 if (p == null) return; 110 110 if (!prologWritten) 111 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write f rst."));111 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write first.")); 112 112 write(p); 113 113 } … … 120 120 public void finish() throws IllegalStateException { 121 121 if (!prologWritten) 122 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write f rst."));122 throw new IllegalStateException(tr("Prolog of OsmChange document not written yet. Please write first.")); 123 123 if (currentMode != null) { 124 124 writer.print("</"); -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r4268 r4310 158 158 } else { 159 159 throwException(tr( 160 "Missing man adatory attributes on element ''bounds''. Got minlon=''{0}'',minlat=''{1}'',maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.",160 "Missing mandatory attributes on element ''bounds''. Got minlon=''{0}'',minlat=''{1}'',maxlon=''{3}'',maxlat=''{4}'', origin=''{5}''.", 161 161 minlon, minlat, maxlon, maxlat, origin 162 162 )); -
trunk/src/org/openstreetmap/josm/io/OsmServerReader.java
r4191 r4310 71 71 } 72 72 if (cancel) 73 throw new OsmTransferCancel ledException();73 throw new OsmTransferCanceledException(); 74 74 if (Main.pref.getBoolean("osm-server.use-compression", true)) { 75 75 activeConnection.setRequestProperty("Accept-Encoding", "gzip, deflate"); … … 90 90 91 91 if (activeConnection.getResponseCode() == HttpURLConnection.HTTP_PROXY_AUTH) 92 throw new OsmTransferCancel ledException();92 throw new OsmTransferCanceledException(); 93 93 94 94 String encoding = activeConnection.getContentEncoding(); -
trunk/src/org/openstreetmap/josm/io/OsmTransferCanceledException.java
r4304 r4310 2 2 package org.openstreetmap.josm.io; 3 3 4 public class OsmTransferCancel ledException extends OsmTransferException {4 public class OsmTransferCanceledException extends OsmTransferException { 5 5 6 6 } -
trunk/src/org/openstreetmap/josm/io/auth/CredentialsAgentResponse.java
r4245 r4310 29 29 return canceled; 30 30 } 31 public void setCanceled(boolean cancel led) {32 this.canceled = cancel led;31 public void setCanceled(boolean canceled) { 32 this.canceled = canceled; 33 33 } 34 34 } -
trunk/src/org/openstreetmap/josm/io/imagery/ImageryReader.java
r4240 r4310 101 101 Utils.close(in); 102 102 } 103 System.err.println("Warning: Could not detect type of imagery source '"+source+"'. Using default (xml).");103 Main.warn(tr("Warning: Could not detect type of imagery source '{0}'. Using default (xml).", source)); 104 104 return true; 105 105 } … … 261 261 } 262 262 /** 263 * Did not recognize the element, so the new state is UNK OWN.263 * Did not recognize the element, so the new state is UNKNOWN. 264 264 * This includes the case where we are already inside an unknown 265 265 * element, i.e. we do not try to understand the inner content -
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r4191 r4310 178 178 179 179 /** 180 * Replies true if the task was cancel led by the user180 * Replies true if the task was canceled by the user 181 181 * 182 182 * @return -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r4167 r4310 354 354 * Alerts the user if a plugin required by another plugin is missing 355 355 * 356 * @param plugin the theplugin356 * @param plugin the plugin 357 357 * @param missingRequiredPlugin the missing required plugin 358 358 */ -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r4199 r4310 70 70 /** 71 71 * Creates a plugin information object for the plugin with name {@code name}. 72 * Information about the plugin is extracted from the maifest file in the theplugin jar72 * Information about the plugin is extracted from the maifest file in the plugin jar 73 73 * {@code file}. 74 74 * @param file the plugin jar -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r4087 r4310 242 242 243 243 /** 244 * Replies true if the task was cancel led by the user244 * Replies true if the task was canceled by the user 245 245 * 246 * @return true if the task was cancel led by the user246 * @return true if the task was canceled by the user 247 247 */ 248 248 public boolean isCanceled() {
Note:
See TracChangeset
for help on using the changeset viewer.