Changeset 1230 in josm for trunk/src/org/openstreetmap/josm/actions
- Timestamp:
- 2009-01-10T13:37:19+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java
r1217 r1230 23 23 24 24 public HistoryInfoAction() { 25 super(tr("History of Node/Way"), "about",tr("Display history information about OSM ways or nodes."), 26 Shortcut.registerShortcut("core:history", tr("History of Node/Way"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true); 25 super(tr("History of Element"), "about", 26 tr("Display history information about OSM ways or nodes."), 27 Shortcut.registerShortcut("core:history", 28 tr("History of Element"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true); 27 29 } 28 30 29 31 public void actionPerformed(ActionEvent e) { 30 31 32 33 34 35 32 final Collection<Object> sel = new LinkedList<Object>(); 33 new Visitor() { 34 public void visit(Node n) { 35 OpenBrowser.displayUrl("http://www.openstreetmap.org/browse/node/" + n.id + "/history"); 36 sel.add(n); 37 } 36 38 37 38 39 40 39 public void visit(Way w) { 40 OpenBrowser.displayUrl("http://www.openstreetmap.org/browse/way/" + w.id + "/history"); 41 sel.add(w); 42 } 41 43 42 43 44 45 44 public void visit(Relation e) { 45 OpenBrowser.displayUrl("http://www.openstreetmap.org/browse/relation/" + e.id + "/history"); 46 sel.add(e); 47 } 46 48 47 48 49 50 51 49 public void visitAll() { 50 for (OsmPrimitive osm : Main.ds.getSelected()) 51 osm.visit(this); 52 } 53 }.visitAll(); 52 54 53 54 55 tr("Please select at least one node or way."));56 57 55 if (sel.isEmpty()) { 56 JOptionPane.showMessageDialog(Main.parent, 57 tr("Please select at least one node, way or relation.")); 58 return; 59 } 58 60 } 59 60 61 }
Note:
See TracChangeset
for help on using the changeset viewer.