Changeset 12150 in josm


Ignore:
Timestamp:
2017-05-15T10:07:09+02:00 (13 days ago)
Author:
Don-vip
Message:

fix #14792 - fix --version handling: restore a single main() method

File:
1 edited

Legend:

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

    r12135 r12150  
    8888     */
    8989    private static final List<String> COMMAND_LINE_ARGS = new ArrayList<>();
    90 
    91     private static ProgramArguments args;
    92     private static boolean skipLoadingPlugins;
    9390
    9491    private final MainFrame mainFrame;
     
    211208     */
    212209    public static void main(final String[] argArray) {
    213         // First initializes all stuff that do not require AWT/Swing
    214         mainNoGui(argArray);
    215         // Then initializes all AWT/Swing stuff
    216         mainGui();
    217     }
    218 
    219     /**
    220      * Initializes all stuff that do not require AWT/Swing.
    221      * @param argArray Command-line arguments
    222      */
    223     private static void mainNoGui(final String[] argArray) {
    224210        I18n.init();
    225211
     212        ProgramArguments args = null;
    226213        // construct argument table
    227214        try {
     
    274261        COMMAND_LINE_ARGS.addAll(Arrays.asList(argArray));
    275262
    276         skipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS);
     263        boolean skipLoadingPlugins = args.hasOption(Option.SKIP_PLUGINS);
    277264        if (skipLoadingPlugins) {
    278265            Main.info(tr("Plugin loading skipped"));
     
    299286
    300287        Main.platform.afterPrefStartupHook();
    301     }
    302 
    303     /**
    304      * Initializes all AWT/Swing stuff.
    305      */
    306     private static void mainGui() {
     288
    307289        FontsManager.initialize();
    308290
Note: See TracChangeset for help on using the changeset viewer.