Changeset 32556 in osm for applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
- Timestamp:
- 2016-07-04T14:18:17+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CadastrePlugin.java
r32425 r32556 1 // License: GPL. v2 and later. Copyright 2008-2009 by Pieren <pieren3@gmail.com> and others1 // License: GPL. For details, see LICENSE file. 2 2 package cadastre_fr; 3 3 … … 46 46 * a city/town/village code. 47 47 * 48 * @author Pieren <pieren3@gmail.com>,49 * <matthieu.lochegnies@gmail.com>for the extension to codeCommune48 * @author Pieren <pieren3@gmail.com>, 49 * <matthieu.lochegnies@gmail.com> for the extension to codeCommune 50 50 * 51 51 * @version 2.6 … … 171 171 public static String grabLayers, grabStyles = null; 172 172 173 static privateboolean menuEnabled = false;173 private static boolean menuEnabled = false; 174 174 175 175 private static String LAYER_BULDINGS = "CDIF:LS2"; … … 204 204 cacheDir = Main.pref.get("cadastrewms.cacheDir"); 205 205 } 206 if (cacheDir.charAt(cacheDir.length()-1) != File.separatorChar 206 if (cacheDir.charAt(cacheDir.length()-1) != File.separatorChar) 207 207 cacheDir += File.separatorChar; 208 208 Main.info("current cache directory: "+cacheDir); … … 212 212 UploadAction.registerUploadHook(new CheckSourceUploadHook()); 213 213 214 registerSessionLayerExporter(WMSLayer.class 214 registerSessionLayerExporter(WMSLayer.class, CadastreSessionExporter.class); 215 215 registerSessionLayerImporter("cadastre-fr", CadastreSessionImporter.class); 216 216 } … … 277 277 if (currentResolution.equals("high")) { 278 278 imageWidth = 1000; imageHeight = 800; 279 } else if (currentResolution.equals("medium")) {279 } else if (currentResolution.equals("medium")) { 280 280 imageWidth = 800; imageHeight = 600; 281 281 } else { … … 339 339 grabStyles = grabStyles.substring(0, grabStyles.length()-1); 340 340 } else { 341 JOptionPane.showMessageDialog(Main.parent, tr("Please enable at least two WMS layers in the cadastre-fr "341 JOptionPane.showMessageDialog(Main.parent, tr("Please enable at least two WMS layers in the cadastre-fr " 342 342 + "plugin configuration.\nLayers ''Building'' and ''Parcel'' added by default.")); 343 343 Main.pref.put("cadastrewms.layerBuilding", true); … … 430 430 try { 431 431 Thread.sleep(milliseconds); 432 } catch (InterruptedException e) {} 432 } catch (InterruptedException e) { 433 Main.debug(e); 434 } 433 435 } 434 436 … … 439 441 try { 440 442 dialog.setAlwaysOnTop(true); 441 } catch (SecurityException e) {443 } catch (SecurityException e) { 442 444 Main.warn(tr("Warning: failed to put option pane dialog always on top. Exception was: {0}", e.toString())); 443 445 } … … 457 459 if (Main.map != null && Main.map.mapView != null) { 458 460 int wmsNewLayerPos = Main.getLayerManager().getLayers().size(); 459 for (Layer l : Main.getLayerManager().getLayersOfType(WMSLayer.class)) {461 for (Layer l : Main.getLayerManager().getLayersOfType(WMSLayer.class)) { 460 462 int wmsPos = Main.getLayerManager().getLayers().indexOf(l); 461 463 if (wmsPos < wmsNewLayerPos) wmsNewLayerPos = wmsPos; … … 477 479 try { 478 480 year = Integer.decode(srcYear); 479 } catch (NumberFormatException e) {} 481 } catch (NumberFormatException e) { 482 Main.debug(e); 483 } 480 484 if (srcYear.equals("AAAA") || (year != null && year < currentYear)) { 481 485 Main.info("Replace source year "+srcYear+" by current year "+currentYear);
Note:
See TracChangeset
for help on using the changeset viewer.