Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.plugins.commandline;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import java.awt.event.ActionEvent;
|
---|
7 | import java.awt.event.KeyEvent;
|
---|
8 |
|
---|
9 | import org.openstreetmap.josm.actions.JosmAction;
|
---|
10 | import org.openstreetmap.josm.tools.Shortcut;
|
---|
11 |
|
---|
12 | public 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("Tool: {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.