source: josm/trunk/src/org/openstreetmap/josm/actions/InfoAction.java@ 2474

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

Added explicit help topics
See also current list of help topics with links to source files and to help pages

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