source: josm/trunk/src/org/openstreetmap/josm/gui/PrimitiveNameFormatter.java@ 1814

Last change on this file since 1814 was 1814, checked in by Gubaer, 15 years ago

removed dependencies to Main.ds, removed Main.ds
removed AddVisitor, NameVisitor, DeleteVisitor - unnecessary double dispatching for these simple cases

File size: 530 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import org.openstreetmap.josm.Main;
7import org.openstreetmap.josm.data.osm.OsmPrimitive;
8
9public class PrimitiveNameFormatter {
10 public String getName(OsmPrimitive primitive) {
11 String name = primitive.getName();
12 if (Main.pref.getBoolean("osm-primitives.showid")) {
13 name += tr(" [id: {0}]", primitive.id);
14 }
15 return name;
16 }
17}
Note: See TracBrowser for help on using the repository browser.