Ignore:
Timestamp:
2021-03-22T19:30:36+01:00 (5 years ago)
Author:
simon04
Message:

fix #20647 - Add --status-report command line argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r17556 r17637  
    7171import org.openstreetmap.josm.actions.PreferencesAction;
    7272import org.openstreetmap.josm.actions.RestartAction;
     73import org.openstreetmap.josm.actions.ShowStatusReportAction;
    7374import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask;
    7475import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask;
     
    657658                "\t--language=<language>                     "+tr("Set the language")+"\n\n"+
    658659                "\t--version                                 "+tr("Displays the JOSM version and exits")+"\n\n"+
     660                "\t--status-report                           "+ShowStatusReportAction.ACTION_DESCRIPTION+"\n\n"+
    659661                "\t--debug                                   "+tr("Print debugging messages to console")+"\n\n"+
    660662                "\t--skip-plugins                            "+tr("Skip loading plugins")+"\n\n"+
     
    730732        Level logLevel = args.getLogLevel();
    731733        Logging.setLogLevel(logLevel);
    732         if (!args.showVersion() && !args.showHelp()) {
     734        if (!args.hasOption(Option.VERSION) && !args.hasOption(Option.STATUS_REPORT) && !args.showHelp()) {
    733735            Logging.info(tr("Log level is at {0} ({1}, {2})", logLevel.getLocalizedName(), logLevel.getName(), logLevel.intValue()));
    734736        }
     
    772774        Config.setUrlsProvider(JosmUrls.getInstance());
    773775
    774         if (args.showVersion()) {
     776        if (args.hasOption(Option.VERSION)) {
    775777            System.out.println(Version.getInstance().getAgentString());
     778            return;
     779        } else if (args.hasOption(Option.STATUS_REPORT)) {
     780            System.out.println(ShowStatusReportAction.getReportHeader());
    776781            return;
    777782        } else if (args.showHelp()) {
Note: See TracChangeset for help on using the changeset viewer.