Changeset 11255 in josm for trunk/src/org


Ignore:
Timestamp:
2016-11-14T20:21:30+01:00 (3 years ago)
Author:
simon04
Message:

fix #13913 - Update commandline usage

File:
1 edited

Legend:

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

    r11103 r11255  
    3333import java.util.TreeSet;
    3434import java.util.logging.Level;
     35import java.util.stream.Collectors;
     36import java.util.stream.Stream;
    3537
    3638import javax.swing.JOptionPane;
     
    152154                "\t--offline=<osm_api|josm_website|all>      "+tr("Disable access to the given resource(s), separated by comma")+"\n\n"+
    153155                tr("options provided as Java system properties")+":\n"+
    154                 // CHECKSTYLE.OFF: SingleSpaceSeparator
    155                 "\t-Djosm.pref="    +tr("/PATH/TO/JOSM/PREF    ")+tr("Set the preferences directory")+"\n\n"+
    156                 "\t-Djosm.userdata="+tr("/PATH/TO/JOSM/USERDATA")+tr("Set the user data directory")+"\n\n"+
    157                 "\t-Djosm.cache="   +tr("/PATH/TO/JOSM/CACHE   ")+tr("Set the cache directory")+"\n\n"+
    158                 "\t-Djosm.home="    +tr("/PATH/TO/JOSM/HOMEDIR ")+
    159                 // CHECKSTYLE.ON: SingleSpaceSeparator
    160                 tr("Relocate all 3 directories to homedir. Cache directory will be in homedir/cache")+"\n\n"+
     156                align("\t-Djosm.dir.name=JOSM") + tr("Change the JOSM directory name") + "\n\n" +
     157                align("\t-Djosm.pref=" + tr("/PATH/TO/JOSM/PREF    ")) + tr("Set the preferences directory") + "\n" +
     158                align("\t") + tr("Default: {0}", platform.getDefaultPrefDirectory()) + "\n\n" +
     159                align("\t-Djosm.userdata=" + tr("/PATH/TO/JOSM/USERDATA")) + tr("Set the user data directory") + "\n" +
     160                align("\t") + tr("Default: {0}", platform.getDefaultUserDataDirectory()) + "\n\n" +
     161                align("\t-Djosm.cache=" + tr("/PATH/TO/JOSM/CACHE   ")) + tr("Set the cache directory") + "\n" +
     162                align("\t") + tr("Default: {0}", platform.getDefaultCacheDirectory()) + "\n\n" +
     163                align("\t-Djosm.home=" + tr("/PATH/TO/JOSM/HOMEDIR ")) +
     164                tr("Set the preferences+data+cache directory (cache directory will be josm.home/cache)")+"\n\n"+
    161165                tr("-Djosm.home has lower precedence, i.e. the specific setting overrides the general one")+"\n\n"+
    162166                tr("note: For some tasks, JOSM needs a lot of memory. It can be necessary to add the following\n" +
     
    169173                "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+
    170174                "\tjava -Djosm.pref=$XDG_CONFIG_HOME -Djosm.userdata=$XDG_DATA_HOME -Djosm.cache=$XDG_CACHE_HOME -jar josm.jar\n"+
     175                "\tjava -Djosm.dir.name=josm_dev -jar josm.jar\n"+
    171176                "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+
    172177                "\tjava -Xmx1024m -jar josm.jar\n\n"+
    173178                tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+
    174179                tr("Make sure you load some data if you use --selection.")+'\n';
     180    }
     181
     182    private static String align(String str) {
     183        return str + Stream.generate(() -> " ").limit(Math.max(0, 43 - str.length())).collect(Collectors.joining(""));
    175184    }
    176185
Note: See TracChangeset for help on using the changeset viewer.