- Timestamp:
- 2014-01-03T10:22:49+01:00 (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/data/validator/deprecated.mapcss
r6548 r6605 177 177 fixChangeKey: "monitoring:river_level => monitoring:water_level"; 178 178 } 179 180 /* from http://wiki.openstreetmap.org/wiki/Conditional_restrictions#Deprecated_tags */ 181 *[/(day|date|hour)_(on|off)/] { 182 throwWarning: tr("{0} is deprecated", "{0.key}"); 183 suggestAlternative: "*:conditional"; 184 assertMatch: "node day_on=0-12"; 185 } -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r6593 r6605 17 17 import java.util.Map; 18 18 import java.util.TreeSet; 19 import java.util.regex.Matcher;20 import java.util.regex.Pattern;21 19 22 20 import javax.swing.JOptionPane; … … 28 26 import org.openstreetmap.josm.data.validation.tests.BuildingInBuilding; 29 27 import org.openstreetmap.josm.data.validation.tests.Coastlines; 28 import org.openstreetmap.josm.data.validation.tests.ConditionalKeys; 30 29 import org.openstreetmap.josm.data.validation.tests.CrossingWays; 31 30 import org.openstreetmap.josm.data.validation.tests.DuplicateNode; … … 123 122 MapCSSTagChecker.class, // 3000 .. 3099 124 123 Lanes.class, // 3100 .. 3199 124 ConditionalKeys.class, // 3200 .. 3299 125 125 }; 126 126 … … 133 133 } catch (Exception e) { 134 134 Main.error(e); 135 continue;136 135 } 137 136 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
r6591 r6605 177 177 */ 178 178 public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode) { 179 return checkOpeningHourSyntax(key, value, mode, false); 180 } 181 182 /** 183 * Checks for a correct usage of the opening hour syntax of the {@code value} given according to 184 * <a href="https://github.com/ypid/opening_hours.js">opening_hours.js</a> and returns a list containing 185 * validation errors or an empty list. Null values result in an empty list. 186 * @param key the OSM key (should be "opening_hours", "collection_times" or "service_times"). 187 * @param value the opening hour value to be checked. 188 * @param mode whether to validate {@code value} as a time range, or points in time, or both. 189 * @param ignoreOtherSeverity whether to ignore errors with {@link Severity#OTHER}. 190 * @return a list of {@link TestError} or an empty list 191 */ 192 public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode, boolean ignoreOtherSeverity) { 179 193 if (ENGINE == null || value == null || value.trim().isEmpty()) { 180 194 return Collections.emptyList(); … … 195 209 errors.add(new OpeningHoursTestError(i.toString().trim(), Severity.WARNING, prettifiedValue)); 196 210 } 197 if ( errors.isEmpty() && prettifiedValue != null && !value.equals(prettifiedValue)) {211 if (!ignoreOtherSeverity && errors.isEmpty() && prettifiedValue != null && !value.equals(prettifiedValue)) { 198 212 errors.add(new OpeningHoursTestError(tr("opening_hours value can be prettified"), Severity.OTHER, prettifiedValue)); 199 213 } -
trunk/src/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreference.java
r6529 r6605 274 274 } 275 275 276 /** 277 * Initialize the tagging presets (load and may display error) 278 */ 276 public static void readFromPreferences() { 277 taggingPresets = TaggingPresetReader.readFromPreferences(false); 278 } 279 280 /** 281 * Initialize the tagging presets (load and may display error) 282 */ 279 283 public static void initialize() { 280 taggingPresets = TaggingPresetReader.readFromPreferences(false);284 readFromPreferences(); 281 285 for (TaggingPreset tp: taggingPresets) { 282 286 if (!(tp instanceof TaggingPresetSeparator)) {
Note:
See TracChangeset
for help on using the changeset viewer.