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

Last change on this file since 10910 was 10062, checked in by Don-vip, 8 years ago

see #12652 - about dialog: replace old bug report link with new bug report button, remove unused code

  • Property svn:eol-style set to native
File size: 1.2 KB
RevLine 
[7937]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;
[10055]10import org.openstreetmap.josm.tools.bugreport.BugReportSender;
[7937]11
12/**
13 * Reports a ticket to JOSM bugtracker.
14 * @since 7624
15 */
16public class ReportBugAction extends JosmAction {
17
[10055]18 private final String text;
19
[7937]20 /**
[10055]21 * Constructs a new {@code ReportBugAction} that reports the normal status report.
[7937]22 */
23 public ReportBugAction() {
[10062]24 this(null);
[10055]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) {
[8061]32 super(tr("Report bug"), "bug", tr("Report a ticket to JOSM bugtracker"),
[7937]33 Shortcut.registerShortcut("reportbug", tr("Report a ticket to JOSM bugtracker"),
34 KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true);
[10055]35 this.text = text;
[7937]36 }
37
38 @Override
39 public void actionPerformed(ActionEvent e) {
[10062]40 BugReportSender.reportBug(text == null ? ShowStatusReportAction.getReportHeader() : text);
[7937]41 }
42}
Note: See TracBrowser for help on using the repository browser.