source: osm/applications/editors/josm/plugins/CommandLine/src/org/openstreetmap/josm/plugins/commandline/CommandLineAction.java

Last change on this file was 35583, checked in by Klumbumbus, 4 years ago

see #19851 - Fix shortcut names

File size: 887 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.plugins.commandline;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import java.awt.event.ActionEvent;
7import java.awt.event.KeyEvent;
8
9import org.openstreetmap.josm.actions.JosmAction;
10import org.openstreetmap.josm.tools.Shortcut;
11
12public class CommandLineAction extends JosmAction {
13 private final CommandLine parentPlugin;
14
15 public CommandLineAction(CommandLine parentPlugin) {
16 super(tr("Command line"), "commandline", tr("Set input focus to the command line."),
17 Shortcut.registerShortcut("tool:commandline", tr("Commands: {0}", tr("Command line")), KeyEvent.VK_ENTER, Shortcut.DIRECT), true, "commandline", true);
18 this.parentPlugin = parentPlugin;
19 }
20
21 @Override
22 public void actionPerformed(ActionEvent e) {
23 parentPlugin.activate();
24 }
25}
Note: See TracBrowser for help on using the repository browser.