diff --git a/src/org/openstreetmap/josm/gui/MainApplication.java b/src/org/openstreetmap/josm/gui/MainApplication.java
index 4af8300..e037ada 100644
a
|
b
|
|
32 | 32 | import java.util.Set; |
33 | 33 | import java.util.TreeSet; |
34 | 34 | import java.util.logging.Level; |
| 35 | import java.util.stream.Collectors; |
| 36 | import java.util.stream.Stream; |
35 | 37 | |
36 | 38 | import javax.swing.JOptionPane; |
37 | 39 | import javax.swing.RepaintManager; |
… |
… |
static String getHelp() { |
151 | 153 | "\t--skip-plugins "+tr("Skip loading plugins")+"\n\n"+ |
152 | 154 | "\t--offline=<osm_api|josm_website|all> "+tr("Disable access to the given resource(s), separated by comma")+"\n\n"+ |
153 | 155 | 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"+ |
161 | 165 | tr("-Djosm.home has lower precedence, i.e. the specific setting overrides the general one")+"\n\n"+ |
162 | 166 | tr("note: For some tasks, JOSM needs a lot of memory. It can be necessary to add the following\n" + |
163 | 167 | " Java option to specify the maximum size of allocated memory in megabytes")+":\n"+ |
… |
… |
static String getHelp() { |
168 | 172 | "\tjava -jar josm.jar london.osm --selection=http://www.ostertag.name/osm/OSM_errors_node-duplicate.xml\n"+ |
169 | 173 | "\tjava -jar josm.jar 43.2,11.1,43.4,11.4\n"+ |
170 | 174 | "\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"+ |
171 | 176 | "\tjava -Djosm.home=/home/user/.josm_dev -jar josm.jar\n"+ |
172 | 177 | "\tjava -Xmx1024m -jar josm.jar\n\n"+ |
173 | 178 | tr("Parameters --download, --downloadgps, and --selection are processed in this order.")+'\n'+ |
174 | 179 | tr("Make sure you load some data if you use --selection.")+'\n'; |
175 | 180 | } |
176 | 181 | |
| 182 | private static String align(String str) { |
| 183 | return str + Stream.generate(() -> " ").limit(Math.max(0, 43 - str.length())).collect(Collectors.joining("")); |
| 184 | } |
| 185 | |
177 | 186 | /** |
178 | 187 | * Main application Startup |
179 | 188 | * @param argArray Command-line arguments |