source: josm/trunk/src/org/openstreetmap/josm/actions/ReportBugAction.java@ 17379

Last change on this file since 17379 was 17188, checked in by Klumbumbus, 4 years ago

fix #19851 - Fix shortcut names

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions;
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.tools.Shortcut;
10import org.openstreetmap.josm.tools.bugreport.BugReportSender;
11
12/**
13 * Reports a ticket to JOSM bugtracker.
14 * @since 7624
15 */
16public class ReportBugAction extends JosmAction {
17
18 private final String text;
19
20 /**
21 * Constructs a new {@code ReportBugAction} that reports the normal status report.
22 */
23 public ReportBugAction() {
24 this(null);
25 }
26
27 /**
28 * Constructs a new {@link ReportBugAction} for the given debug text.
29 * @param text The text to send
30 */
31 public ReportBugAction(String text) {
32 super(tr("Report bug"), "bug", tr("Report a ticket to JOSM bugtracker"),
33 Shortcut.registerShortcut("reportbug", tr("Help: {0}", tr("Report bug")),
34 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true, false);
35 this.text = text;
36 }
37
38 @Override
39 public void actionPerformed(ActionEvent e) {
40 BugReportSender.reportBug(text == null ? ShowStatusReportAction.getReportHeader() : text);
41 }
42}
Note: See TracBrowser for help on using the repository browser.