Changeset 16430 in josm


Ignore:
Timestamp:
2020-05-16T21:57:03+02:00 (3 weeks ago)
Author:
simon04
Message:

fix #18162, see #18712 - Add --offline=CACHE_UPDATES to disable updates of CachedFiles

This includes imagery index, custom styles, presets.

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

Legend:

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

    r16429 r16430  
    652652                "\t--debug                                   "+tr("Print debugging messages to console")+"\n\n"+
    653653                "\t--skip-plugins                            "+tr("Skip loading plugins")+"\n\n"+
    654                 "\t--offline=<osm_api|josm_website|certificates|all> "+tr("Disable access to the given resource(s), separated by comma")+"\n\n"+
     654                "\t--offline=" + Arrays.stream(OnlineResource.values()).map(OnlineResource::name).collect(
     655                        Collectors.joining("|", "<", ">")) + "\n" +
     656                "\t                                          "+tr("Disable access to the given resource(s), separated by comma") + "\n" +
     657                "\t                                          "+Arrays.stream(OnlineResource.values()).map(OnlineResource::getLocName).collect(
     658                        Collectors.joining("|", "<", ">")) + "\n\n" +
    655659                tr("options provided as Java system properties")+":\n"+
    656660                align("\t-Djosm.dir.name=JOSM") + tr("Change the JOSM directory name") + "\n\n" +
  • trunk/src/org/openstreetmap/josm/io/CachedFile.java

    r16428 r16430  
    449449                if (offline || age < maxAgeMillis) {
    450450                    return localFile;
     451                } else if (NetworkManager.isOffline(OnlineResource.CACHE_UPDATES)) {
     452                    Logging.warn(OfflineAccessException.forResource(tr("Cache update for {0}", urlStr)).getMessage());
     453                    return localFile;
    451454                }
    452455                if (cachingStrategy == CachingStrategy.IfModifiedSince) {
  • trunk/src/org/openstreetmap/josm/io/OnlineResource.java

    r16427 r16430  
    1919    /** The JOSM website, used for startup page, imagery/presets/styles/rules entries, help, etc. */
    2020    JOSM_WEBSITE(tr("JOSM website")),
     21    /** Updates of {@link CachedFile} */
     22    CACHE_UPDATES(tr("Cache updates")),
    2123    /** Various government certificates downloaded on Windows to make https imagery work in some countries */
    2224    CERTIFICATES(tr("Certificates")),
Note: See TracChangeset for help on using the changeset viewer.