Ignore:
Timestamp:
2015-10-18T13:00:40+02:00 (4 years ago)
Author:
simon04
Message:

Refactor usage of ExtensionFileFilter introduced in r8894

File:
1 edited

Legend:

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

    r8894 r8895  
    287287     * @param defaultExtension The default extension
    288288     * @param description A short textual description of the file type without supported extensions in parentheses
     289     * @param addArchiveExtensionsToDescription Whether to also add the archive extensions to the description
    289290     * @return The constructed filter
    290291     */
    291     public static ExtensionFileFilter newFilterWithArchiveExtensions(String extensions, String defaultExtension, String description) {
     292    public static ExtensionFileFilter newFilterWithArchiveExtensions(
     293            String extensions, String defaultExtension, String description, boolean addArchiveExtensionsToDescription) {
    292294        final Collection<String> extensionsPlusArchive = new LinkedHashSet<>();
    293295        final Collection<String> extensionsForDescription = new LinkedHashSet<>();
     
    297299            extensionsPlusArchive.add(e + ".bz2");
    298300            extensionsForDescription.add("*." + e);
    299             // intentionally do not add [e].gz and [e].bz2 to extensionsForDescription in order to avoid long texts
     301            if (addArchiveExtensionsToDescription) {
     302                extensionsForDescription.add("*." + e + ".gz");
     303                extensionsForDescription.add("*." + e + ".bz2");
     304            }
    300305        }
    301306        return new ExtensionFileFilter(Utils.join(",", extensionsPlusArchive), defaultExtension,
Note: See TracChangeset for help on using the changeset viewer.