Changeset 5831 in josm


Ignore:
Timestamp:
2013-04-06T17:12:20+02:00 (12 years ago)
Author:
Don-vip
Message:

see #8571 - Include command-line arguments in status report

Location:
trunk/src/org/openstreetmap/josm
Files:
3 edited

Legend:

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

    r5829 r5831  
    124124   
    125125    /**
     126     * Command-line arguments used to run the application.
     127     */
     128    public static String[] commandLineArgs;
     129   
     130    /**
    126131     * The worker thread slave. This is for executing all long and intensive
    127132     * calculations. The executed runnables are guaranteed to be executed separately
     
    165170    public UndoRedoHandler undoRedo = new UndoRedoHandler();
    166171
     172    /**
     173     * The progress monitor being currently displayed.
     174     */
    167175    public static PleaseWaitProgressMonitor currentProgressMonitor;
    168176
     
    282290     * Remove the specified layer from the map. If it is the last layer,
    283291     * remove the map as well.
     292     * @param layer The layer to remove
    284293     */
    285294    public final void removeLayer(final Layer layer) {
  • trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java

    r4973 r5831  
    88import java.awt.event.ActionEvent;
    99import java.awt.event.KeyEvent;
     10import java.lang.management.ManagementFactory;
     11import java.util.Arrays;
    1012import java.util.HashSet;
     13import java.util.List;
    1114import java.util.Map;
    1215import java.util.Map.Entry;
     
    6669        text.append("Operating system: "+ System.getProperty("os.name"));
    6770        text.append("\n");
     71        try {
     72            List<String> vmArguments = ManagementFactory.getRuntimeMXBean().getInputArguments();
     73            if (!vmArguments.isEmpty()) {
     74                text.append("VM arguments: "+ vmArguments);
     75                text.append("\n");
     76            }
     77        } catch (SecurityException e) {
     78            // Ignore exception
     79        }
     80        if (Main.commandLineArgs.length > 0) {
     81            text.append("Program arguments: "+ Arrays.toString(Main.commandLineArgs));
     82            text.append("\n");
     83        }
    6884        DataSet dataset = Main.main.getCurrentDataSet();
    6985        if (dataset != null) {
  • trunk/src/org/openstreetmap/josm/gui/MainApplication.java

    r5829 r5831  
    264264            System.exit(1);
    265265        }
     266       
     267        Main.commandLineArgs = argArray;
    266268
    267269        if (args.containsKey(Option.VERSION)) {
Note: See TracChangeset for help on using the changeset viewer.