001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.preferences.sources;
003
004import static org.openstreetmap.josm.tools.I18n.tr;
005
006import java.util.Collection;
007import java.util.Collections;
008
009import org.openstreetmap.josm.tools.ImageProvider;
010
011/**
012 * Helper class for tagging presets preferences.
013 * @since 12649 (extracted from gui.preferences package)
014 */
015public class PresetPrefHelper extends SourcePrefHelper {
016
017    /**
018     * The unique instance.
019     */
020    public static final PresetPrefHelper INSTANCE = new PresetPrefHelper();
021
022    /**
023     * Constructs a new {@code PresetPrefHelper}.
024     */
025    public PresetPrefHelper() {
026        super("taggingpreset.entries", SourceType.TAGGING_PRESET);
027    }
028
029    @Override
030    public Collection<ExtendedSourceEntry> getDefault() {
031        ExtendedSourceEntry i = new ExtendedSourceEntry(type, "defaultpresets.xml", "resource://data/defaultpresets.xml");
032        i.title = tr("Internal Preset");
033        i.icon = new ImageProvider("logo").getResource();
034        i.description = tr("The default preset for JOSM");
035        return Collections.singletonList(i);
036    }
037}