- Timestamp:
- 2012-01-24T21:52:43+01:00 (12 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r4774 r4869 125 125 * The global paste buffer. 126 126 */ 127 public static PrimitiveDeepCopy pasteBuffer = new PrimitiveDeepCopy();127 public static final PrimitiveDeepCopy pasteBuffer = new PrimitiveDeepCopy(); 128 128 public static Layer pasteSource; 129 129 … … 376 376 } 377 377 378 protected static JPanel contentPanePrivate = new JPanel(new BorderLayout());378 protected static final JPanel contentPanePrivate = new JPanel(new BorderLayout()); 379 379 380 380 /** … … 420 420 /////////////////////////////////////////////////////////////////////////// 421 421 422 public static JPanel panel = new JPanel(new BorderLayout());422 public static final JPanel panel = new JPanel(new BorderLayout()); 423 423 424 424 protected static Rectangle bounds; -
trunk/src/org/openstreetmap/josm/actions/ExtensionFileFilter.java
r4533 r4869 26 26 * list of supported formats 27 27 */ 28 public static ArrayList<FileImporter> importers;29 30 public static ArrayList<FileExporter> exporters;28 public static final ArrayList<FileImporter> importers; 29 30 public static final ArrayList<FileExporter> exporters; 31 31 32 32 // add some file types only if the relevant classes are there; … … 88 88 } 89 89 } 90 );90 ); 91 91 } 92 92 … … 198 198 if (name.endsWith("."+ext)) 199 199 return true; 200 return false;200 return false; 201 201 } 202 202 -
trunk/src/org/openstreetmap/josm/actions/SimplifyWayAction.java
r4461 r4869 51 51 JOptionPane.WARNING_MESSAGE, 52 52 HelpUtil.ht("/Action/SimplifyWay#SelectAWayToSimplify") 53 );53 ); 54 54 } 55 55 … … 61 61 tr("Simplify all selected ways"), 62 62 null 63 ),64 new ButtonSpec(65 tr("Cancel"),66 ImageProvider.get("cancel"),67 tr("Cancel operation"),68 null69 )63 ), 64 new ButtonSpec( 65 tr("Cancel"), 66 ImageProvider.get("cancel"), 67 tr("Cancel operation"), 68 null 69 ) 70 70 }; 71 71 int ret = HelpAwareOptionPane.showOptionDialog( … … 74 74 "The selection contains {0} ways. Are you sure you want to simplify them all?", 75 75 numWays 76 ),77 tr("Simplify ways?"),78 JOptionPane.WARNING_MESSAGE,79 null, // no special icon80 options,81 options[0],82 HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll")83 );76 ), 77 tr("Simplify ways?"), 78 JOptionPane.WARNING_MESSAGE, 79 null, // no special icon 80 options, 81 options[0], 82 HelpUtil.ht("/Action/SimplifyWay#ConfirmSimplifyAll") 83 ); 84 84 return ret == 0; 85 85 } … … 94 94 alertSelectAtLeastOneWay(); 95 95 return; 96 } else if (!confirmWayWithNodesOutsideBoundingBox(ways)) {96 } else if (!confirmWayWithNodesOutsideBoundingBox(ways)) 97 97 return; 98 } 99 else if (ways.size() > 10) { 98 else if (ways.size() > 10) { 100 99 if (!confirmSimplifyManyWays(ways.size())) 101 100 return; … … 114 113 trn("Simplify {0} way", "Simplify {0} ways", allCommands.size(), allCommands.size()), 115 114 allCommands 116 );115 ); 117 116 Main.main.undoRedo.add(rootCommand); 118 117 } finally { … … 235 234 } 236 235 237 public static double EARTH_RAD = 6378137.0;236 public static final double EARTH_RAD = 6378137.0; 238 237 239 238 /* From Aviaton Formulary v1.3 -
trunk/src/org/openstreetmap/josm/data/coor/LatLon.java
r4580 r4869 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.data.coor; 3 4 import static org.openstreetmap.josm.tools.I18n.trc;5 3 6 4 import static java.lang.Math.PI; … … 11 9 import static java.lang.Math.sqrt; 12 10 import static java.lang.Math.toRadians; 11 import static org.openstreetmap.josm.tools.I18n.trc; 13 12 14 13 import java.math.BigDecimal; … … 30 29 public class LatLon extends Coordinate { 31 30 32 31 33 32 /** 34 33 * Minimum difference in location to not be represented as the same position. … … 41 40 private static DecimalFormat cDmsSecondFormatter = new DecimalFormat("00.0"); 42 41 private static DecimalFormat cDmMinuteFormatter = new DecimalFormat("00.000"); 43 public static DecimalFormat cDdFormatter;42 public static final DecimalFormat cDdFormatter; 44 43 static { 45 44 // Don't use the localized decimal separator. This way we can present … … 68 67 return lon >= -180d && lon <= 180d; 69 68 } 70 71 72 73 * 74 75 76 77 78 79 69 70 /** 71 * Replies true if lat is in the range [-90,90] and lon is in the range [-180,180] 72 * 73 * @return true if lat is in the range [-90,90] and lon is in the range [-180,180] 74 */ 75 public boolean isValid() { 76 return isValidLat(lat()) && isValidLon(lon()); 77 } 78 80 79 public static double toIntervalLat(double value) { 81 80 if (value < -90) … … 88 87 /** 89 88 * Returns a valid OSM longitude [-180,+180] for the given extended longitude value. 90 * For example, a value of -181 will return +179, a value of +181 will return -179. 89 * For example, a value of -181 will return +179, a value of +181 will return -179. 91 90 * @param lon A longitude value not restricted to the [-180,+180] range. 92 91 */ 93 92 public static double toIntervalLon(double value) { 94 if (isValidLon(value)) {93 if (isValidLon(value)) 95 94 return value; 96 }else {95 else { 97 96 int n = (int) (value + Math.signum(value)*180.0) / 360; 98 97 return value - n*360.0; 99 98 } 100 99 } 101 100 102 101 /** 103 102 * Replies the coordinate in degrees/minutes/seconds format … … 180 179 Bounds b = Main.getProjection().getWorldBoundsLatLon(); 181 180 return lat() < b.getMin().lat() || lat() > b.getMax().lat() || 182 lon() < b.getMin().lon() || lon() > b.getMax().lon();181 lon() < b.getMin().lon() || lon() > b.getMax().lon(); 183 182 } 184 183 … … 220 219 * http://math.stackexchange.com/questions/720/how-to-calculate-a-heading-on-the-earths-surface 221 220 * for some hints how it is derived.) 222 * 221 * 223 222 * @param other the "destination" position 224 223 * @return heading in the range 0 <= hd < 2*PI … … 233 232 } 234 233 return hd; 235 234 } 236 235 237 236 /** … … 258 257 return "LatLon[lat="+lat()+",lon="+lon()+"]"; 259 258 } 260 259 261 260 /** 262 261 * Returns the value rounded to OSM precisions, i.e. to … … 278 277 public static double roundToOsmPrecisionStrict(double value) { 279 278 double absV = Math.abs(value); 280 int numOfDigits = MAX_SERVER_DIGITS + (absV < 1 ? 0 : (absV < 10 ? 1 : (absV < 100 ? 2 : 3))); 279 int numOfDigits = MAX_SERVER_DIGITS + (absV < 1 ? 0 : (absV < 10 ? 1 : (absV < 100 ? 2 : 3))); 281 280 return BigDecimal.valueOf(value).round(new MathContext(numOfDigits)).doubleValue(); 282 281 } … … 292 291 roundToOsmPrecision(lat()), 293 292 roundToOsmPrecision(lon()) 294 );293 ); 295 294 } 296 295 … … 305 304 roundToOsmPrecisionStrict(lat()), 306 305 roundToOsmPrecisionStrict(lon()) 307 );306 ); 308 307 } 309 308 -
trunk/src/org/openstreetmap/josm/data/imagery/OffsetBookmark.java
r4126 r4869 20 20 21 21 public class OffsetBookmark { 22 public static List<OffsetBookmark> allBookmarks = new ArrayList<OffsetBookmark>();22 public static final List<OffsetBookmark> allBookmarks = new ArrayList<OffsetBookmark>(); 23 23 24 24 public Projection proj; -
trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java
r4409 r4869 57 57 } 58 58 59 public static int MAX_OBJECTS_PER_LEVEL = 16;59 public static final int MAX_OBJECTS_PER_LEVEL = 16; 60 60 class QBLevel 61 61 { … … 312 312 continue; 313 313 } 314 if (found_me) {314 if (found_me) 315 315 /*if (debug) { 316 316 out("[" + this.level + "] next sibling was child nr: " + nr); 317 317 }*/ 318 318 return sibling; 319 }320 /*if (debug) {321 out("[" + this.level + "] nr: " + nr + " is before me, ignoring...");322 }*/323 319 } 324 320 return null; … … 405 401 System.out.print("[" + level + "] qb bbox: " + this.bbox() + " "); 406 402 }*/ 407 if (!this.bbox().intersects(search_bbox)) {403 if (!this.bbox().intersects(search_bbox)) 408 404 /*if (debug) { 409 405 out("miss " + Long.toHexString(this.quad)); … … 411 407 }*/ 412 408 return; 413 }else if (bbox().bounds(search_bbox)) {409 else if (bbox().bounds(search_bbox)) { 414 410 search_cache = this; 415 411 } … … 632 628 public boolean hasNext() 633 629 { 634 if (this.peek() == null) {630 if (this.peek() == null) 635 631 /*if (debug) { 636 632 out(this + " no hasNext(), but iterated over so far: " + iterated_over); 637 633 }*/ 638 634 return false; 639 }640 635 return true; 641 636 } 642 637 T peek() 643 638 { 644 if (current_node == null) {639 if (current_node == null) 645 640 /*if (debug) { 646 641 out("null current leaf, nowhere to go"); 647 642 }*/ 648 643 return null; 649 }650 644 while((current_node.content == null) || 651 645 (content_index >= current_node.content.size())) { … … 659 653 } 660 654 } 661 if (current_node == null || current_node.content == null) {655 if (current_node == null || current_node.content == null) 662 656 /*if (debug) { 663 657 out("late nowhere to go " + current_node); 664 658 }*/ 665 659 return null; 666 }667 660 return current_node.content.get(content_index); 668 661 } -
trunk/src/org/openstreetmap/josm/data/projection/GaussKrueger.java
r4304 r4869 22 22 public class GaussKrueger extends AbstractProjection implements ProjectionSubPrefs { 23 23 24 public static int DEFAULT_ZONE = 2;24 public static final int DEFAULT_ZONE = 2; 25 25 private int zone; 26 27 private static Bounds[] bounds = { 26 27 private static Bounds[] bounds = { 28 28 new Bounds(new LatLon(-5, 3.5), new LatLon(85, 8.5)), 29 29 new Bounds(new LatLon(-5, 6.5), new LatLon(85, 11.5)), … … 33 33 34 34 private static NTV2GridShiftFile BETA2007 = null; 35 35 36 36 private static String[] zones = { "2", "3", "4", "5" }; 37 37 … … 45 45 String gridFileName = "BETA2007.gsb"; 46 46 InputStream is = Main.class.getResourceAsStream("/data/"+gridFileName); 47 if (is == null) {47 if (is == null) 48 48 throw new RuntimeException(tr("Error: failed to open input stream for resource ''/data/{0}''.", gridFileName)); 49 }50 49 BETA2007 = new NTV2GridShiftFile(); 51 50 BETA2007.loadGridShiftFile(is, false); … … 70 69 } 71 70 72 @Override 71 @Override 73 72 public String toString() { 74 73 return tr("Gau\u00DF-Kr\u00FCger"); 75 74 } 76 75 77 76 @Override 78 77 public Integer getEpsgCode() { … … 89 88 return bounds[zone-2]; 90 89 } 91 90 92 91 @Override 93 92 public void setupPreferencePanel(JPanel p, ActionListener listener) { … … 106 105 } 107 106 } 108 107 109 108 @Override 110 109 public Collection<String> getPreferences(JPanel p) { … … 115 114 return Collections.singleton(Integer.toString(zone+2)); 116 115 } 117 116 118 117 @Override 119 118 public void setPreferences(Collection<String> args) { … … 133 132 updateParameters(zone); 134 133 } 135 134 136 135 @Override 137 136 public String[] allCodes() { … … 154 153 return null; 155 154 } 156 155 157 156 } -
trunk/src/org/openstreetmap/josm/data/projection/datum/GRS80Datum.java
r4285 r4869 13 13 public class GRS80Datum extends AbstractDatum { 14 14 15 public static GRS80Datum INSTANCE = new GRS80Datum();16 15 public final static GRS80Datum INSTANCE = new GRS80Datum(); 16 17 17 private GRS80Datum() { 18 18 super(tr("GRS80"), null, Ellipsoid.GRS80); 19 19 } 20 20 21 21 @Override 22 22 public LatLon fromWGS84(LatLon ll) { -
trunk/src/org/openstreetmap/josm/data/projection/datum/WGS84Datum.java
r4285 r4869 12 12 public class WGS84Datum extends AbstractDatum { 13 13 14 public static WGS84Datum INSTANCE = new WGS84Datum();14 public static final WGS84Datum INSTANCE = new WGS84Datum(); 15 15 16 16 private WGS84Datum() { -
trunk/src/org/openstreetmap/josm/data/validation/OsmValidator.java
r4682 r4869 72 72 public static double griddetail; 73 73 74 public static Collection<String> ignoredErrors = new TreeSet<String>();74 public static final Collection<String> ignoredErrors = new TreeSet<String>(); 75 75 76 76 /** -
trunk/src/org/openstreetmap/josm/data/validation/tests/BuildingInBuilding.java
r4806 r4869 24 24 public class BuildingInBuilding extends Test { 25 25 26 protected static int BUILDING_INSIDE_BUILDING = 2001;26 protected static final int BUILDING_INSIDE_BUILDING = 2001; 27 27 protected List<OsmPrimitive> primitivesToCheck = new LinkedList<OsmPrimitive>(); 28 28 protected QuadBuckets<Way> index = new QuadBuckets<Way>(); … … 57 57 // Check that all nodes of w are in polygon 58 58 for (Node n : w.getNodes()) { 59 if (!isInPolygon(n, polygon)) {59 if (!isInPolygon(n, polygon)) 60 60 return false; 61 }62 61 } 63 62 // All nodes can be inside polygon and still, w outside: … … 73 72 for (int i=1; i<w.getNodesCount(); i++) { 74 73 LatLon center = w.getNode(i).getCoor().getCenter(w.getNode(i-1).getCoor()); 75 if (center != null && !isInPolygon(new Node(center), polygon)) {74 if (center != null && !isInPolygon(new Node(center), polygon)) 76 75 return false; 77 }78 76 } 79 77 return true; … … 86 84 @Override 87 85 public boolean evaluate(Way object) { 88 if (p.equals(object)) {86 if (p.equals(object)) 89 87 return false; 90 } else if (p instanceof Node) {88 else if (p instanceof Node) 91 89 return isInPolygon((Node) p, object.getNodes()) || object.getNodes().contains(p); 92 } else if (p instanceof Way) {90 else if (p instanceof Way) 93 91 return isInPolygon((Way) p, object.getNodes()) && !isInInnerWay((Way)p, object); 94 } else {92 else 95 93 return false; 96 }97 94 } 98 95 }); … … 103 100 } 104 101 } 105 102 106 103 private boolean isInInnerWay(Way w, Way outer) { 107 104 for (OsmPrimitive r : outer.getReferrers()) { … … 113 110 if (isInPolygon(inner, outer.getNodes())) { 114 111 // If the tested way is inside this inner, outer is a false positive 115 if (isInPolygon(w, inner.getNodes())) {112 if (isInPolygon(w, inner.getNodes())) 116 113 return true; 117 }118 114 } 119 115 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/Coastlines.java
r4806 r4869 31 31 public class Coastlines extends Test { 32 32 33 protected static int UNORDERED_COASTLINE = 901;34 protected static int REVERSED_COASTLINE = 902;35 protected static int UNCONNECTED_COASTLINE = 903;33 protected static final int UNORDERED_COASTLINE = 901; 34 protected static final int REVERSED_COASTLINE = 902; 35 protected static final int UNCONNECTED_COASTLINE = 903; 36 36 37 37 private List<Way> coastlines; -
trunk/src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java
r4806 r4869 29 29 */ 30 30 public class CrossingWays extends Test { 31 protected static int CROSSING_WAYS = 601;31 protected static final int CROSSING_WAYS = 601; 32 32 33 33 /** All way segments, grouped by cells */ … … 43 43 public CrossingWays() { 44 44 super(tr("Crossing ways"), 45 tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, but are not connected by a node."));45 tr("This test checks if two roads, railways, waterways or buildings crosses in the same layer, but are not connected by a node.")); 46 46 } 47 47 … … 82 82 83 83 String layer1 = w.get("layer"); 84 if ("0".equals(layer1)) layer1 = null; //0 is default value 84 if ("0".equals(layer1)) { 85 layer1 = null; //0 is default value 86 } 85 87 86 88 int nodesSize = w.getNodesCount(); … … 94 96 List<WaySegment> highlight; 95 97 96 if (errorSegments.contains(ws) && errorSegments.contains(es2.ws)) 97 continue; 98 if (errorSegments.contains(ws) && errorSegments.contains(es2.ws)) { 99 continue; 100 } 98 101 99 102 String layer2 = es2.layer; 100 103 String railway2 = es2.railway; 101 104 boolean isCoastline2 = es2.coastline; 102 if (layer1 == null ? layer2 != null : !layer1.equals(layer2)) 103 continue; 104 105 if (!es1.intersects(es2) ) continue; 106 if (isSubway1 && "subway".equals(railway2)) continue; 107 if (isTram1 && "tram".equals(railway2)) continue; 108 109 if (isCoastline1 != isCoastline2) continue; 105 if (layer1 == null ? layer2 != null : !layer1.equals(layer2)) { 106 continue; 107 } 108 109 if (!es1.intersects(es2) ) { 110 continue; 111 } 112 if (isSubway1 && "subway".equals(railway2)) { 113 continue; 114 } 115 if (isTram1 && "tram".equals(railway2)) { 116 continue; 117 } 118 119 if (isCoastline1 != isCoastline2) { 120 continue; 121 } 110 122 if (("river".equals(waterway1) && "riverbank".equals(es2.waterway)) 111 || ("riverbank".equals(waterway1) && "river".equals(es2.waterway))) continue; 123 || ("riverbank".equals(waterway1) && "river".equals(es2.waterway))) { 124 continue; 125 } 112 126 113 127 if ((es1.railway != null && es1.railway.equals("abandoned")) 114 || (railway2 != null && railway2.equals("abandoned"))) continue; 128 || (railway2 != null && railway2.equals("abandoned"))) { 129 continue; 130 } 115 131 116 132 prims = Arrays.asList(es1.ws.way, es2.ws.way); … … 131 147 132 148 errors.add(new TestError(this, Severity.WARNING, 133 message,134 CROSSING_WAYS,135 prims,136 highlight));149 message, 150 CROSSING_WAYS, 151 prims, 152 highlight)); 137 153 ways_seen.put(prims, highlight); 138 154 } else { … … 147 163 148 164 /** 149 * Returns all the cells this segment crosses. Each cell contains the list150 * of segments already processed151 *152 * @param n1 The first node153 * @param n2 The second node154 * @return A list with all the cells the segment crosses155 */165 * Returns all the cells this segment crosses. Each cell contains the list 166 * of segments already processed 167 * 168 * @param n1 The first node 169 * @param n2 The second node 170 * @return A list with all the cells the segment crosses 171 */ 156 172 public List<List<ExtendedSegment>> getSegments(Node n1, Node n2) { 157 173 … … 218 234 219 235 return Line2D.linesIntersect( 220 n1.getEastNorth().east(), n1.getEastNorth().north(),221 n2.getEastNorth().east(), n2.getEastNorth().north(),222 s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(),223 s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north());236 n1.getEastNorth().east(), n1.getEastNorth().north(), 237 n2.getEastNorth().east(), n2.getEastNorth().north(), 238 s2.n1.getEastNorth().east(), s2.n1.getEastNorth().north(), 239 s2.n2.getEastNorth().east(), s2.n2.getEastNorth().north()); 224 240 } 225 241 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
r4806 r4869 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 6 7 import java.awt.GridBagLayout;8 import java.awt.geom.Area;9 7 import java.util.ArrayList; 10 8 import java.util.Collection; … … 16 14 import java.util.Map; 17 15 import java.util.Set; 18 19 import javax.swing.JLabel;20 import javax.swing.JOptionPane;21 import javax.swing.JPanel;22 16 23 17 import org.openstreetmap.josm.Main; … … 35 29 import org.openstreetmap.josm.data.validation.Test; 36 30 import org.openstreetmap.josm.data.validation.TestError; 37 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;38 31 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 39 32 import org.openstreetmap.josm.tools.MultiMap; … … 54 47 Math.round(o.getCoor().lat() / precision) * precision, 55 48 Math.round(o.getCoor().lon() / precision) * precision 56 );49 ); 57 50 } 58 51 … … 82 75 } 83 76 84 protected static int DUPLICATE_NODE = 1;85 protected static int DUPLICATE_NODE_MIXED = 2;86 protected static int DUPLICATE_NODE_OTHER = 3;87 protected static int DUPLICATE_NODE_UNCLOSED = 4;88 protected static int DUPLICATE_NODE_BUILDING = 10;89 protected static int DUPLICATE_NODE_BOUNDARY = 11;90 protected static int DUPLICATE_NODE_HIGHWAY = 12;91 protected static int DUPLICATE_NODE_LANDUSE = 13;92 protected static int DUPLICATE_NODE_NATURAL = 14;93 protected static int DUPLICATE_NODE_POWER = 15;94 protected static int DUPLICATE_NODE_RAILWAY = 16;95 protected static int DUPLICATE_NODE_WATERWAY = 17;77 protected final static int DUPLICATE_NODE = 1; 78 protected final static int DUPLICATE_NODE_MIXED = 2; 79 protected final static int DUPLICATE_NODE_OTHER = 3; 80 protected final static int DUPLICATE_NODE_UNCLOSED = 4; 81 protected final static int DUPLICATE_NODE_BUILDING = 10; 82 protected final static int DUPLICATE_NODE_BOUNDARY = 11; 83 protected final static int DUPLICATE_NODE_HIGHWAY = 12; 84 protected final static int DUPLICATE_NODE_LANDUSE = 13; 85 protected final static int DUPLICATE_NODE_NATURAL = 14; 86 protected final static int DUPLICATE_NODE_POWER = 15; 87 protected final static int DUPLICATE_NODE_RAILWAY = 16; 88 protected final static int DUPLICATE_NODE_WATERWAY = 17; 96 89 97 90 /** The map of potential duplicates. … … 204 197 DUPLICATE_NODE_UNCLOSED, 205 198 mm.get(tagSet) 206 ));199 )); 207 200 } else if (nbType>1) { 208 201 String msg = marktr("Mixed type duplicated nodes"); … … 215 208 DUPLICATE_NODE_MIXED, 216 209 mm.get(tagSet) 217 ));210 )); 218 211 } else if (typeMap.get("highway")) { 219 212 String msg = marktr("Highway duplicated nodes"); … … 226 219 DUPLICATE_NODE_HIGHWAY, 227 220 mm.get(tagSet) 228 ));221 )); 229 222 } else if (typeMap.get("railway")) { 230 223 String msg = marktr("Railway duplicated nodes"); … … 237 230 DUPLICATE_NODE_RAILWAY, 238 231 mm.get(tagSet) 239 ));232 )); 240 233 } else if (typeMap.get("waterway")) { 241 234 String msg = marktr("Waterway duplicated nodes"); … … 248 241 DUPLICATE_NODE_WATERWAY, 249 242 mm.get(tagSet) 250 ));243 )); 251 244 } else if (typeMap.get("boundary")) { 252 245 String msg = marktr("Boundary duplicated nodes"); … … 259 252 DUPLICATE_NODE_BOUNDARY, 260 253 mm.get(tagSet) 261 ));254 )); 262 255 } else if (typeMap.get("power")) { 263 256 String msg = marktr("Power duplicated nodes"); … … 270 263 DUPLICATE_NODE_POWER, 271 264 mm.get(tagSet) 272 ));265 )); 273 266 } else if (typeMap.get("natural")) { 274 267 String msg = marktr("Natural duplicated nodes"); … … 281 274 DUPLICATE_NODE_NATURAL, 282 275 mm.get(tagSet) 283 ));276 )); 284 277 } else if (typeMap.get("building")) { 285 278 String msg = marktr("Building duplicated nodes"); … … 292 285 DUPLICATE_NODE_BUILDING, 293 286 mm.get(tagSet) 294 ));287 )); 295 288 } else if (typeMap.get("landuse")) { 296 289 String msg = marktr("Landuse duplicated nodes"); … … 303 296 DUPLICATE_NODE_LANDUSE, 304 297 mm.get(tagSet) 305 ));298 )); 306 299 } else { 307 300 String msg = marktr("Other duplicated nodes"); … … 314 307 DUPLICATE_NODE_OTHER, 315 308 mm.get(tagSet) 316 ));309 )); 317 310 318 311 } … … 336 329 DUPLICATE_NODE, 337 330 duplicates 338 ));331 )); 339 332 } 340 333 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateRelation.java
r4806 r4869 122 122 } 123 123 124 protected static int DUPLICATE_RELATION = 1901;125 protected static int SAME_RELATION = 1902;124 protected static final int DUPLICATE_RELATION = 1901; 125 protected static final int SAME_RELATION = 1902; 126 126 127 127 /** MultiMap of all relations */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateWay.java
r4806 r4869 73 73 } 74 74 75 protected static int DUPLICATE_WAY = 1401;76 protected static int SAME_WAY = 1402;75 protected static final int DUPLICATE_WAY = 1401; 76 protected static final int SAME_WAY = 1402; 77 77 78 78 /** Bag of all ways */ … … 87 87 public DuplicateWay() { 88 88 super(tr("Duplicated ways"), 89 tr("This test checks that there are no ways with same node coordinates and optionally also same tags."));89 tr("This test checks that there are no ways with same node coordinates and optionally also same tags.")); 90 90 } 91 91 … … 127 127 } 128 128 } 129 if (skip) continue; 129 if (skip) { 130 continue; 131 } 130 132 TestError testError = new TestError(this, Severity.WARNING, tr("Ways with same position"), SAME_WAY, sameway); 131 133 errors.add(testError); … … 137 139 138 140 /** 139 * Remove uninteresting keys, like created_by to normalize the tags 141 * Remove uninteresting keys, like created_by to normalize the tags 140 142 */ 141 143 public void removeUninterestingKeys(Map<String, String> wkeys) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicatedWayNodes.java
r4806 r4869 18 18 19 19 public class DuplicatedWayNodes extends Test { 20 protected static int DUPLICATE_WAY_NODE = 501;20 protected static final int DUPLICATE_WAY_NODE = 501; 21 21 22 22 public DuplicatedWayNodes() { 23 23 super(tr("Duplicated way nodes"), 24 tr("Checks for ways with identical consecutive nodes."));24 tr("Checks for ways with identical consecutive nodes.")); 25 25 } 26 26 … … 37 37 if (lastN == n) { 38 38 errors.add(new TestError(this, Severity.ERROR, tr("Duplicated way nodes"), DUPLICATE_WAY_NODE, 39 Arrays.asList(w), Arrays.asList(n)));39 Arrays.asList(w), Arrays.asList(n))); 40 40 break; 41 41 } … … 59 59 lastN = n; 60 60 } 61 if (wnew.getNodesCount() < 2) {61 if (wnew.getNodesCount() < 2) 62 62 // Empty way, delete 63 63 return DeleteCommand.delete(Main.map.mapView.getEditLayer(), Collections.singleton(w)); 64 } else {64 else 65 65 return new ChangeCommand(w, wnew); 66 }67 66 } 68 67 -
trunk/src/org/openstreetmap/josm/data/validation/tests/NodesWithSameName.java
r3671 r4869 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.util.Map; 7 import java.util.List; 6 import java.util.ArrayList; 8 7 import java.util.HashMap; 9 8 import java.util.HashSet; 10 import java.util.ArrayList; 9 import java.util.List; 10 import java.util.Map; 11 11 12 12 import org.openstreetmap.josm.data.osm.Node; … … 17 17 18 18 public class NodesWithSameName extends Test { 19 protected static int SAME_NAME = 801;19 protected static final int SAME_NAME = 801; 20 20 21 21 private Map<String, List<Node>> namesToNodes; … … 23 23 public NodesWithSameName() { 24 24 super(tr("Nodes with same name"), 25 tr("This test finds nodes that have the same name (might be duplicates)."));25 tr("This test finds nodes that have the same name (might be duplicates).")); 26 26 } 27 27 -
trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingAreas.java
r4806 r4869 5 5 import java.util.Collection; 6 6 import java.util.Collections; 7 7 8 import org.openstreetmap.josm.data.osm.QuadBuckets; 8 9 import org.openstreetmap.josm.data.osm.Way; … … 17 18 public class OverlappingAreas extends Test { 18 19 19 protected static int OVERLAPPING_AREAS = 2201;20 protected static final int OVERLAPPING_AREAS = 2201; 20 21 protected QuadBuckets<Way> index = new QuadBuckets<Way>(); 21 22 … … 40 41 @Override 41 42 public boolean evaluate(Way wi) { 42 if (w.equals(wi)) {43 if (w.equals(wi)) 43 44 return false; 44 } else {45 else 45 46 return Geometry.polygonIntersection(w.getNodes(), wi.getNodes()) 46 47 == Geometry.PolygonIntersection.CROSSING; 47 }48 48 } 49 49 }); -
trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
r4806 r4869 29 29 */ 30 30 public class OverlappingWays extends Test { 31 31 32 32 /** Bag of all way segments */ 33 33 MultiMap<Pair<Node,Node>, WaySegment> nodePairs; 34 34 35 protected static int OVERLAPPING_HIGHWAY = 101;36 protected static int OVERLAPPING_RAILWAY = 102;37 protected static int OVERLAPPING_WAY = 103;38 protected static int OVERLAPPING_HIGHWAY_AREA = 111;39 protected static int OVERLAPPING_RAILWAY_AREA = 112;40 protected static int OVERLAPPING_WAY_AREA = 113;41 protected static int OVERLAPPING_AREA = 120;35 protected static final int OVERLAPPING_HIGHWAY = 101; 36 protected static final int OVERLAPPING_RAILWAY = 102; 37 protected static final int OVERLAPPING_WAY = 103; 38 protected static final int OVERLAPPING_HIGHWAY_AREA = 111; 39 protected static final int OVERLAPPING_RAILWAY_AREA = 112; 40 protected static final int OVERLAPPING_WAY_AREA = 113; 41 protected static final int OVERLAPPING_AREA = 120; 42 42 43 43 /** Constructor */ 44 44 public OverlappingWays() { 45 45 super(tr("Overlapping ways"), 46 tr("This test checks that a connection between two nodes "47 + "is not used by more than one way."));46 tr("This test checks that a connection between two nodes " 47 + "is not used by more than one way.")); 48 48 } 49 49 … … 125 125 } 126 126 127 errors.add(new TestError(this, 127 errors.add(new TestError(this, 128 128 type < OVERLAPPING_HIGHWAY_AREA ? Severity.WARNING : Severity.OTHER, 129 errortype, type, prims, duplicated));129 errortype, type, prims, duplicated)); 130 130 ways_seen.put(current_ways, duplicated); 131 131 } else { /* way seen, mark highlight layer only */ … … 151 151 } 152 152 nodePairs.put(Pair.sort(new Pair<Node,Node>(lastN, n)), 153 new WaySegment(w, i));153 new WaySegment(w, i)); 154 154 lastN = n; 155 155 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r4806 r4869 28 28 public class RelationChecker extends Test { 29 29 30 protected static int ROLE_UNKNOWN = 1701;31 protected static int ROLE_EMPTY = 1702;32 protected static int WRONG_TYPE = 1703;33 protected static int HIGH_COUNT = 1704;34 protected static int LOW_COUNT = 1705;35 protected static int ROLE_MISSING = 1706;36 protected static int RELATION_UNKNOWN = 1707;37 protected static int RELATION_EMPTY = 1708;30 protected static final int ROLE_UNKNOWN = 1701; 31 protected static final int ROLE_EMPTY = 1702; 32 protected static final int WRONG_TYPE = 1703; 33 protected static final int HIGH_COUNT = 1704; 34 protected static final int LOW_COUNT = 1705; 35 protected static final int ROLE_MISSING = 1706; 36 protected static final int RELATION_UNKNOWN = 1707; 37 protected static final int RELATION_EMPTY = 1708; 38 38 39 39 /** -
trunk/src/org/openstreetmap/josm/data/validation/tests/SelfIntersectingWay.java
r3671 r4869 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.util.Arrays; 6 7 import java.util.HashSet; 7 import java.util.Arrays;8 8 9 import org.openstreetmap.josm.data.osm.Node; 9 10 import org.openstreetmap.josm.data.osm.Way; 10 import org.openstreetmap.josm.data.osm.Node;11 11 import org.openstreetmap.josm.data.validation.Severity; 12 12 import org.openstreetmap.josm.data.validation.Test; … … 17 17 */ 18 18 public class SelfIntersectingWay extends Test { 19 20 protected static int SELF_INTERSECT = 401;19 20 protected static final int SELF_INTERSECT = 401; 21 21 22 22 public SelfIntersectingWay() { 23 23 super(tr("Self-intersecting ways"), 24 tr("This test checks for ways " +25 "that contain some of their nodes more than once."));24 tr("This test checks for ways " + 25 "that contain some of their nodes more than once.")); 26 26 } 27 27 … … 33 33 if (nodes.contains(n)) { 34 34 errors.add(new TestError(this, 35 Severity.WARNING, tr("Self-intersecting ways"), SELF_INTERSECT,36 Arrays.asList(w), Arrays.asList(n)));35 Severity.WARNING, tr("Self-intersecting ways"), SELF_INTERSECT, 36 Arrays.asList(w), Arrays.asList(n))); 37 37 break; 38 38 } else { -
trunk/src/org/openstreetmap/josm/data/validation/tests/SimilarNamedWays.java
r4806 r4869 28 28 public class SimilarNamedWays extends Test { 29 29 30 protected static int SIMILAR_NAMED = 701;30 protected static final int SIMILAR_NAMED = 701; 31 31 32 32 /** All ways, grouped by cells */ -
trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
r4812 r4869 49 49 import org.openstreetmap.josm.data.osm.Relation; 50 50 import org.openstreetmap.josm.data.osm.Way; 51 import org.openstreetmap.josm.data.validation.OsmValidator;52 51 import org.openstreetmap.josm.data.validation.Severity; 53 52 import org.openstreetmap.josm.data.validation.Test; 54 53 import org.openstreetmap.josm.data.validation.TestError; 55 54 import org.openstreetmap.josm.data.validation.util.Entities; 55 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference; 56 56 import org.openstreetmap.josm.gui.preferences.ValidatorPreference; 57 import org.openstreetmap.josm.gui.preferences.TaggingPresetPreference;58 57 import org.openstreetmap.josm.gui.progress.ProgressMonitor; 59 58 import org.openstreetmap.josm.gui.tagging.TaggingPreset; … … 79 78 protected static MultiMap<String, String> presetsValueData; 80 79 /** The TagChecker data */ 81 protected static List<CheckerData> checkerData = new ArrayList<CheckerData>();82 protected static List<String> ignoreDataStartsWith = new ArrayList<String>();83 protected static List<String> ignoreDataEquals = new ArrayList<String>();84 protected static List<String> ignoreDataEndsWith = new ArrayList<String>();85 protected static List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>();86 protected static List<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>();80 protected static final List<CheckerData> checkerData = new ArrayList<CheckerData>(); 81 protected static final List<String> ignoreDataStartsWith = new ArrayList<String>(); 82 protected static final List<String> ignoreDataEquals = new ArrayList<String>(); 83 protected static final List<String> ignoreDataEndsWith = new ArrayList<String>(); 84 protected static final List<IgnoreKeyPair> ignoreDataKeyPair = new ArrayList<IgnoreKeyPair>(); 85 protected static final List<IgnoreTwoKeyPair> ignoreDataTwoKeyPair = new ArrayList<IgnoreTwoKeyPair>(); 87 86 88 87 /** The preferences prefix */ … … 129 128 protected JButton deleteSrcButton; 130 129 131 protected static int EMPTY_VALUES = 1200;132 protected static int INVALID_KEY = 1201;133 protected static int INVALID_VALUE = 1202;134 protected static int FIXME = 1203;135 protected static int INVALID_SPACE = 1204;136 protected static int INVALID_KEY_SPACE = 1205;137 protected static int INVALID_HTML = 1206; /* 1207 was PAINT */138 protected static int LONG_VALUE = 1208;139 protected static int LONG_KEY = 1209;140 protected static int LOW_CHAR_VALUE = 1210;141 protected static int LOW_CHAR_KEY = 1211;130 protected static final int EMPTY_VALUES = 1200; 131 protected static final int INVALID_KEY = 1201; 132 protected static final int INVALID_VALUE = 1202; 133 protected static final int FIXME = 1203; 134 protected static final int INVALID_SPACE = 1204; 135 protected static final int INVALID_KEY_SPACE = 1205; 136 protected static final int INVALID_HTML = 1206; /* 1207 was PAINT */ 137 protected static final int LONG_VALUE = 1208; 138 protected static final int LONG_KEY = 1209; 139 protected static final int LOW_CHAR_VALUE = 1210; 140 protected static final int LOW_CHAR_KEY = 1211; 142 141 /** 1250 and up is used by tagcheck */ 143 142 … … 145 144 protected JList sourcesList; 146 145 147 protected static Entities entities = new Entities();146 protected static final Entities entities = new Entities(); 148 147 149 148 /** … … 626 625 tr("Information"), 627 626 JOptionPane.INFORMATION_MESSAGE 628 );627 ); 629 628 } 630 629 } else { … … 713 712 public void handlePrefEnable() { 714 713 boolean selected = prefCheckKeys.isSelected() || prefCheckKeysBeforeUpload.isSelected() 715 714 || prefCheckComplex.isSelected() || prefCheckComplexBeforeUpload.isSelected(); 716 715 sourcesList.setEnabled( selected ); 717 716 addSrcButton.setEnabled(selected); … … 792 791 if (commands.size() == 1) 793 792 return commands.get(0); 794 793 795 794 return new SequenceCommand(tr("Fix properties"), commands); 796 795 } … … 825 824 private int code; 826 825 protected Severity severity; 827 protected static int TAG_CHECK_ERROR = 1250;828 protected static int TAG_CHECK_WARN = 1260;829 protected static int TAG_CHECK_INFO = 1270;826 protected static final int TAG_CHECK_ERROR = 1250; 827 protected static final int TAG_CHECK_WARN = 1260; 828 protected static final int TAG_CHECK_INFO = 1270; 830 829 831 830 private static class CheckerElement { -
trunk/src/org/openstreetmap/josm/data/validation/tests/UnconnectedWays.java
r4806 r4869 39 39 public class UnconnectedWays extends Test { 40 40 41 protected static int UNCONNECTED_WAYS = 1301;41 protected static final int UNCONNECTED_WAYS = 1301; 42 42 protected static final String PREFIX = ValidatorPreference.PREFIX + "." + UnconnectedWays.class.getSimpleName(); 43 43 … … 314 314 public boolean isArea() { 315 315 return w.hasKey("landuse") 316 || w.hasKey("leisure")317 || w.hasKey("amenity")318 || w.hasKey("building");316 || w.hasKey("leisure") 317 || w.hasKey("amenity") 318 || w.hasKey("building"); 319 319 } 320 320 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/WronglyOrderedWays.java
r4806 r4869 19 19 public class WronglyOrderedWays extends Test { 20 20 21 protected static int WRONGLY_ORDERED_COAST = 1001;21 protected static final int WRONGLY_ORDERED_COAST = 1001; 22 22 //protected static int WRONGLY_ORDERED_WATER = 1002; 23 protected static int WRONGLY_ORDERED_LAND = 1003;23 protected static final int WRONGLY_ORDERED_LAND = 1003; 24 24 25 25 /** … … 28 28 public WronglyOrderedWays() { 29 29 super(tr("Wrongly Ordered Ways"), 30 tr("This test checks the direction of water, land and coastline ways."));30 tr("This test checks the direction of water, land and coastline ways.")); 31 31 } 32 32 … … 38 38 39 39 String natural = w.get("natural"); 40 if (natural == null) {40 if (natural == null) 41 41 return; 42 }else if ("coastline".equals(natural) && Geometry.isClockwise(w)) {42 else if ("coastline".equals(natural) && Geometry.isClockwise(w)) { 43 43 reportError(w, tr("Reversed coastline: land not on left side"), WRONGLY_ORDERED_COAST); 44 /*} else if ("water".equals(natural) && !Geometry.isClockwise(w)) {44 /*} else if ("water".equals(natural) && !Geometry.isClockwise(w)) { 45 45 reportError(w, tr("Reversed water: land not on left side"), WRONGLY_ORDERED_WATER);*/ 46 46 } else if ("land".equals(natural) && Geometry.isClockwise(w)) { 47 47 reportError(w, tr("Reversed land: land not on left side"), WRONGLY_ORDERED_LAND); 48 } else {48 } else 49 49 return; 50 }51 50 52 51 } -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r4627 r4869 64 64 public static final String PROPNAME_CENTER = "center"; 65 65 public static final String PROPNAME_SCALE = "scale"; 66 66 67 67 /** 68 68 * the zoom listeners … … 237 237 1.0/scale, 0.0, 0.0, -1.0/scale, getWidth()/2.0 - center.east()/scale, getHeight()/2.0 + center.north()/scale); 238 238 } 239 239 240 240 /** 241 241 * Return the point on the screen where this Coordinate would be. … … 394 394 } 395 395 } 396 ).start();396 ).start(); 397 397 } 398 398 } … … 1161 1161 public int getViewID() { 1162 1162 String x = center.east() + "_" + center.north() + "_" + scale + "_" + 1163 getWidth() + "_" + getHeight() + "_" + getProjection().toString();1163 getWidth() + "_" + getHeight() + "_" + getProjection().toString(); 1164 1164 java.util.zip.CRC32 id = new java.util.zip.CRC32(); 1165 1165 id.update(x.getBytes()); … … 1209 1209 public static final SystemOfMeasurement IMPERIAL_SOM = new SystemOfMeasurement(0.3048, "ft", 1609.344, "mi"); 1210 1210 1211 public static Map<String, SystemOfMeasurement> SYSTEMS_OF_MEASUREMENT;1211 public static final Map<String, SystemOfMeasurement> SYSTEMS_OF_MEASUREMENT; 1212 1212 static { 1213 1213 SYSTEMS_OF_MEASUREMENT = new LinkedHashMap<String, SystemOfMeasurement>(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r4773 r4869 171 171 // hook for roadsigns plugin to display a small 172 172 // button in the upper right corner of this dialog 173 public static JPanel pluginHook = new JPanel();173 public static final JPanel pluginHook = new JPanel(); 174 174 175 175 private JPopupMenu propertyMenu; … … 279 279 boolean c1 = m.containsKey(o1.getValue()); 280 280 boolean c2 = m.containsKey(o2.getValue()); 281 if (c1 == c2) {281 if (c1 == c2) 282 282 return String.CASE_INSENSITIVE_ORDER.compare(o1.getValue(), o2.getValue()); 283 } else if (c1) {283 else if (c1) 284 284 return -1; 285 } else {285 else 286 286 return +1; 287 }288 287 } 289 288 }; … … 1051 1050 for (int row : rows) { 1052 1051 String key = propertyData.getValueAt(row, 0).toString(); 1053 if (row == nextKeyIndex + 1) 1052 if (row == nextKeyIndex + 1) { 1054 1053 nextKeyIndex = row; // no gap yet 1054 } 1055 1055 tags.put(key, null); 1056 1056 } … … 1060 1060 int rowCount = propertyData.getRowCount(); 1061 1061 if (rowCount > rows.length) { 1062 if (nextKeyIndex == rows[rows.length-1]) 1062 if (nextKeyIndex == rows[rows.length-1]) { 1063 1063 // no gap found, pick next or previous key in list 1064 1064 nextKeyIndex = (nextKeyIndex + 1 < rowCount ? nextKeyIndex + 1 : rows[0] - 1); 1065 else1065 } else { 1066 1066 // gap found 1067 1067 nextKeyIndex++; 1068 } 1068 1069 nextKey = (String)propertyData.getValueAt(nextKeyIndex, 0); 1069 1070 } -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r4804 r4869 167 167 * stuff). 168 168 */ 169 public static List<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>();169 public static final List<MarkerProducers> markerProducers = new LinkedList<MarkerProducers>(); 170 170 171 171 // Add one Maker specifying the default behaviour. -
trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
r4319 r4869 2 2 package org.openstreetmap.josm.gui.mappaint; 3 3 4 import java.awt.Color;5 4 import static org.openstreetmap.josm.tools.Utils.equal; 6 5 6 import java.awt.Color; 7 7 import java.awt.Rectangle; 8 8 9 import org.openstreetmap.josm.data.osm.Node; 9 10 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 11 12 import org.openstreetmap.josm.data.osm.visitor.paint.MapPainter; 12 13 import org.openstreetmap.josm.data.osm.visitor.paint.PaintColors; 13 14 14 import org.openstreetmap.josm.tools.CheckParameterUtil; 15 15 … … 21 21 public enum HorizontalTextAlignment { LEFT, CENTER, RIGHT } 22 22 public enum VerticalTextAlignment { ABOVE, TOP, CENTER, BOTTOM, BELOW } 23 24 public static Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0);25 23 24 public static final Rectangle ZERO_BOX = new Rectangle(0, 0, 0, 0); 25 26 26 public TextElement text; 27 27 public Rectangle box; … … 39 39 this.vAlign = vAlign; 40 40 } 41 41 42 42 public static BoxTextElemStyle create(Environment env, Rectangle box) { 43 43 initDefaultParameters(); … … 73 73 vAlign = VerticalTextAlignment.BELOW; 74 74 } 75 75 76 76 return new BoxTextElemStyle(c, text, box, hAlign, vAlign); 77 77 } 78 78 79 79 public static final BoxTextElemStyle SIMPLE_NODE_TEXT_ELEMSTYLE; 80 80 static { … … 108 108 @Override 109 109 public boolean equals(Object obj) { 110 if (!super.equals(obj)) {110 if (!super.equals(obj)) 111 111 return false; 112 } 113 if (obj == null || getClass() != obj.getClass()) { 112 if (obj == null || getClass() != obj.getClass()) 114 113 return false; 115 }116 114 final BoxTextElemStyle other = (BoxTextElemStyle) obj; 117 115 return text.equals(other.text) && 118 box.equals(other.box) && 119 hAlign == other.hAlign && 116 box.equals(other.box) && 117 hAlign == other.hAlign && 120 118 vAlign == other.vAlign; 121 119 } -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPritority.java
r3385 r4869 15 15 * usually not used by the user. 16 16 */ 17 public static AutoCompletionItemPritority IS_IN_STANDARD_AND_IN_DATASET = new AutoCompletionItemPritority(true, true, false);17 public static final AutoCompletionItemPritority IS_IN_STANDARD_AND_IN_DATASET = new AutoCompletionItemPritority(true, true, false); 18 18 19 19 /** … … 21 21 * the value of a tag name=*. 22 22 */ 23 public static AutoCompletionItemPritority IS_IN_DATASET = new AutoCompletionItemPritority(true, false, false);23 public static final AutoCompletionItemPritority IS_IN_DATASET = new AutoCompletionItemPritority(true, false, false); 24 24 25 25 /** … … 27 27 * or a standard value for a given tag name (from the presets). 28 28 */ 29 public static AutoCompletionItemPritority IS_IN_STANDARD = new AutoCompletionItemPritority(false, true, false);29 public static final AutoCompletionItemPritority IS_IN_STANDARD = new AutoCompletionItemPritority(false, true, false); 30 30 31 31 /** 32 32 * Indicates that this is a value from a selected object. 33 33 */ 34 public static AutoCompletionItemPritority IS_IN_SELECTION = new AutoCompletionItemPritority(false, false, true);34 public static final AutoCompletionItemPritority IS_IN_SELECTION = new AutoCompletionItemPritority(false, false, true); 35 35 36 36 /** Unknown priority. This is the lowest priority. */ 37 public static AutoCompletionItemPritority UNKNOWN = new AutoCompletionItemPritority(false, false, false);37 public static final AutoCompletionItemPritority UNKNOWN = new AutoCompletionItemPritority(false, false, false); 38 38 39 39 private final boolean inDataSet; -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionManager.java
r4300 r4869 9 9 import java.util.List; 10 10 import java.util.Map; 11 import java.util.Map.Entry; 11 12 import java.util.Set; 12 import java.util.Map.Entry;13 13 14 14 import org.openstreetmap.josm.data.osm.DataSet; … … 64 64 * can be accessed directly 65 65 */ 66 protected static MultiMap<String, String> presetTagCache = new MultiMap<String, String>();66 protected static final MultiMap<String, String> presetTagCache = new MultiMap<String, String>(); 67 67 /** 68 68 * the cached list of member roles … … 75 75 * can be accessed directly 76 76 */ 77 protected static Set<String> presetRoleCache = new HashSet<String>();77 protected static final Set<String> presetRoleCache = new HashSet<String>(); 78 78 79 79 public AutoCompletionManager(DataSet ds) { -
trunk/src/org/openstreetmap/josm/io/imagery/OsmosnimkiOffsetServer.java
r4868 r4869 16 16 17 17 public class OsmosnimkiOffsetServer implements OffsetServer { 18 public static StringProperty PROP_SERVER_URL = new StringProperty("imagery.offsetserver.url","http://offset.osmosnimki.ru/offset/v0?");18 public static final StringProperty PROP_SERVER_URL = new StringProperty("imagery.offsetserver.url","http://offset.osmosnimki.ru/offset/v0?"); 19 19 private String url; 20 20
Note:
See TracChangeset
for help on using the changeset viewer.