Index: src/org/openstreetmap/josm/data/osm/visitor/NameVisitor.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/visitor/NameVisitor.java	(revision 260)
+++ src/org/openstreetmap/josm/data/osm/visitor/NameVisitor.java	(revision 261)
@@ -74,8 +74,9 @@
 	/**
 	 * If the way has a name-key or id-key, this is displayed. If not, (x nodes)
-	 * is displayed with x beeing the number of nodes in the way.
+	 * is displayed with x being the number of nodes in the way.
 	 */
 	public void visit(Way w) {
 		name = w.get("name");
+		if (name == null) name = w.get("ref");
 		if (name == null) {
 			AllNodesVisitor.getAllNodes(w.segments);
@@ -87,5 +88,6 @@
 				}
 			}
-			name = trn("{0} node", "{0} nodes", nodes.size(), nodes.size());
+			String what = (w.get("highway") != null) ? "highway " : (w.get("railway") != null) ? "railway " : (w.get("waterway") != null) ? "waterway " : "";
+			name = what + trn("{0} node", "{0} nodes", nodes.size(), nodes.size());
 		}
 		if (w.isIncomplete())
