Last change
on this file since 14932 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
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.actions;
|
---|
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.tools.Shortcut;
|
---|
10 | import org.openstreetmap.josm.tools.bugreport.BugReportSender;
|
---|
11 |
|
---|
12 | /**
|
---|
13 | * Reports a ticket to JOSM bugtracker.
|
---|
14 | * @since 7624
|
---|
15 | */
|
---|
16 | public 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("Report a ticket to JOSM bugtracker"),
|
---|
34 | KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true);
|
---|
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.