Changeset 7599 in josm for trunk/src/org
- Timestamp:
- 2014-10-05T01:24:20+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/APIDataSet.java
r7120 r7599 29 29 30 30 /** 31 * Represents a collection of {@link OsmPrimitive}s which should be uploaded to the 32 * API. 31 * Represents a collection of {@link OsmPrimitive}s which should be uploaded to the API. 33 32 * The collection is derived from the modified primitives of an {@link DataSet} and it provides methods 34 33 * for sorting the objects in upload order. 35 * 34 * @since 2025 36 35 */ 37 36 public class APIDataSet { … … 65 64 66 65 for (OsmPrimitive osm :primitives) { 67 if (osm.get("josm/ignore") != null) {68 continue;69 }70 66 if (osm.isNewOrUndeleted() && !osm.isDeleted()) { 71 67 toAdd.add(osm); -
trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
r7417 r7599 28 28 import org.openstreetmap.josm.command.ChangePropertyKeyCommand; 29 29 import org.openstreetmap.josm.command.Command; 30 import org.openstreetmap.josm.command.DeleteCommand; 30 31 import org.openstreetmap.josm.command.SequenceCommand; 31 32 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 37 38 import org.openstreetmap.josm.data.validation.TestError; 38 39 import org.openstreetmap.josm.gui.mappaint.Environment; 40 import org.openstreetmap.josm.gui.mappaint.Keyword; 39 41 import org.openstreetmap.josm.gui.mappaint.MultiCascade; 40 42 import org.openstreetmap.josm.gui.mappaint.mapcss.Condition; … … 139 141 protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<>(); 140 142 protected final Map<String, Boolean> assertions = new HashMap<>(); 143 protected boolean deletion = false; 141 144 142 145 TagCheck(GroupedMapCSSRule rule) { … … 210 213 : ai.val instanceof String 211 214 ? (String) ai.val 215 : ai.val instanceof Keyword 216 ? ((Keyword) ai.val).val 212 217 : null; 213 218 if (ai.key.startsWith("throw")) { … … 238 243 final String[] x = val.split("=>", 2); 239 244 check.keyChange.put(Tag.removeWhiteSpaces(x[0]), Tag.removeWhiteSpaces(x[1])); 245 } else if ("fixDeleteObject".equals(ai.key) && val != null) { 246 CheckParameterUtil.ensureThat(val.equals("this"), "fixDeleteObject must be followed by 'this'"); 247 check.deletion = true; 240 248 } else if ("suggestAlternative".equals(ai.key) && val != null) { 241 249 check.alternatives.add(val); … … 388 396 */ 389 397 Command fixPrimitive(OsmPrimitive p) { 390 if (change.isEmpty() && keyChange.isEmpty() ) {398 if (change.isEmpty() && keyChange.isEmpty() && !deletion) { 391 399 return null; 392 400 } … … 403 411 final String newKey = insertArguments(matchingSelector, i.getValue()); 404 412 cmds.add(new ChangePropertyKeyCommand(p, oldKey, newKey)); 413 } 414 if (deletion) { 415 cmds.add(new DeleteCommand(p)); 405 416 } 406 417 return new SequenceCommand(tr("Fix of {0}", getDescriptionForMatchingSelector(p, matchingSelector)), cmds);
Note:
See TracChangeset
for help on using the changeset viewer.