Ignore:
Timestamp:
2020-01-28T22:27:30+01:00 (6 years ago)
Author:
donvip
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java

    r34743 r35312  
    1 /*
    2  * Indoorhelper is a JOSM plug-in to support users when creating their own indoor maps.
    3  *  Copyright (C) 2016  Erik Gruschka
    4  *  Copyright (C) 2018  Rebecca Schmidt
    5  *
    6  *  This program is free software: you can redistribute it and/or modify
    7  *  it under the terms of the GNU General Public License as published by
    8  *  the Free Software Foundation, either version 3 of the License, or
    9  *  (at your option) any later version.
    10  *
    11  *  This program is distributed in the hope that it will be useful,
    12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  *  GNU General Public License for more details.
    15  *
    16  *  You should have received a copy of the GNU General Public License
    17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    18  */
    19 
     1// License: GPL. For details, see LICENSE file.
    202package org.openstreetmap.josm.plugins.indoorhelper;
    213
     
    8769        try (InputStream stream = IndoorHelperPlugin.class.getResourceAsStream("/data/" + resourceName)) {
    8870            if (stream == null) {
    89                 System.out.println("MapPaint: stream is null");
    9071                throw new IOException("Cannot get resource \"" + resourceName + "\" from Jar file.");
    9172            }
     
    133114        }
    134115    }
    135 
    136     /**
    137      * Writes the indoor validator file in the user preferences if it isn't there
    138      * and activates it.
    139      */
    140 //    private void setIndoorValidator() {
    141 //        //get the current validator settings
    142 //        Map<String, Setting<?>> settings =  Config.getPref().getAllSettings();
    143 //        MapListSetting mapListSetting = (MapListSetting) settings.
    144 //                get("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries");
    145 //        List<Map<String, String>> validatorMaps;
    146 //        if (mapListSetting != null) {
    147 //            validatorMaps = mapListSetting.getValue();
    148 //        } else {
    149 //            validatorMaps = new ArrayList<>();
    150 //        }
    151 //        boolean validatorExists = false;
    152 //
    153 //        //check if indoor validator is already set
    154 //        for (Map<String, String> map : validatorMaps) {
    155 //            if (map.containsValue("Indoor")) {
    156 //                validatorExists = true;
    157 //            }
    158 //        }
    159 //
    160 //        //put it in the settings if not
    161 //        if (!validatorExists) {
    162 //            List<Map<String, String>> validatorMapsNew = new ArrayList<>();
    163 //            if (!validatorMaps.isEmpty()) {
    164 //                validatorMapsNew.addAll(validatorMaps);
    165 //            }
    166 //            Map<String, String> indoorValidator = new HashMap<>();
    167 //            indoorValidator.put("title", "Indoor");
    168 //            indoorValidator.put("active", "true");
    169 //            indoorValidator.put("url", Config.getPref().getUserDataDirectory()+ sep +"validator" +
    170 //                    sep + "indoorhelper.validator.mapcss");
    171 //
    172 //            validatorMapsNew.add(indoorValidator);
    173 //            Config.getPref().putListOfStructs
    174 //            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
    175 //                    validatorMapsNew);
    176 //        }
    177 //    }
    178116}
Note: See TracChangeset for help on using the changeset viewer.