Ignore:
Timestamp:
2017-11-25T01:25:40+01:00 (8 years ago)
Author:
donvip
Message:

update to JOSM 12856

File:
1 edited

Legend:

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

    r32637 r33887  
    2323import java.io.InputStream;
    2424import java.io.OutputStream;
     25
    2526import org.openstreetmap.josm.Main;
    2627import org.openstreetmap.josm.gui.MapFrame;
     
    3334/**
    3435 * This is the main class for the indoorhelper plug-in.
    35  * 
     36 *
    3637 * @author egru
    37  * 
     38 *
    3839 */
    3940public class IndoorHelperPlugin extends Plugin {
     
    4647    /**
    4748     * Constructor for the plug-in.
    48      * 
     49     *
    4950     * Exports the needed files and adds them to the settings.
    50      * 
     51     *
    5152     * @param info general information about the plug-in
    5253     */
    5354    public IndoorHelperPlugin(PluginInformation info) throws Exception {
    54         super(info);   
     55        super(info);
    5556
    5657        this.exportValidator("/data/indoorhelper.validator.mapcss");
     
    7273        }
    7374    }
    74    
     75
    7576    /**
    7677     * Exports the mapcss validator file to the preferences directory.
     
    9293            byte[] buffer = new byte[4096];
    9394
    94             String valDirPath = Main.pref.getUserDataDirectory() + sep + "validator";
     95            String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "validator";
    9596            File valDir = new File(valDirPath);
    9697            valDir.mkdirs();
     
    107108        } finally {
    108109            stream.close();
    109         }   
     110        }
    110111    }
    111112
     
    128129            byte[] buffer = new byte[4096];
    129130
    130             String valDirPath = Main.pref.getUserDataDirectory() + sep + "styles";
     131            String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles";
    131132            File valDir = new File(valDirPath);
    132133            valDir.mkdirs();
     
    143144        } finally {
    144145            stream.close();
    145         }   
     146        }
    146147    }
    147    
     148
    148149    /**
    149150     * Writes the indoor validator file in the user preferences if it isn't there
     
    179180//            indoorValidator.put("title", "Indoor");
    180181//            indoorValidator.put("active", "true");
    181 //            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" + 
     182//            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" +
    182183//                    sep + "indoorhelper.validator.mapcss");
    183184//
    184185//            validatorMapsNew.add(indoorValidator);
    185186//            Main.pref.putListOfStructs
    186 //            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 
     187//            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
    187188//                    validatorMapsNew);
    188189//        }
Note: See TracChangeset for help on using the changeset viewer.