Line | |
---|
1 | //License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.KeyEvent;
|
---|
7 |
|
---|
8 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
9 | import org.openstreetmap.josm.data.osm.OsmPrimitiveType;
|
---|
10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
11 | import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
|
---|
12 |
|
---|
13 | public class HistoryInfoAction extends AbstractInfoAction {
|
---|
14 |
|
---|
15 | public HistoryInfoAction() {
|
---|
16 | super(tr("Object history"), "about",
|
---|
17 | tr("Display history information about OSM ways, nodes, or relations."),
|
---|
18 | Shortcut.registerShortcut("core:history",
|
---|
19 | tr("Object history"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true);
|
---|
20 | putValue("help", ht("/Action/HistoryInfo"));
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | protected String createInfoUrl(Object infoObject) {
|
---|
25 | OsmPrimitive primitive = (OsmPrimitive)infoObject;
|
---|
26 | return getBaseBrowseUrl() + "/" + OsmPrimitiveType.from(primitive).getAPIName() + "/" + primitive.getId() + "/history";
|
---|
27 | }
|
---|
28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.