Changeset 19335 in osm for applications/editors/josm/plugins/validator/src
- Timestamp:
- 2010-01-09T15:03:13+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/GridLayer.java
r18593 r19335 138 138 * Visitor that highlights all cells the selected primitives go through 139 139 */ 140 class HighlightCellVisitor extends AbstractVisitor 140 static class HighlightCellVisitor extends AbstractVisitor 141 141 { 142 142 /** The MapView */ -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/OSMValidatorPlugin.java
r19224 r19335 39 39 import org.openstreetmap.josm.plugins.validator.tests.DuplicateWay; 40 40 import org.openstreetmap.josm.plugins.validator.tests.DuplicatedWayNodes; 41 import org.openstreetmap.josm.plugins.validator.tests.MultipolygonTest; 41 42 import org.openstreetmap.josm.plugins.validator.tests.NameMismatch; 42 43 import org.openstreetmap.josm.plugins.validator.tests.NodesWithSameName; … … 80 81 /** 81 82 * All available tests 82 * TODO: is there any way to find out automa gically all available tests?83 * TODO: is there any way to find out automatically all available tests? 83 84 */ 84 85 @SuppressWarnings("unchecked") … … 99 100 DuplicateWay.class, // ID 1401 .. 1499 100 101 NameMismatch.class, // ID 1501 .. 1599 102 MultipolygonTest.class, // ID 1601 .. 1699 101 103 }; 102 104 … … 134 136 } 135 137 } catch (final FileNotFoundException e) { 138 // Ignore 136 139 } catch (final IOException e) { 137 140 e.printStackTrace(); … … 157 160 158 161 private ValidateUploadHook uploadHook; 159 162 160 163 @Override 161 164 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { … … 166 169 if (Main.pref.hasKey(PreferenceEditor.PREF_DEBUG + ".grid")) 167 170 Main.main.addLayer(new GridLayer(tr("Grid"))); 168 MapView.addLayerChangeListener(this); 171 MapView.addLayerChangeListener(this); 169 172 } else 170 173 MapView.removeLayerChangeListener(this); … … 273 276 } catch (InvocationTargetException ite) { 274 277 ite.getCause().printStackTrace(); 275 JOptionPane.showMessageDialog(Main.parent, 278 JOptionPane.showMessageDialog(Main.parent, 276 279 tr("Error initializing test {0}:\n {1}", test.getClass() 277 280 .getSimpleName(), ite.getCause().getMessage()), … … 280 283 } catch (Exception e) { 281 284 e.printStackTrace(); 282 JOptionPane.showMessageDialog(Main.parent, 285 JOptionPane.showMessageDialog(Main.parent, 283 286 tr("Error initializing test {0}:\n {1}", test.getClass() 284 287 .getSimpleName(), e), -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/Test.java
r18928 r19335 3 3 import static org.openstreetmap.josm.tools.I18n.tr; 4 4 5 import java.awt.GridBagConstraints; 5 6 import java.util.ArrayList; 6 7 import java.util.Collection; … … 32 33 { 33 34 /** Name of the test */ 34 protected String name; 35 protected final String name; 35 36 36 37 /** Description of the test */ 37 protected String description; 38 protected final String description; 38 39 39 40 /** Whether this test is enabled. Enabled by default */ … … 77 78 public Test(String name) 78 79 { 79 this .name = name;80 this(name, null); 80 81 } 81 82 … … 162 163 163 164 GBC a = GBC.eol(); 164 a.anchor = G BC.EAST;165 a.anchor = GridBagConstraints.EAST; 165 166 checkBeforeUpload = new JCheckBox(); 166 167 checkBeforeUpload.setSelected(testBeforeUpload); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/ValidatorDialog.java
r19226 r19335 438 438 if (!Main.pref.getBoolean(PreferenceEditor.PREF_FILTER_BY_SELECTION, false)) 439 439 return; 440 if (newSelection == null || newSelection.size() == 0)440 if (newSelection.isEmpty()) 441 441 tree.setFilter(null); 442 442 HashSet<OsmPrimitive> filter = new HashSet<OsmPrimitive>(newSelection); -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/CrossingWays.java
r18344 r19335 166 166 * @author frsantos 167 167 */ 168 private class ExtendedSegment 168 private static class ExtendedSegment 169 169 { 170 170 public Node n1, n2; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/DuplicateWay.java
r18092 r19335 28 28 { 29 29 30 private class WayPair { 30 private static class WayPair { 31 31 public List<LatLon> coor; 32 32 public Map<String, String> keys; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/TagChecker.java
r19229 r19335 886 886 protected static int TAG_CHECK_INFO = 1270; 887 887 888 private class CheckerElement { 888 private static class CheckerElement { 889 889 public Object tag; 890 890 public Object value; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/tests/UnconnectedWays.java
r18848 r19335 226 226 // return !w.containsNode(n) 227 227 // && line.ptSegDist(n.getEastNorth().east(), n.getEastNorth().north()) < dist; 228 if (w == null) 228 if (w == null) { 229 229 Main.debug("way null"); 230 return false; 231 } 230 232 if (w.containsNode(n)) 231 233 return false; -
applications/editors/josm/plugins/validator/src/org/openstreetmap/josm/plugins/validator/util/Entities.java
r13497 r19335 341 341 if (firstAmp < 0) 342 342 return str; 343 String res = new String(str.substring(0, firstAmp));343 String res = str.substring(0, firstAmp); 344 344 int len = str.length(); 345 345 for (int i = firstAmp; i < len; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.