Changeset 1655 in josm
- Timestamp:
- 2009-06-08T17:34:50+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/ListMerger.java
r1653 r1655 53 53 protected ListMergeModel<T> model; 54 54 55 56 55 private CopyStartLeftAction copyStartLeftAction; 57 56 private CopyBeforeCurrentLeftAction copyBeforeCurrentLeftAction; … … 880 879 protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) { 881 880 if (adjustable == null) 882 throw new IllegalArgumentException(tr(" argument \"adjustable\" must not be null"));881 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "adjustable")); 883 882 884 883 if (! synchronizedAdjustables.contains(adjustable)) … … 921 920 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException { 922 921 if (adjustable == null) 923 throw new IllegalArgumentException(tr(" argument \"adjustable\" must not be null"));922 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "adjustable")); 924 923 if (view == null) 925 throw new IllegalArgumentException(tr(" argument \"view\" must not be null"));924 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "view")); 926 925 927 926 if (! synchronizedAdjustables.contains(adjustable)) { -
trunk/src/org/openstreetmap/josm/gui/conflict/nodes/NodeListMergeModel.java
r1650 r1655 31 31 public void populate(Way my, Way their) { 32 32 if (my == null) 33 throw new IllegalArgumentException(tr("parameter \"way\" must not be null"));33 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my")); 34 34 if (their == null) 35 throw new IllegalArgumentException(tr("parameter \"their\" must not be null"));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 \"my\" most not be null"));67 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my")); 68 68 if (their == null) 69 throw new IllegalArgumentException(tr("parameter \"my\" most not be null"));69 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their")); 70 70 if (! isFrozen()) 71 71 throw new IllegalArgumentException(tr("Merged nodes not frozen yet. Can't build resolution command")); -
trunk/src/org/openstreetmap/josm/gui/conflict/relation/RelationMemberListMergeModel.java
r1650 r1655 72 72 public void populate(Relation my, Relation their) { 73 73 if (my == null) 74 throw new IllegalArgumentException(tr("parameter way must not be null"));74 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my")); 75 75 if (their == null) 76 throw new IllegalArgumentException(tr("parameter their must not be null"));76 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their")); 77 77 78 78 getMergedEntries().clear(); … … 118 118 public RelationMemberConflictResolverCommand buildResolveCommand(Relation my, Relation their) { 119 119 if (my == null) 120 throw new IllegalArgumentException(tr("parameter my most not be null"));120 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my")); 121 121 if (their == null) 122 throw new IllegalArgumentException(tr("parameter my most not be null"));122 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their")); 123 123 if (! isFrozen()) 124 124 throw new IllegalArgumentException(tr("merged nodes not frozen yet. Can't build resolution command")); -
trunk/src/org/openstreetmap/josm/gui/conflict/tags/TagMergeItem.java
r1654 r1655 10 10 11 11 /** 12 * TagMergeItem represents an individual merge action for a specific pair of key/value. 13 * 12 * TagMergeItem represents an individual merge action for a specific pair of key/value. 13 * 14 14 * A TagMergeItem manages the values of the two key/value-pairs and keeps track of the applied 15 * merge decision. 15 * merge decision. 16 16 * 17 17 */ 18 18 public class TagMergeItem { 19 19 20 20 private String key = null; 21 21 private String myTagValue = null; 22 22 private String theirTagValue = null; 23 23 private MergeDecisionType mergeDecision = MergeDecisionType.UNDECIDED; 24 25 24 26 25 /** 27 26 * constructor 28 * 27 * 29 28 * @param key the common tag key. Must not be null. 30 * @param myTagValue the value for this key known in the local dataset 31 * @param theirTagValue the value for this key known in the dataset on the server 29 * @param myTagValue the value for this key known in the local dataset 30 * @param theirTagValue the value for this key known in the dataset on the server 32 31 * @throws IllegalArgumentException if key is null 33 32 */ 34 33 public TagMergeItem(String key, String myTagValue, String theirTagValue) { 35 34 if (key == null) { 36 throw new IllegalArgumentException(tr("parameter ' key' must not be null"));35 throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "key")); 37 36 } 38 37 this.key = key; … … 41 40 this.mergeDecision = MergeDecisionType.UNDECIDED; 42 41 } 43 42 44 43 /** 45 44 * constructor 46 * 45 * 47 46 * @param key the tag key common to the merged OSM primitives. Must not be null. 48 * @param my my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null. 47 * @param my my version of the OSM primitive (i.e. the version known in the local dataset). Must not be null. 49 48 * @param their their version of the OSM primitive (i.e. the version known on the server). Must not be null. 50 49 * @throws IllegalArgumentException thrown if key is null … … 53 52 */ 54 53 public TagMergeItem(String key, OsmPrimitive my, OsmPrimitive their) { 55 if (key == null) throw new IllegalArgumentException(tr("parameter ' key' must not be null"));56 if (my == null) throw new IllegalArgumentException(tr("parameter ' my' must not be null"));57 if (their == null) throw new IllegalArgumentException(tr("parameter ' their' must not be null"));54 if (key == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "key")); 55 if (my == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "my")); 56 if (their == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "their")); 58 57 this.key = key; 59 58 myTagValue = null; 60 59 if (my.keys != null && my.keys.containsKey(key)) { 61 60 myTagValue = my.keys.get(key); 62 } 61 } 63 62 theirTagValue = null; 64 63 if (their.keys != null && their.keys.containsKey(key)) { … … 66 65 } 67 66 } 68 69 67 70 68 /** 71 * applies a merge decision to this merge item 72 * 69 * applies a merge decision to this merge item 70 * 73 71 * @param decision the merge decision. Must not be null. 74 72 * @exception IllegalArgumentException thrown if decision is null 75 * 73 * 76 74 */ 77 75 public void decide(MergeDecisionType decision) throws IllegalArgumentException { 78 if (decision == null) throw new IllegalArgumentException(tr(" argument 'decision' must not be null"));76 if (decision == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "decision")); 79 77 this.mergeDecision = decision; 80 78 } … … 95 93 return mergeDecision; 96 94 } 97 95 98 96 /** 99 97 * applies the current merge decisions to the tag set of an OSM primitive. The 100 98 * OSM primitive has the role of primitive in the local dataset ('my' primitive, 101 * not 'their' primitive) 102 * 99 * not 'their' primitive) 100 * 103 101 * @param primitive the OSM primitive. Must not be null. 104 102 * @exception IllegalArgumentException thrown, if primitive is null … … 106 104 */ 107 105 public void applyToMyPrimitive(OsmPrimitive primitive) throws IllegalArgumentException, IllegalStateException { 108 if (primitive == null) throw new IllegalArgumentException(tr("parameter ' primitive' must not be null"));106 if (primitive == null) throw new IllegalArgumentException(tr("parameter '{0}' must not be null", "primitive")); 109 107 if (mergeDecision == MergeDecisionType.UNDECIDED) { 110 108 throw new IllegalStateException(tr("cannot apply undecided tag merge item")); … … 126 124 } 127 125 primitive.keys.put(key, myTagValue); 128 } 126 } 129 127 } else { 130 128 // should not happen 131 129 } 132 130 } 133 134 131 }
Note:
See TracChangeset
for help on using the changeset viewer.