Changeset 5118 in josm for trunk/src/org
- Timestamp:
- 2012-03-25T20:18:20+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/validation/util/NameVisitor.java
r3671 r5118 2 2 package org.openstreetmap.josm.data.validation.util; 3 3 4 import static org.openstreetmap.josm.tools.I18n.tr;5 4 import static org.openstreetmap.josm.tools.I18n.trn; 6 5 … … 8 7 import javax.swing.JLabel; 9 8 10 import org.openstreetmap.josm.Main;11 9 import org.openstreetmap.josm.data.osm.Node; 12 import org.openstreetmap.josm.data.osm.OsmPrimitive;13 10 import org.openstreetmap.josm.data.osm.Relation; 14 11 import org.openstreetmap.josm.data.osm.Way; … … 46 43 public void visit(Node n) { 47 44 name = n.getDisplayName(DefaultNameFormatter.getInstance()); 48 addId(n);49 45 icon = ImageProvider.get("data", "node"); 50 46 className = "node"; … … 59 55 public void visit(Way w) { 60 56 name = w.getDisplayName(DefaultNameFormatter.getInstance()); 61 addId(w);62 57 icon = ImageProvider.get("data", "way"); 63 58 className = "way"; … … 70 65 public void visit(Relation e) { 71 66 name = e.getDisplayName(DefaultNameFormatter.getInstance()); 72 addId(e);73 67 icon = ImageProvider.get("data", "relation"); 74 68 className = "relation"; … … 79 73 return new JLabel(name, icon, JLabel.HORIZONTAL); 80 74 } 81 82 private void addId(OsmPrimitive osm) {83 if (Main.pref.getBoolean("osm-primitives.showid")) {84 name += tr(" [id: {0}]", osm.getId());85 }86 }87 75 }
Note:
See TracChangeset
for help on using the changeset viewer.