Changeset 32211 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
- Timestamp:
- 2016-06-01T00:55:28+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/MenuActionLoadFromCache.java
r32060 r32211 18 18 private static final long serialVersionUID = 1L; 19 19 20 public static String name = marktr("Load layer from cache");20 public static final String name = marktr("Load layer from cache"); 21 21 22 /** 23 * Constructs a new {@code MenuActionLoadFromCache}. 24 */ 22 25 public MenuActionLoadFromCache() { 23 26 super(tr(name), "cadastre_small", tr("Load location from cache (only if cache is enabled)"), null, false, "cadastrefr/loadfromcache", true); … … 36 39 if (file.exists()) { 37 40 String filename = file.getName(); 38 String ext = (filename.lastIndexOf( ".")==-1)?"":filename.substring(filename.lastIndexOf(".")+1,filename.length());39 if ((ext.length() == 3 && ext.substring(0, CacheControl. cLambertCC9Z.length()).equals(CacheControl.cLambertCC9Z) &&41 String ext = (filename.lastIndexOf('.')==-1)?"":filename.substring(filename.lastIndexOf('.')+1,filename.length()); 42 if ((ext.length() == 3 && ext.substring(0, CacheControl.C_LAMBERT_CC_9Z.length()).equals(CacheControl.C_LAMBERT_CC_9Z) && 40 43 !(CadastrePlugin.isLambert_cc9())) 41 || (ext.length() == 4 && ext.substring(0, CacheControl. cUTM20N.length()).equals(CacheControl.cUTM20N) &&44 || (ext.length() == 4 && ext.substring(0, CacheControl.C_UTM20N.length()).equals(CacheControl.C_UTM20N) && 42 45 !(CadastrePlugin.isUtm_france_dom())) 43 46 || (ext.length() == 1) && !(CadastrePlugin.isLambert())) { … … 45 48 continue; 46 49 } else { 47 String location = filename.substring(0, filename.lastIndexOf( "."));48 if (ext.length() == 3 && ext.substring(0, CacheControl. cLambertCC9Z.length()).equals(CacheControl.cLambertCC9Z))50 String location = filename.substring(0, filename.lastIndexOf('.')); 51 if (ext.length() == 3 && ext.substring(0, CacheControl.C_LAMBERT_CC_9Z.length()).equals(CacheControl.C_LAMBERT_CC_9Z)) 49 52 ext = ext.substring(2); 50 else if (ext.length() == 4 && ext.substring(0, CacheControl. cUTM20N.length()).equals(CacheControl.cUTM20N))53 else if (ext.length() == 4 && ext.substring(0, CacheControl.C_UTM20N.length()).equals(CacheControl.C_UTM20N)) 51 54 ext = ext.substring(3); 52 55 // check the extension and its compatibility with current projection
Note:
See TracChangeset
for help on using the changeset viewer.