Changeset 2181 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2009-09-22T15:34:19+02:00 (17 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 28 edited
-
MapView.java (modified) (2 diffs)
-
conflict/pair/ComparePairType.java (modified) (1 diff)
-
conflict/pair/ListMergeModel.java (modified) (6 diffs)
-
conflict/pair/ListMerger.java (modified) (15 diffs)
-
conflict/pair/nodes/NodeListMergeModel.java (modified) (2 diffs)
-
conflict/pair/nodes/NodeListTableCellRenderer.java (modified) (1 diff)
-
conflict/pair/properties/PropertiesMergeModel.java (modified) (2 diffs)
-
conflict/pair/relation/RelationMemberListMergeModel.java (modified) (2 diffs)
-
conflict/pair/tags/TagMergeItem.java (modified) (4 diffs)
-
conflict/pair/tags/TagMergeTableCellRenderer.java (modified) (1 diff)
-
conflict/tags/MultiValueResolutionDecision.java (modified) (6 diffs)
-
conflict/tags/RelationMemberConflictDecision.java (modified) (1 diff)
-
conflict/tags/TagConflictResolverModel.java (modified) (1 diff)
-
dialogs/HistoryDialog.java (modified) (3 diffs)
-
dialogs/LayerListDialog.java (modified) (4 diffs)
-
dialogs/relation/ChildRelationBrowser.java (modified) (2 diffs)
-
dialogs/relation/ParentRelationLoadingTask.java (modified) (2 diffs)
-
dialogs/relation/RelationEditor.java (modified) (1 diff)
-
dialogs/relation/SelectionTableModel.java (modified) (1 diff)
-
history/AdjustmentSynchronizer.java (modified) (3 diffs)
-
history/HistoryBrowserModel.java (modified) (6 diffs)
-
history/HistoryLoadTask.java (modified) (5 diffs)
-
history/VersionInfoPanel.java (modified) (1 diff)
-
io/SaveLayerInfo.java (modified) (1 diff)
-
io/SaveLayerTask.java (modified) (1 diff)
-
io/UploadDialog.java (modified) (1 diff)
-
io/UploadLayerTask.java (modified) (1 diff)
-
progress/SwingRenderingProgressMonitor.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapView.java
r2107 r2181 284 284 int curLayerPos = layers.indexOf(layer); 285 285 if (curLayerPos == -1) 286 throw new IllegalArgumentException(tr(" layer not in list."));286 throw new IllegalArgumentException(tr("Layer not in list.")); 287 287 if (pos == curLayerPos) 288 288 return; // already in place. … … 301 301 int curLayerPos = layers.indexOf(layer); 302 302 if (curLayerPos == -1) 303 throw new IllegalArgumentException(tr(" layer not in list."));303 throw new IllegalArgumentException(tr("Layer not in list.")); 304 304 return curLayerPos; 305 305 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ComparePairType.java
r1954 r2181 80 80 public ListRole getOppositeRole(ListRole role) { 81 81 if (!isParticipatingIn(role)) 82 throw new IllegalStateException(tr(" role {0} is not participating in compare pair {1}", role.toString(), this.toString()));82 throw new IllegalStateException(tr("Role {0} is not participating in compare pair {1}.", role.toString(), this.toString())); 83 83 if (participatingRoles[0].equals(role)) 84 84 return participatingRoles[1]; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMergeModel.java
r2039 r2181 323 323 ArrayList<T> mergedEntries = getMergedEntries(); 324 324 if (current < 0 || current >= mergedEntries.size()) 325 throw new IllegalArgumentException(tr(" parameter current out of range: got {0}", current));325 throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current)); 326 326 for (int i=rows.length -1; i>=0; i--) { 327 327 int row = rows[i]; … … 375 375 376 376 if (current < 0 || current >= mergedEntries.size()) 377 throw new IllegalArgumentException(tr(" parameter current out of range: got {0}", current));377 throw new IllegalArgumentException(tr("Parameter current out of range. Got {0}.", current)); 378 378 if (current == mergedEntries.size() -1) { 379 379 copyToEnd(source, rows); … … 589 589 public boolean isSamePositionInOppositeList(int row) { 590 590 if (!isParticipatingInCurrentComparePair()) 591 throw new IllegalStateException(tr(" list in role {0} is currently not participating in a compare pair", role.toString()));591 throw new IllegalStateException(tr("List in role {0} is currently not participating in a compare pair.", role.toString())); 592 592 if (row >= getEntries().size()) return false; 593 593 if (row >= getOppositeEntries().size()) return false; … … 613 613 public boolean isIncludedInOppositeList(int row) { 614 614 if (!isParticipatingInCurrentComparePair()) 615 throw new IllegalStateException(tr(" list in role {0} is currently not participating in a compare pair", role.toString()));615 throw new IllegalStateException(tr("List in role {0} is currently not participating in a compare pair.", role.toString())); 616 616 617 617 if (row >= getEntries().size()) return false; … … 762 762 if (index < compareModes.size()) 763 763 return compareModes.get(index); 764 throw new IllegalArgumentException(tr(" unexpected value of parameter\"index\". Got {0}", index));764 throw new IllegalArgumentException(tr("Unexpected value of parameter ''index''. Got {0}.", index)); 765 765 } 766 766 … … 776 776 int i = compareModes.indexOf(anItem); 777 777 if (i < 0) 778 throw new IllegalStateException(tr(" item {0} not found in list", anItem));778 throw new IllegalStateException(tr("Item {0} not found in list.", anItem)); 779 779 selectedIdx = i; 780 780 fireModelDataChanged(); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/ListMerger.java
r2165 r2181 436 436 putValue(Action.NAME, tr("> bottom")); 437 437 } 438 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements to the end of the list of merged elements")); 438 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements to the end of the list of merged elements.")); 439 439 setEnabled(false); 440 440 } … … 463 463 putValue(Action.NAME, "> before"); 464 464 } 465 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements before the first selected element in the list of merged elements")); 465 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements before the first selected element in the list of merged elements.")); 466 466 setEnabled(false); 467 467 } … … 497 497 putValue(Action.NAME, "> after"); 498 498 } 499 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements after the first selected element in the list of merged elements")); 499 putValue(Action.SHORT_DESCRIPTION, tr("Copy my selected elements after the first selected element in the list of merged elements.")); 500 500 setEnabled(false); 501 501 } … … 527 527 putValue(Action.NAME, "< top"); 528 528 } 529 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected element to the start of the list of merged elements")); 529 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected element to the start of the list of merged elements.")); 530 530 setEnabled(false); 531 531 } … … 550 550 putValue(Action.NAME, "< bottom"); 551 551 } 552 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements to the end of the list of merged elements")); 552 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements to the end of the list of merged elements.")); 553 553 setEnabled(false); 554 554 } … … 572 572 putValue(Action.NAME, "< before"); 573 573 } 574 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements before the first selected element in the list of merged elements")); 574 putValue(Action.SHORT_DESCRIPTION, tr("Copy their selected elements before the first selected element in the list of merged elements.")); 575 575 setEnabled(false); 576 576 } … … 632 632 putValue(Action.NAME, tr("Up")); 633 633 } 634 putValue(Action.SHORT_DESCRIPTION, tr("Move up the selected elements by one position")); 634 putValue(Action.SHORT_DESCRIPTION, tr("Move up the selected elements by one position.")); 635 635 setEnabled(false); 636 636 } … … 664 664 putValue(Action.NAME, tr("Down")); 665 665 } 666 putValue(Action.SHORT_DESCRIPTION, tr("Move down the selected entries by one position")); 666 putValue(Action.SHORT_DESCRIPTION, tr("Move down the selected entries by one position.")); 667 667 setEnabled(false); 668 668 } … … 696 696 putValue(Action.NAME, tr("Remove")); 697 697 } 698 putValue(Action.SHORT_DESCRIPTION, tr("Remove the selected entries from the list of merged elements")); 698 putValue(Action.SHORT_DESCRIPTION, tr("Remove the selected entries from the list of merged elements.")); 699 699 setEnabled(false); 700 700 } … … 726 726 public FreezeAction() { 727 727 putValue(Action.NAME, tr("Freeze")); 728 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements")); 728 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements.")); 729 729 putValue(PROP_SELECTED, false); 730 730 setEnabled(true); … … 759 759 if (state == ItemEvent.SELECTED) { 760 760 putValue(Action.NAME, tr("Unfreeze")); 761 putValue(Action.SHORT_DESCRIPTION, tr("Unfreeze the list of merged elements and start merging")); 761 putValue(Action.SHORT_DESCRIPTION, tr("Unfreeze the list of merged elements and start merging.")); 762 762 model.setFrozen(true); 763 763 } else if (state == ItemEvent.DESELECTED) { 764 764 putValue(Action.NAME, tr("Freeze")); 765 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements")); 765 putValue(Action.SHORT_DESCRIPTION, tr("Freeze the current list of merged elements.")); 766 766 model.setFrozen(false); 767 767 } … … 786 786 if (newValue) { 787 787 lblFrozenState.setText( 788 tr("<html>Click <strong>{0}</strong> to start merging my and their entries</html>", 788 tr("<html>Click <strong>{0}</strong> to start merging my and their entries.</html>", 789 789 freezeAction.getValue(Action.NAME)) 790 790 ); 791 791 } else { 792 792 lblFrozenState.setText( 793 tr("<html>Click <strong>{0}</strong> to finish merging my and their entries</html>", 793 tr("<html>Click <strong>{0}</strong> to finish merging my and their entries.</html>", 794 794 freezeAction.getValue(Action.NAME)) 795 795 ); … … 879 879 protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) { 880 880 if (adjustable == null) 881 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));881 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 882 882 883 883 if (! synchronizedAdjustables.contains(adjustable)) 884 throw new IllegalStateException(tr(" adjustable {0} not registered yet. Can't set participation in synchronized adjustment",adjustable));884 throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable)); 885 885 886 886 enabledMap.put(adjustable, isParticipating); … … 897 897 protected boolean isParticipatingInSynchronizedScrolling(Adjustable adjustable) throws IllegalStateException { 898 898 if (! synchronizedAdjustables.contains(adjustable)) 899 throw new IllegalStateException(tr(" adjustable {0} not registered yet",adjustable));899 throw new IllegalStateException(tr("Adjustable {0} not registered yet.", adjustable)); 900 900 901 901 return enabledMap.get(adjustable); … … 920 920 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException { 921 921 if (adjustable == null) 922 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));922 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 923 923 if (view == null) 924 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "view"));924 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view")); 925 925 926 926 if (! synchronizedAdjustables.contains(adjustable)) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListMergeModel.java
r2165 r2181 31 31 public void populate(Way my, Way their) { 32 32 if (my == null) 33 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "my"));33 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my")); 34 34 if (their == null) 35 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "their"));35 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their")); 36 36 getMergedEntries().clear(); 37 37 getMyEntries().clear(); … … 65 65 public WayNodesConflictResolverCommand buildResolveCommand(Way my, Way their) { 66 66 if (my == null) 67 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "my"));67 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my")); 68 68 if (their == null) 69 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "their"));69 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their")); 70 70 if (! isFrozen()) 71 throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command")); 71 throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command.")); 72 72 return new WayNodesConflictResolverCommand(my, their, getMergedEntries()); 73 73 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/nodes/NodeListTableCellRenderer.java
r2039 r2181 180 180 default: 181 181 // should not happen 182 throw new RuntimeException(tr(" unexpected column index. Got {0}", column));182 throw new RuntimeException(tr("Unexpected column index. Got {0}.", column)); 183 183 } 184 184 return this; -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMergeModel.java
r2070 r2181 295 295 public void decideDeletedStateConflict(MergeDecisionType decision) throws IllegalArgumentException{ 296 296 if (decision == null) 297 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "decision"));297 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision")); 298 298 this.deletedMergeDecision = decision; 299 299 setChanged(); … … 310 310 public void decideVisibleStateConflict(MergeDecisionType decision) throws IllegalArgumentException { 311 311 if (decision == null) 312 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "decision"));312 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision")); 313 313 this.visibleMergeDecision = decision; 314 314 setChanged(); -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/relation/RelationMemberListMergeModel.java
r2165 r2181 71 71 public void populate(Relation my, Relation their) { 72 72 if (my == null) 73 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "my"));73 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my")); 74 74 if (their == null) 75 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "their"));75 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their")); 76 76 77 77 getMergedEntries().clear(); … … 114 114 public RelationMemberConflictResolverCommand buildResolveCommand(Relation my, Relation their) { 115 115 if (my == null) 116 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "my"));116 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my")); 117 117 if (their == null) 118 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "their"));118 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their")); 119 119 if (! isFrozen()) 120 throw new IllegalArgumentException(tr(" merged nodes not frozen yet. Can't build resolution command"));120 throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command")); 121 121 return new RelationMemberConflictResolverCommand(my, their, getMergedEntries()); 122 122 } -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeItem.java
r2165 r2181 31 31 public TagMergeItem(String key, String myTagValue, String theirTagValue) { 32 32 if (key == null) { 33 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "key"));33 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key")); 34 34 } 35 35 this.key = key; … … 50 50 */ 51 51 public TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their) { 52 if (key == null) throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "key"));53 if (my == null) throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "my"));54 if (their == null) throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "their"));52 if (key == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "key")); 53 if (my == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "my")); 54 if (their == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "their")); 55 55 this.key = key; 56 56 myTagValue = my.get(key); … … 66 66 */ 67 67 public void decide(MergeDecisionType decision) throws IllegalArgumentException { 68 if (decision == null) throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "decision"));68 if (decision == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "decision")); 69 69 this.mergeDecision = decision; 70 70 } … … 96 96 */ 97 97 public void applyToMyPrimitive(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException { 98 if (primitive == null) throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));98 if (primitive == null) throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 99 99 if (mergeDecision == MergeDecisionType.UNDECIDED) { 100 throw new IllegalStateException(tr(" cannot apply undecided tag merge item"));100 throw new IllegalStateException(tr("Cannot apply undecided tag merge item.")); 101 101 } else if (mergeDecision == MergeDecisionType.KEEP_THEIR) { 102 102 if (theirTagValue == null) { -
trunk/src/org/openstreetmap/josm/gui/conflict/pair/tags/TagMergeTableCellRenderer.java
r2017 r2181 37 37 default: 38 38 // should not happen, but just in case 39 throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}", col)); 39 throw new IllegalArgumentException(tr("Parameter 'col' must be 0 or 1. Got {0}.", col)); 40 40 } 41 41 return this; -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/MultiValueResolutionDecision.java
r2141 r2181 49 49 public MultiValueResolutionDecision(TagCollection tags) throws IllegalArgumentException { 50 50 if (tags == null) 51 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "tags"));51 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags")); 52 52 if (tags.isEmpty()) 53 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be empty", "tags"));53 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be empty.", "tags")); 54 54 if (tags.getKeys().size() != 1) 55 throw new IllegalArgumentException(tr(" parameter ''{0}'' with tags for exactly one key expected. Got {1}", "tags", tags.getKeys().size()));55 throw new IllegalArgumentException(tr("Parameter ''{0}'' with tags for exactly one key expected. Got {1}.", "tags", tags.getKeys().size())); 56 56 this.tags = tags; 57 57 autoDecide(); … … 97 97 public void keepOne(String value) throws IllegalArgumentException, IllegalStateException { 98 98 if (value == null) 99 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "value"));99 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "value")); 100 100 if (!tags.getValues().contains(value)) 101 throw new IllegalStateException(tr(" tag collection doesn't include the selected value ''{0}''", value));101 throw new IllegalStateException(tr("Tag collection doesn't include the selected value ''{0}''.", value)); 102 102 this.value = value; 103 103 this.type = MultiValueDecisionType.KEEP_ONE; … … 134 134 public String getChosenValue() throws IllegalStateException { 135 135 switch(type) { 136 case UNDECIDED: throw new IllegalStateException(tr("Not decided yet")); 136 case UNDECIDED: throw new IllegalStateException(tr("Not decided yet.")); 137 137 case KEEP_ONE: return value; 138 138 case KEEP_NONE: return null; … … 211 211 if (primitive == null) return; 212 212 if (!isDecided()) 213 throw new IllegalStateException(tr("Not decided yet")); 213 throw new IllegalStateException(tr("Not decided yet.")); 214 214 String key = tags.getKeys().iterator().next(); 215 215 String value = getChosenValue(); … … 247 247 public Command buildChangeCommand(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException { 248 248 if (primitive == null) 249 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));249 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 250 250 if (!isDecided()) 251 throw new IllegalStateException(tr("Not decided yet")); 251 throw new IllegalStateException(tr("Not decided yet.")); 252 252 String key = tags.getKeys().iterator().next(); 253 253 String value = getChosenValue(); … … 266 266 public Command buildChangeCommand(Collection<? extends OsmPrimitive> primitives) { 267 267 if (primitives == null) 268 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitives"));268 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives")); 269 269 if (!isDecided()) 270 throw new IllegalStateException(tr("Not decided yet")); 270 throw new IllegalStateException(tr("Not decided yet.")); 271 271 String key = tags.getKeys().iterator().next(); 272 272 String value = getChosenValue(); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/RelationMemberConflictDecision.java
r2070 r2181 19 19 public RelationMemberConflictDecision(Relation relation, int pos) throws IllegalArgumentException { 20 20 if (relation == null) 21 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "relation"));21 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "relation")); 22 22 RelationMember member = relation.getMember(pos); 23 23 if (member == null) 24 throw new IndexOutOfBoundsException(tr(" pos{0} is out of range.current number of members: {1}", pos, relation.getMembersCount()));24 throw new IndexOutOfBoundsException(tr("Position {0} is out of range. Current number of members is {1}.", pos, relation.getMembersCount())); 25 25 this.relation = relation; 26 26 this.pos = pos; -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagConflictResolverModel.java
r2070 r2181 84 84 public void populate(TagCollection tags) { 85 85 if (tags == null) 86 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "tags"));86 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "tags")); 87 87 this.tags = tags; 88 88 keys = new ArrayList<String>(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r2070 r2181 177 177 protected void showHistory(History h) throws IllegalArgumentException { 178 178 if (h == null) 179 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "h"));179 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "h")); 180 180 if (HistoryBrowserDialogManager.getInstance().existsDialog(h.getId())) { 181 181 HistoryBrowserDialogManager.getInstance().show(h.getId()); … … 237 237 public History get(int idx) throws IndexOutOfBoundsException { 238 238 if (idx < 0 || idx >= data.size()) 239 throw new IndexOutOfBoundsException(tr(" index out of boundsGot {0}", idx));239 throw new IndexOutOfBoundsException(tr("Index out of bounds. Got {0}.", idx)); 240 240 return data.get(idx); 241 241 } … … 340 340 //putValue(Action.SMALL_ICON, ImageProvider.get("dialogs","refresh")); 341 341 putValue(Action.NAME, tr("Show")); 342 putValue(Action.SHORT_DESCRIPTION, tr("Display the history of the selected primitive")); 342 putValue(Action.SHORT_DESCRIPTION, tr("Display the history of the selected primitive.")); 343 343 } 344 344 -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r2159 r2181 279 279 this(); 280 280 if (layer == null) 281 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));281 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 282 282 this.layer = layer; 283 283 putValue(NAME, tr("Delete")); … … 360 360 this(); 361 361 if (layer == null) 362 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));362 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 363 363 this.layer = layer; 364 364 putValue(NAME, tr("Show/Hide")); … … 407 407 this(); 408 408 if (layer == null) 409 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));409 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 410 410 this.layer = layer; 411 411 putValue(NAME, tr("Activate")); … … 462 462 this(); 463 463 if (layer == null) 464 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));464 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 465 465 this.layer = layer; 466 466 putValue(NAME, tr("Merge")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ChildRelationBrowser.java
r2070 r2181 119 119 public ChildRelationBrowser(OsmDataLayer layer) throws IllegalArgumentException { 120 120 if (layer == null) 121 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));121 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 122 122 this.layer = layer; 123 123 model = new RelationTreeModel(); … … 176 176 class EditAction extends AbstractAction implements TreeSelectionListener { 177 177 public EditAction() { 178 putValue(SHORT_DESCRIPTION, tr("Edit the relation the currently selected relation member refers to")); 178 putValue(SHORT_DESCRIPTION, tr("Edit the relation the currently selected relation member refers to.")); 179 179 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit")); 180 180 putValue(NAME, tr("Edit")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/ParentRelationLoadingTask.java
r2077 r2181 76 76 super(tr("Download referring relations"), monitor, false /* don't ignore exception */); 77 77 if (child == null) 78 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "child"));78 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "child")); 79 79 if (layer == null) 80 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));80 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 81 81 if (child.getId() == 0) 82 throw new IllegalArgumentException(tr("child.getId() >0 expected. Got {1}", child.getId())); 82 throw new IllegalArgumentException(tr("Value of child.getId() > 0 expected. Got {1}.", child.getId())); 83 83 referrers = null; 84 84 this.layer = layer; … … 197 197 } catch(Exception e) { 198 198 if (cancelled) { 199 System.out.println(tr("Warning: ignoring exception because task is cancelled. Exception: {0}", e.toString()));199 System.out.println(tr("Warning: Ignoring exception because task is cancelled. Exception: {0}", e.toString())); 200 200 return; 201 201 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/RelationEditor.java
r2070 r2181 106 106 ); 107 107 if (layer == null) 108 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));108 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 109 109 this.layer = layer; 110 110 setRelation(relation); -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/SelectionTableModel.java
r2017 r2181 31 31 public SelectionTableModel(OsmDataLayer layer) throws IllegalArgumentException { 32 32 if (layer == null) 33 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));33 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 34 34 this.layer = layer; 35 35 cache = new ArrayList<OsmPrimitive>(); -
trunk/src/org/openstreetmap/josm/gui/history/AdjustmentSynchronizer.java
r2165 r2181 76 76 protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) { 77 77 if (adjustable == null) 78 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));78 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 79 79 80 80 if (! synchronizedAdjustables.contains(adjustable)) 81 throw new IllegalStateException(tr(" adjustable {0} not registered yet. Can't set participation in synchronized adjustment",adjustable));81 throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can't set participation in synchronized adjustment.", adjustable)); 82 82 83 83 enabledMap.put(adjustable, isParticipating); … … 94 94 protected boolean isParticipatingInSynchronizedScrolling(Adjustable adjustable) throws IllegalStateException { 95 95 if (! synchronizedAdjustables.contains(adjustable)) 96 throw new IllegalStateException(tr(" adjustable {0} not registered yet",adjustable));96 throw new IllegalStateException(tr("Adjustable {0} not registered yet.", adjustable)); 97 97 98 98 return enabledMap.get(adjustable); … … 117 117 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException { 118 118 if (adjustable == null) 119 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "adjustable"));119 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 120 120 if (view == null) 121 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "view"));121 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view")); 122 122 123 123 if (! synchronizedAdjustables.contains(adjustable)) { -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r2044 r2181 140 140 public TagTableModel getTagTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 141 141 if (pointInTimeType == null) 142 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));142 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 143 143 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 144 144 return currentTagTableModel; … … 152 152 public NodeListTableModel getNodeListTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 153 153 if (pointInTimeType == null) 154 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));154 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 155 155 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 156 156 return currentNodeListTableModel; … … 164 164 public RelationMemberTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 165 165 if (pointInTimeType == null) 166 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));166 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 167 167 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 168 168 return currentRelationMemberTableModel; … … 176 176 public void setReferencePointInTime(HistoryOsmPrimitive reference) throws IllegalArgumentException, IllegalStateException{ 177 177 if (reference == null) 178 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "reference"));178 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "reference")); 179 179 if (history == null) 180 throw new IllegalStateException(tr(" history not initialized yet. Failed to set reference primitive."));180 throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive.")); 181 181 if (reference.getId() != history.getId()) 182 throw new IllegalArgumentException(tr(" failed to set reference.referenceid{0} doesn't match historyid {1}", reference.getId(), history.getId()));182 throw new IllegalArgumentException(tr("Failed to set reference. Reference ID {0} does not match history ID {1}.", reference.getId(), history.getId())); 183 183 HistoryOsmPrimitive primitive = history.getByVersion(reference.getVersion()); 184 184 if (primitive == null) 185 throw new IllegalArgumentException(tr(" failed to set reference.reference version {0} not available in history", reference.getVersion()));185 throw new IllegalArgumentException(tr("Failed to set reference. Reference version {0} not available in history.", reference.getVersion())); 186 186 187 187 this.reference = reference; … … 195 195 public void setCurrentPointInTime(HistoryOsmPrimitive current) throws IllegalArgumentException, IllegalStateException{ 196 196 if (current == null) 197 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "current"));197 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "current")); 198 198 if (history == null) 199 throw new IllegalStateException(tr(" history not initialized yet. Failed to set current primitive."));199 throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive.")); 200 200 if (current.getId() != history.getId()) 201 throw new IllegalArgumentException(tr(" failed to set reference.referenceid{0} doesn't match historyid {1}", current.getId(), history.getId()));201 throw new IllegalArgumentException(tr("Hailed to set reference. Reference ID {0} does not match history ID {1}.", current.getId(), history.getId())); 202 202 HistoryOsmPrimitive primitive = history.getByVersion(current.getVersion()); 203 203 if (primitive == null) 204 throw new IllegalArgumentException(tr(" failed to set current. current version {0} not available in history", current.getVersion()));204 throw new IllegalArgumentException(tr("Failed to set current primitive. Current version {0} not available in history.", current.getVersion())); 205 205 this.current = current; 206 206 initTagTableModels(); … … 238 238 public HistoryOsmPrimitive getPointInTime(PointInTimeType type) throws IllegalArgumentException { 239 239 if (type == null) 240 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "type"));240 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 241 241 if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 242 242 return current; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r2070 r2181 38 38 public HistoryLoadTask add(long id, OsmPrimitiveType type) { 39 39 if (id <= 0) 40 throw new IllegalArgumentException(tr(" id> 0 expected, got {0}", id));40 throw new IllegalArgumentException(tr("ID > 0 expected. Got {0}.", id)); 41 41 if (type == null) 42 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "type"));42 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 43 43 if (!toLoad.containsKey(id)) { 44 44 toLoad.put(id, type); … … 49 49 public HistoryLoadTask add(HistoryOsmPrimitive primitive) { 50 50 if (primitive == null) 51 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));51 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 52 52 if (!toLoad.containsKey(primitive.getId())) { 53 53 toLoad.put(primitive.getId(), primitive.getType()); … … 58 58 public HistoryLoadTask add(History history) { 59 59 if (history == null) 60 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "history"));60 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "history")); 61 61 if (!toLoad.containsKey(history.getId())) { 62 62 toLoad.put(history.getId(), history.getEarliest().getType()); … … 67 67 public HistoryLoadTask add(OsmPrimitive primitive) { 68 68 if (primitive == null) 69 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitive"));69 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 70 70 return add(primitive.getId(), OsmPrimitiveType.from(primitive)); 71 71 } … … 73 73 public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) { 74 74 if (primitives == null) 75 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "primitives"));75 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives")); 76 76 for (OsmPrimitive primitive: primitives) { 77 77 if (primitive == null) { -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r2096 r2181 74 74 public VersionInfoPanel(HistoryBrowserModel model, PointInTimeType pointInTimeType) throws IllegalArgumentException { 75 75 if (pointInTimeType == null) 76 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "pointInTimeType"));76 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 77 77 if (model == null) 78 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "model"));78 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "model")); 79 79 80 80 this.model = model; -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerInfo.java
r2025 r2181 29 29 public SaveLayerInfo(OsmDataLayer layer) { 30 30 if (layer == null) 31 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layer"));31 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layer")); 32 32 this.layer = layer; 33 33 this.doSaveToFile = layer.requiresSaveToFile(); -
trunk/src/org/openstreetmap/josm/gui/io/SaveLayerTask.java
r2025 r2181 36 36 protected SaveLayerTask(SaveLayerInfo layerInfo, ProgressMonitor monitor) { 37 37 if (layerInfo == null) 38 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "layerInfo"));38 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "layerInfo")); 39 39 if (monitor == null) { 40 40 monitor = NullProgressMonitor.INSTANCE; -
trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
r2158 r2181 997 997 public void addOrUpdate(Changeset cs) { 998 998 if (cs.getId() <= 0 ) 999 throw new IllegalArgumentException(tr(" changesetid> 0 expected. Got {1}", "id", cs.getId()));999 throw new IllegalArgumentException(tr("Changeset ID > 0 expected. Got {0}.", cs.getId())); 1000 1000 internalAddOrUpdate(cs); 1001 1001 fireContentsChanged(this, 0, getSize()); -
trunk/src/org/openstreetmap/josm/gui/io/UploadLayerTask.java
r2115 r2181 49 49 public UploadLayerTask(OsmDataLayer layer, ProgressMonitor monitor, Changeset changeset, boolean closeChangesetAfterUpload) { 50 50 if (layer == null) 51 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", layer));51 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", layer)); 52 52 if (monitor == null) { 53 53 monitor = NullProgressMonitor.INSTANCE; -
trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java
r2025 r2181 25 25 super(new CancelHandler()); 26 26 if (delegate == null) 27 throw new IllegalArgumentException(tr(" parameter ''{0}'' must not be null", "delegate"));27 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "delegate")); 28 28 this.delegate = delegate; 29 29 }
Note:
See TracChangeset
for help on using the changeset viewer.
