Changeset 1670 in josm for trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
- Timestamp:
- 15.06.2009 20:22:46 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/command/VersionConflictResolveCommand.java
r1654 r1670 13 13 import org.openstreetmap.josm.data.osm.Node; 14 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 15 16 import org.openstreetmap.josm.data.osm.Relation; 16 17 import org.openstreetmap.josm.data.osm.Way; … … 37 38 } 38 39 39 //FIXME copied from TagConflictResolveCommand -> refactor40 /**41 * replies a (localized) display name for the type of an OSM primitive42 *43 * @param primitive the primitive44 * @return a localized display name45 */46 protected String getPrimitiveTypeAsString(OsmPrimitive primitive) {47 if (primitive instanceof Node) return tr("node");48 if (primitive instanceof Way) return tr("way");49 if (primitive instanceof Relation) return tr("relation");50 return "";51 }52 53 40 @Override 54 41 public MutableTreeNode description() { 55 42 return new DefaultMutableTreeNode( 56 43 new JLabel( 57 tr("Resolve version conflicts for {0} {1}", getPrimitiveTypeAsString(my), my.id),44 tr("Resolve version conflicts for {0} {1}",OsmPrimitiveType.from(my).getLocalizedDisplayNameSingular(), my.id), 58 45 ImageProvider.get("data", "object"), 59 46 JLabel.HORIZONTAL
Note: See TracChangeset
for help on using the changeset viewer.
