- Timestamp:
- 2017-10-09T01:17:00+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r12865 r12958 30 30 */ 31 31 public abstract class CrossingWays extends Test { 32 protected static final int CROSSING_WAYS = 601;33 32 34 33 static final String HIGHWAY = "highway"; … … 41 40 private final Map<List<Way>, List<WaySegment>> seenWays = new HashMap<>(50); 42 41 42 private final int code; 43 43 44 /** 44 45 * General crossing ways test. 45 46 */ 46 47 public static class Ways extends CrossingWays { 48 49 protected static final int CROSSING_WAYS = 601; 47 50 48 51 /** … … 50 53 */ 51 54 public Ways() { 52 super(tr("Crossing ways") );55 super(tr("Crossing ways"), CROSSING_WAYS); 53 56 } 54 57 … … 107 110 public static class Boundaries extends CrossingWays { 108 111 112 protected static final int CROSSING_BOUNDARIES = 602; 113 109 114 /** 110 115 * Constructs a new crossing {@code Boundaries} test. 111 116 */ 112 117 public Boundaries() { 113 super(tr("Crossing boundaries") );118 super(tr("Crossing boundaries"), CROSSING_BOUNDARIES); 114 119 } 115 120 … … 142 147 */ 143 148 public static class Barrier extends CrossingWays { 149 150 protected static final int CROSSING_BARRIERS = 603; 144 151 145 152 /** … … 147 154 */ 148 155 public Barrier() { 149 super(tr("Crossing barriers") );156 super(tr("Crossing barriers"), CROSSING_BARRIERS); 150 157 } 151 158 … … 170 177 */ 171 178 public static class SelfCrossing extends CrossingWays { 179 180 protected static final int CROSSING_SELF = 604; 181 172 182 CrossingWays.Ways normalTest = new Ways(); 173 183 CrossingWays.Barrier barrierTest = new Barrier(); … … 178 188 */ 179 189 public SelfCrossing() { 180 super(tr("Self crossing") );190 super(tr("Self crossing"), CROSSING_SELF); 181 191 } 182 192 … … 201 211 * Constructs a new {@code CrossingWays} test. 202 212 * @param title The test title 203 * @since 6691 204 */ 205 public CrossingWays(String title) { 213 * @param code The test code 214 * @since 12958 215 */ 216 public CrossingWays(String title, int code) { 206 217 super(title, tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, " + 207 218 "but are not connected by a node.")); 219 this.code = code; 208 220 } 209 221 … … 290 302 291 303 final String message = createMessage(es1.way, es2.way); 292 errors.add(TestError.builder(this, Severity.WARNING, CROSSING_WAYS)304 errors.add(TestError.builder(this, Severity.WARNING, code) 293 305 .message(message) 294 306 .primitives(prims)
Note:
See TracChangeset
for help on using the changeset viewer.