Index: applications/editors/josm/plugins/cadastre-fr/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/.settings/org.eclipse.jdt.core.prefs	(revision 22547)
+++ applications/editors/josm/plugins/cadastre-fr/.settings/org.eclipse.jdt.core.prefs	(revision 22547)
@@ -0,0 +1,12 @@
+#Thu Mar 04 08:24:37 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Index: applications/editors/josm/plugins/cadastre-fr/build.xml
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 22504)
+++ applications/editors/josm/plugins/cadastre-fr/build.xml	(revision 22547)
@@ -17,5 +17,5 @@
 **
 ** To build against the core in ../../core, create a correct manifest and deploy to
-** SVN, 
+** SVN,
 **    set the properties commit.message and plugin.main.version
 ** and run
@@ -30,10 +30,10 @@
     <property name="plugin.jar"             value="${plugin.dist.dir}/${ant.project.name}.jar"/>
     <property name="ant.build.javac.target" value="1.5"/>
-	
-	
+
+
 
 	<property name="commit.message" value="Changed constructor for Plugin" />
-	<property name="plugin.main.version" value="3174" />
-	
+	<property name="plugin.main.version" value="3408" />
+
     <target name="init">
         <mkdir dir="${plugin.build.dir}"/>
@@ -87,10 +87,10 @@
         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     </target>
-	
+
 	<!--
-		 ************************** Publishing the plugin *********************************** 
+		 ************************** Publishing the plugin ***********************************
 		-->
 			<!--
-			  ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
+			  ** extracts the JOSM release for the JOSM version in ../core and saves it in the
 			  ** property ${coreversion.info.entry.revision}
 			  **
@@ -104,5 +104,5 @@
 		        </exec>
 		        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
-				<echo>Building against core revision ${coreversion.info.entry.revision}.</echo>			
+				<echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
 				<echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
 				<delete file="core.info.xml" />
@@ -119,5 +119,5 @@
 			                    <arg value="-m '${commit.message}'"/>
 			                    <arg value="."/>
-			    </exec>	    
+			    </exec>
 			</target>
 
@@ -131,5 +131,5 @@
 			                    <arg value="up"/>
 			                    <arg value="."/>
-			    </exec>	    
+			    </exec>
 				<echo>Updating ${plugin.jar} ...</echo>
 			    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
@@ -137,29 +137,29 @@
 			                    <arg value="up"/>
 			                    <arg value="../dist/${plugin.jar}"/>
-			    </exec>	    
+			    </exec>
 			</target>
-			
+
 			<!--
-			 ** commits the plugin.jar 
+			 ** commits the plugin.jar
 			 -->
 			<target name="commit-dist">
 					<echo>
 	***** Properties of published ${plugin.jar} *****
-	Commit message    : '${commit.message}'					
+	Commit message    : '${commit.message}'
 	Plugin-Mainversion: ${plugin.main.version}
 	JOSM build version: ${coreversion.info.entry.revision}
 	Plugin-Version    : ${version.entry.commit.revision}
-	***** / Properties of published ${plugin.jar} *****					
-						
+	***** / Properties of published ${plugin.jar} *****
+
 	Now commiting ${plugin.jar} ...
-	</echo>					
+	</echo>
 				    <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
 				                    <env key="LANG" value="C"/>
 					    			<arg value="-m '${commit.message}'"/>
-				    				<arg value="commit"/>	                			
+				    				<arg value="commit"/>
 	            			        <arg value="${plugin.jar}"/>
-				    </exec>	    
+				    </exec>
 		   	</target>
-					
+
 			<target name="publish" depends="core-info,commit-current,update-current,clean,dist,commit-dist">
 			</target>
Index: applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java
===================================================================
--- applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 22504)
+++ applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java	(revision 22547)
@@ -5,5 +5,4 @@
 
 import java.awt.Color;
-import java.awt.Component;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
@@ -22,7 +21,7 @@
 import java.util.Vector;
 
+import javax.swing.Action;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
-import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
 
@@ -44,6 +43,4 @@
 public class WMSLayer extends Layer implements ImageObserver {
 
-    Component[] component = null;
-
     private int lambertZone = -1;
 
@@ -59,7 +56,7 @@
      */
     protected final int serializeFormatVersion = 4;
-    
+
     public static int currentFormat;
-    
+
     private static final int cBBoxForBuildings = 50; // hard coded size of grabbed boxes for building layers
 
@@ -69,5 +66,5 @@
 
     private String location = "";
-    
+
     private String departement = "";
 
@@ -88,6 +85,6 @@
     private double rasterRatio;
 
-    private JMenuItem saveAsPng;
-    
+    private Action saveAsPng;
+
     public boolean adjustModeEnabled;
 
@@ -106,5 +103,6 @@
     }
 
-    public void destroy() {
+    @Override
+	public void destroy() {
         // if the layer is currently saving the images in the cache, wait until it's finished
         if (cacheControl != null) {
@@ -119,7 +117,7 @@
         System.out.println("Layer "+location+" destroyed");
     }
-    
+
     private static String buildName(String location, String codeCommune, boolean buildingOnly) {
-        String ret = new String(location.toUpperCase());
+        String ret = location.toUpperCase();
         if (codeCommune != null && !codeCommune.equals(""))
             ret += "(" + codeCommune + ")";
@@ -136,5 +134,5 @@
         grab(grabber, b, true);
     }
-    
+
     public void grab(CadastreGrabber grabber, Bounds b, boolean useFactor) throws IOException {
         cancelled = false;
@@ -225,5 +223,5 @@
         } else {
             // divide to fixed size squares
-            int cSquare = factor == 4 ? Integer.parseInt(Main.pref.get("cadastrewms.squareSize", "100")) : optionalSize;   
+            int cSquare = factor == 4 ? Integer.parseInt(Main.pref.get("cadastrewms.squareSize", "100")) : optionalSize;
             minEast = minEast - minEast % cSquare;
             minNorth = minNorth - minNorth % cSquare;
@@ -286,5 +284,5 @@
         if (this.adjustModeEnabled) {
             WMSAdjustAction.paintAdjustFrames(g, mv);
-        }            
+        }
     }
 
@@ -303,15 +301,15 @@
 
     @Override
-    public Component[] getMenuEntries() {
-        saveAsPng = new JMenuItem(new MenuActionSaveRasterAs(this));
+    public Action[] getMenuEntries() {
+        saveAsPng = new MenuActionSaveRasterAs(this);
         saveAsPng.setEnabled(isRaster);
-        component = new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
-                new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),
-                new JMenuItem(new MenuActionLoadFromCache()),
+        return new Action[] {
+        		LayerListDialog.getInstance().createShowHideLayerAction(),
+                LayerListDialog.getInstance().createDeleteLayerAction(),
+                new MenuActionLoadFromCache(),
                 saveAsPng,
-                new JMenuItem(new LayerListPopup.InfoAction(this)),
+                new LayerListPopup.InfoAction(this),
 
         };
-        return component;
     }
 
@@ -443,6 +441,6 @@
         double ratio = rasterSizeY/rasterSizeX;
         // keep same ratio on screen as WMS bbox (stored in communeBBox)
-        rasterMin = new EastNorth(eaMin.getX(), rasterCenter.getY()-(eaMax.getX()-eaMin.getX())*ratio/2); 
-        rasterMax = new EastNorth(eaMax.getX(), rasterCenter.getY()+(eaMax.getX()-eaMin.getX())*ratio/2); 
+        rasterMin = new EastNorth(eaMin.getX(), rasterCenter.getY()-(eaMax.getX()-eaMin.getX())*ratio/2);
+        rasterMax = new EastNorth(eaMax.getX(), rasterCenter.getY()+(eaMax.getX()-eaMin.getX())*ratio/2);
         rasterRatio = (rasterMax.getX()-rasterMin.getX())/rasterSizeX;
     }
@@ -598,5 +596,5 @@
         rasterRatio = (rasterMax.getX()-rasterMin.getX())/(communeBBox.max.getX() - communeBBox.min.getX());
     }
-    
+
     public EastNorthBound getCommuneBBox() {
         return communeBBox;
@@ -640,5 +638,5 @@
 //        double proportion = dst1.distance(dst2)/org1.distance(org2);
         images.get(0).rotate(rasterCenter, angle);
-        this.angle += angle; 
+        this.angle += angle;
     }
 
