Ignore:
Timestamp:
2016-03-27T04:01:39+02:00 (10 years ago)
Author:
Don-vip
Message:

fix #12652 - Do not ...snip... bug report messages after 6000 characters (patch by michael2402, modified)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/ReportBugAction.java

    r8061 r10055  
    77import java.awt.event.KeyEvent;
    88
    9 import org.openstreetmap.josm.tools.BugReportExceptionHandler;
    10 import org.openstreetmap.josm.tools.OpenBrowser;
    119import org.openstreetmap.josm.tools.Shortcut;
    12 import org.openstreetmap.josm.tools.Utils;
     10import org.openstreetmap.josm.tools.bugreport.BugReportSender;
    1311
    1412/**
     
    1816public class ReportBugAction extends JosmAction {
    1917
     18    private final String text;
     19
    2020    /**
    21      * Constructs a new {@code ReportBugAction}.
     21     * Constructs a new {@code ReportBugAction} that reports the normal status report.
    2222     */
    2323    public ReportBugAction() {
     24        this(ShowStatusReportAction.getReportHeader());
     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) {
    2432        super(tr("Report bug"), "bug", tr("Report a ticket to JOSM bugtracker"),
    2533                Shortcut.registerShortcut("reportbug", tr("Report a ticket to JOSM bugtracker"),
    2634                        KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true);
     35        this.text = text;
    2736    }
    2837
    2938    @Override
    3039    public void actionPerformed(ActionEvent e) {
    31         reportBug();
    32     }
    33 
    34     /**
    35      * Reports a ticket to JOSM bugtracker.
    36      */
    37     public static void reportBug() {
    38         reportBug(ShowStatusReportAction.getReportHeader());
    39     }
    40 
    41     /**
    42      * Reports a ticket to JOSM bugtracker with given status report.
    43      * @param report Status report header containing technical, non-personal information
    44      */
    45     public static void reportBug(String report) {
    46         OpenBrowser.displayUrl(BugReportExceptionHandler.getBugReportUrl(
    47                 Utils.strip(report)).toExternalForm());
     40        BugReportSender.reportBug(text);
    4841    }
    4942}
Note: See TracChangeset for help on using the changeset viewer.