Changeset 1666 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2009-06-13T07:26:19+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui/conflict/properties
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/conflict/properties/PropertiesMergeModel.java
r1654 r1666 19 19 20 20 /** 21 * This is the model for resolving conflicts in the values of same properties of22 * {@see OsmPrimitive} . In particular, it represents conflicts in the coordiates of {@see Node}s and21 * This is the model for resolving conflicts in the properties of thw 22 * {@see OsmPrimitive}s. In particular, it represents conflicts in the coordiates of {@see Node}s and 23 23 * the deleted state of {@see OsmPrimitive}s. 24 24 * … … 69 69 70 70 /** 71 * replies true if there is a coordi ate conflict and if this conflict is71 * replies true if there is a coordinate conflict and if this conflict is 72 72 * resolved 73 73 * 74 * @return true if there is a coordi ate conflict and if this conflict is74 * @return true if there is a coordinate conflict and if this conflict is 75 75 * resolved; false, otherwise 76 76 */ … … 91 91 92 92 /** 93 * replies true if the current decision for the coordi ate conflict is <code>decision</code>94 * 95 * @return true if the current decision for the coordi ate conflict is <code>decision</code>;93 * replies true if the current decision for the coordinate conflict is <code>decision</code> 94 * 95 * @return true if the current decision for the coordinate conflict is <code>decision</code>; 96 96 * false, otherwise 97 97 */ … … 136 136 137 137 138 /** 139 * replies the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 140 * coordinates (i.e. because it is a {@see Way}). 141 * 142 * @return the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 143 * coordinates (i.e. because it is a {@see Way}). 144 */ 138 145 public LatLon getMyCoords() { 139 146 return myCoords; 140 147 } 141 148 149 /** 150 * replies the coordinates of their {@see OsmPrimitive}. null, if their primitive hasn't 151 * coordinates (i.e. because it is a {@see Way}). 152 * 153 * @return the coordinates of my {@see OsmPrimitive}. null, if my primitive hasn't 154 * coordinates (i.e. because it is a {@see Way}). 155 */ 142 156 public LatLon getTheirCoords() { 143 157 return theirCoords; 144 158 } 145 159 160 /** 161 * replies the coordinates of the merged {@see OsmPrimitive}. null, if the current primitives 162 * have no coordinates or if the conflict is yet {@see MergeDecisionType#UNDECIDED} 163 * 164 * @return the coordinates of the merged {@see OsmPrimitive}. null, if the current primitives 165 * have no coordinates or if the conflict is yet {@see MergeDecisionType#UNDECIDED} 166 */ 146 167 public LatLon getMergedCoords() { 147 168 switch(coordMergeDecision) { … … 154 175 } 155 176 177 /** 178 * decides a conflict between my and their coordinates 179 * 180 * @param decision the decision 181 */ 156 182 public void decideCoordsConflict(MergeDecisionType decision) { 157 183 coordMergeDecision = decision; … … 161 187 } 162 188 189 /** 190 * replies my deleted state, 191 * @return 192 */ 163 193 public Boolean getMyDeletedState() { 164 194 return myDeletedState; … … 186 216 } 187 217 218 /** 219 * replies true if my and their primitive have a conflict between 220 * their coordinate values 221 * 222 * @return true if my and their primitive have a conflict between 223 * their coordinate values; false otherwise 224 */ 188 225 public boolean hasCoordConflict() { 189 226 if (myCoords == null && theirCoords != null) return true; … … 193 230 } 194 231 232 /** 233 * replies true if my and their primitive have a conflict between 234 * their deleted states 235 * 236 * @return true if my and their primitive have a conflict between 237 * their deleted states 238 */ 195 239 public boolean hasDeletedStateConflict() { 196 240 return myDeletedState != theirDeletedState; 197 241 } 198 242 243 /** 244 * replies true if all conflict in this model are resolved 245 * 246 * @return true if all conflict in this model are resolved; false otherwise 247 */ 199 248 public boolean isResolvedCompletely() { 200 249 boolean ret = true; … … 208 257 } 209 258 259 /** 260 * builds the command(s) to apply the conflict resolutions to my primitive 261 * 262 * @param my my primitive 263 * @param their their primitive 264 * @return the list of commands 265 */ 210 266 public List<Command> buildResolveCommand(OsmPrimitive my, OsmPrimitive their) { 211 267 ArrayList<Command> cmds = new ArrayList<Command>(); … … 214 270 } 215 271 if (hasDeletedStateConflict() && isDecidedDeletedState()) { 216 cmds.add(new DeletedStateConflictResolveCommand(my, their, coordMergeDecision));272 cmds.add(new DeletedStateConflictResolveCommand(my, their, deletedMergeDecision)); 217 273 } 218 274 return cmds; -
trunk/src/org/openstreetmap/josm/gui/conflict/properties/PropertiesMerger.java
r1654 r1666 21 21 22 22 import org.openstreetmap.josm.data.coor.LatLon; 23 import org.openstreetmap.josm.data.osm.OsmPrimitive;24 23 import org.openstreetmap.josm.gui.conflict.MergeDecisionType; 25 24 import org.openstreetmap.josm.tools.ImageProvider;
Note:
See TracChangeset
for help on using the changeset viewer.