Changeset 2407 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2009-11-08T13:38:44+01:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java
r2402 r2407 543 543 544 544 newSelection.add(n); 545 ds.setSelected(n);546 545 } else if (!newNode) { 547 546 title = tr("Connect existing way to node"); -
trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java
r2357 r2407 39 39 this.regexSearch = regexSearch; 40 40 this.tokenizer = tokenizer; 41 childBackRefs = new CollectBackReferencesVisitor( Main.main.getCurrentDataSet());41 childBackRefs = new CollectBackReferencesVisitor(true); 42 42 } 43 43 … … 230 230 231 231 switch (mode) { 232 case NONE: 233 return false; 234 case MISSING_KEY: 235 return osm.get(key) == null; 236 case ANY: 237 return true; 238 case ANY_VALUE: 239 return osm.get(key) != null; 240 case ANY_KEY: 241 for (String v:osm.getKeys().values()) { 242 if (v.equals(value)) 232 case NONE: 233 return false; 234 case MISSING_KEY: 235 return osm.get(key) == null; 236 case ANY: 237 return true; 238 case ANY_VALUE: 239 return osm.get(key) != null; 240 case ANY_KEY: 241 for (String v:osm.getKeys().values()) { 242 if (v.equals(value)) 243 return true; 244 } 245 return false; 246 case EXACT: 247 return value.equals(osm.get(key)); 248 case ANY_KEY_REGEXP: 249 for (String v:osm.getKeys().values()) { 250 if (valuePattern.matcher(v).matches()) 251 return true; 252 } 253 return false; 254 case ANY_VALUE_REGEXP: 255 case EXACT_REGEXP: 256 for (Entry<String, String> entry:osm.entrySet()) { 257 if (keyPattern.matcher(entry.getKey()).matches()) { 258 if (mode == Mode.ANY_VALUE_REGEXP 259 || valuePattern.matcher(entry.getValue()).matches()) 243 260 return true; 244 261 } 245 return false; 246 case EXACT: 247 return value.equals(osm.get(key)); 248 case ANY_KEY_REGEXP: 249 for (String v:osm.getKeys().values()) { 250 if (valuePattern.matcher(v).matches()) 251 return true; 252 } 253 return false; 254 case ANY_VALUE_REGEXP: 255 case EXACT_REGEXP: 256 for (Entry<String, String> entry:osm.entrySet()) { 257 if (keyPattern.matcher(entry.getKey()).matches()) { 258 if (mode == Mode.ANY_VALUE_REGEXP 259 || valuePattern.matcher(entry.getValue()).matches()) 260 return true; 261 } 262 } 263 return false; 264 case MISSING_KEY_REGEXP: 265 for (String k:osm.keySet()) { 266 if (keyPattern.matcher(k).matches()) 267 return false; 268 } 269 return true; 262 } 263 return false; 264 case MISSING_KEY_REGEXP: 265 for (String k:osm.keySet()) { 266 if (keyPattern.matcher(k).matches()) 267 return false; 268 } 269 return true; 270 270 } 271 271 throw new AssertionError("Missed state");
Note:
See TracChangeset
for help on using the changeset viewer.