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 22544)
+++ 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 22544)
+++ 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;
     }
 
Index: applications/editors/josm/plugins/graphview/build.xml
===================================================================
--- applications/editors/josm/plugins/graphview/build.xml	(revision 22544)
+++ applications/editors/josm/plugins/graphview/build.xml	(revision 22547)
@@ -18,5 +18,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
@@ -26,8 +26,8 @@
 -->
 <project name="graphview" default="dist" basedir=".">
- 
+
 	<property name="commit.message" value="prevent stack overflows; closes bug 4695 in JOSM Trac" />
-	<property name="plugin.main.version" value="3314" />
-	
+	<property name="plugin.main.version" value="3408" />
+
     <property name="josm"                   location="../../core/dist/josm-custom.jar"/>
     <property name="plugin.build.dir"       value="build"/>
@@ -136,11 +136,11 @@
         <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
     </target>
-	
-	
+
+
 	<!--
-		 ************************** Publishing the plugin *********************************** 
-		-->
-		<!--
-		** extracts the JOSM release for the JOSM version in ../core and saves it in the 
+		 ************************** Publishing the plugin ***********************************
+		-->
+		<!--
+		** extracts the JOSM release for the JOSM version in ../core and saves it in the
 		** property ${coreversion.info.entry.revision}
 		**
@@ -191,15 +191,15 @@
 
 		<!--
-		** 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>
Index: applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java
===================================================================
--- applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java	(revision 22544)
+++ applications/editors/josm/plugins/graphview/src/org/openstreetmap/josm/plugins/graphview/plugin/layer/GraphViewLayer.java	(revision 22547)
@@ -3,5 +3,4 @@
 import java.awt.BasicStroke;
 import java.awt.Color;
-import java.awt.Component;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
@@ -13,7 +12,6 @@
 import java.util.List;
 
+import javax.swing.Action;
 import javax.swing.Icon;
-import javax.swing.JMenuItem;
-import javax.swing.JSeparator;
 
 import org.openstreetmap.josm.Main;
@@ -324,9 +322,12 @@
 
 	@Override
-	public Component[] getMenuEntries() {
-		return new Component[] { new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
-				new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)), new JSeparator(),
-				new JMenuItem(new RenameLayerAction(null, this)), new JSeparator(),
-				new JMenuItem(new LayerListPopup.InfoAction(this)) };
+	public Action[] getMenuEntries() {
+		return new Action[] {
+				LayerListDialog.getInstance().createShowHideLayerAction(),
+				LayerListDialog.getInstance().createDeleteLayerAction(),
+				SeparatorLayerAction.INSTANCE,
+				new RenameLayerAction(null, this),
+				SeparatorLayerAction.INSTANCE,
+				new LayerListPopup.InfoAction(this)};
 	}
 
Index: applications/editors/josm/plugins/imagewaypoint/build.xml
===================================================================
--- applications/editors/josm/plugins/imagewaypoint/build.xml	(revision 22544)
+++ applications/editors/josm/plugins/imagewaypoint/build.xml	(revision 22547)
@@ -33,5 +33,5 @@
 	<property name="commit.message" value="Updated the constructor signature of the plugin main class" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="2830" />
+	<property name="plugin.main.version" value="3408" />
 
 	<property name="josm"                   location="../../core/dist/josm-custom.jar"/>
@@ -91,8 +91,8 @@
 
 	<!--
-	************************** 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}
 		**
@@ -143,15 +143,15 @@
 
 	<!--
-		** 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>
Index: applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java
===================================================================
--- applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java	(revision 22544)
+++ applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointLayer.java	(revision 22547)
@@ -3,5 +3,4 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.Component;
 import java.awt.Graphics2D;
 import java.awt.Rectangle;
@@ -10,4 +9,5 @@
 import java.awt.event.MouseListener;
 
+import javax.swing.Action;
 import javax.swing.Icon;
 
@@ -51,12 +51,5 @@
     }
 
-    private static final class ImageChangeListener implements
-    IImageChangeListener {
-        private final ImageWayPointLayer layer;
-
-        public ImageChangeListener(final ImageWayPointLayer layer) {
-            this.layer = layer;
-        }
-
+    private static final class ImageChangeListener implements IImageChangeListener {
         public final void onAvailableImageEntriesChanged(
         final ImageEntries entries) {
@@ -80,5 +73,5 @@
         Main.map.mapView.addMouseListener(this.layerMouseListener);
 
-        this.imageChangeListener = new ImageChangeListener(this);
+        this.imageChangeListener = new ImageChangeListener();
         ImageEntries.getInstance().addListener(this.imageChangeListener);
     }
@@ -95,6 +88,6 @@
 
     @Override
-    public final Component[] getMenuEntries() {
-        return new Component[0];
+    public final Action[] getMenuEntries() {
+        return new Action[0];
     }
 
Index: applications/editors/josm/plugins/measurement/build.xml
===================================================================
--- applications/editors/josm/plugins/measurement/build.xml	(revision 22544)
+++ applications/editors/josm/plugins/measurement/build.xml	(revision 22547)
@@ -18,5 +18,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
@@ -28,5 +28,5 @@
 
 	<property name="commit.message" value="Changed the constructor signature of the plugin main class" />
-	<property name="plugin.main.version" value="2907" />
+	<property name="plugin.main.version" value="3408" />
 
 
@@ -87,8 +87,8 @@
 
 	<!--
-		 ************************** 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}
 		**
@@ -139,15 +139,15 @@
 
 	<!--
-		** 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>
Index: applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
===================================================================
--- applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 22544)
+++ applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java	(revision 22547)
@@ -15,4 +15,5 @@
 
 import javax.swing.AbstractAction;
+import javax.swing.Action;
 import javax.swing.Box;
 import javax.swing.DefaultListCellRenderer;
@@ -24,7 +25,5 @@
 import javax.swing.JLabel;
 import javax.swing.JList;
-import javax.swing.JMenuItem;
 import javax.swing.JOptionPane;
-import javax.swing.JSeparator;
 
 import org.openstreetmap.josm.Main;
@@ -94,12 +93,12 @@
     }
 
-    @Override public Component[] getMenuEntries() {
-        return new Component[]{
-            new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),
+    @Override public Action[] getMenuEntries() {
+        return new Action[]{
+            LayerListDialog.getInstance().createShowHideLayerAction(),
             // TODO: implement new JMenuItem(new LayerListDialog.DeleteLayerAction(this)),
-            new JSeparator(),
-            new JMenuItem(new GPXLayerImportAction(this)),
-            new JSeparator(),
-            new JMenuItem(new LayerListPopup.InfoAction(this))};
+            SeparatorLayerAction.INSTANCE,
+            new GPXLayerImportAction(this),
+            SeparatorLayerAction.INSTANCE,
+            new LayerListPopup.InfoAction(this)};
     }
 
@@ -222,5 +221,5 @@
     }
 
-    public static double OldangleBetween(LatLon p1, LatLon p2){
+    public static double oldAngleBetween(LatLon p1, LatLon p2){
         double lat1, lon1, lat2, lon2;
         double dlon, dlat;
