Index: applications/editors/josm/plugins/imagery-xml-bounds/.classpath
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/.classpath	(revision 29460)
+++ applications/editors/josm/plugins/imagery-xml-bounds/.classpath	(revision 29461)
@@ -2,5 +2,5 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="bin"/>
Index: applications/editors/josm/plugins/imagery-xml-bounds/build.xml
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 29460)
+++ applications/editors/josm/plugins/imagery-xml-bounds/build.xml	(revision 29461)
@@ -1,36 +1,8 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
-<!--
-** This is a template build file for the imagery-xml-bounds plugin.
-**
-** Maintaining versions
-** ====================
-** see README.template
-**
-** Usage
-** =====
-** To build it run
-**
-**    > ant  dist
-**
-** To install the generated plugin locally (in you default plugin directory) run
-**
-**    > ant  install
-**
-** The generated plugin jar is not automatically available in JOSMs plugin configuration
-** dialog. You have to check it in first.
-**
-** Use the ant target 'publish' to check in the plugin and make it available to other
-** JOSM users:
-**    set the properties commit.message and plugin.main.version
-** and run
-**    > ant  publish
-**
-**
--->
 <project name="imagery-xml-bounds" default="dist" basedir=".">
     <!-- enter the SVN commit message -->
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="5459"/>
+    <property name="plugin.main.version" value="5821"/>
 	
     <!-- Configure these properties (replace "..." accordingly).
@@ -42,7 +14,4 @@
     <property name="plugin.icon" value="images/xml_24.png"/>
     <property name="plugin.link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Imagery-XML-Bounds"/>
-    <!--<property name="plugin.early" value="..."/>-->
-    <!--<property name="plugin.requires" value="..."/>-->
-    <!--<property name="plugin.stage" value="..."/>-->
 
     <!-- ** include targets that all plugins have in common ** -->
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java	(revision 29460)
+++ applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/ImageryXmlBoundsPlugin.java	(revision 29461)
@@ -18,5 +18,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
-import org.openstreetmap.josm.data.Version;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -24,6 +23,5 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
-import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsListAction;
-import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsPropertiesAction;
+import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsAction;
 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.ShowBoundsSelectionAction;
 import org.openstreetmap.josm.plugins.imageryxmlbounds.actions.downloadtask.DownloadXmlBoundsTask;
@@ -46,15 +44,15 @@
      * Action showing bounds of the selected closed ways in Selection dialog 
      */
-	private final ShowBoundsListAction selectionListAction = new ShowBoundsListAction();
+	private final ShowBoundsAction selectionListAction = new ShowBoundsAction();
 
     /**
      * Action showing bounds of the selected multipolygons in Properties dialog 
      */
-    private final ShowBoundsPropertiesAction propertiesListAction = new ShowBoundsPropertiesAction();
+    private final ShowBoundsAction propertiesListAction = new ShowBoundsAction();
     
 	/**
      * Action showing bounds of the selected multipolygons in Relations dialog
      */
-	private final ShowBoundsListAction relationListAction = new ShowBoundsListAction();
+	private final ShowBoundsAction relationListAction = new ShowBoundsAction();
 
     /**
@@ -82,7 +80,5 @@
 		Main.toolbar.register(selectionAction);
 		// Allow JOSM to download *.imagery.xml files
-		if (Version.getInstance().getVersion() >= 4523) {
-		    Main.main.menu.openLocation.addDownloadTaskClass(DownloadXmlBoundsTask.class);
-		}
+		Main.main.menu.openLocation.addDownloadTaskClass(DownloadXmlBoundsTask.class);
 	}
 	
@@ -102,10 +98,21 @@
 		if (newFrame != null) {
 		    // Initialize dialogs actions only after the main frame is created 
-            newFrame.selectionListDialog.addPopupMenuSeparator();
-            newFrame.selectionListDialog.addPopupMenuAction(selectionListAction);
-            newFrame.propertiesDialog.addMembershipPopupMenuSeparator();
-            newFrame.propertiesDialog.addMembershipPopupMenuAction(propertiesListAction);
-			newFrame.relationListDialog.addPopupMenuSeparator();
-			newFrame.relationListDialog.addPopupMenuAction(relationListAction);
+            newFrame.selectionListDialog.getPopupMenuHandler().addSeparator();
+            newFrame.selectionListDialog.getPopupMenuHandler().addAction(selectionListAction);
+            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addSeparator();
+            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addAction(propertiesListAction);
+			newFrame.relationListDialog.getPopupMenuHandler().addSeparator();
+			newFrame.relationListDialog.getPopupMenuHandler().addAction(relationListAction);
+		} else if (oldFrame != null) {
+            // Remove listeners from previous frame to avoid memory leaks
+		    if (oldFrame.relationListDialog != null) {
+		        oldFrame.relationListDialog.getPopupMenuHandler().removeAction(relationListAction);
+		    }
+		    if (oldFrame.propertiesDialog != null) {
+		        oldFrame.propertiesDialog.getMembershipPopupMenuHandler().removeAction(propertiesListAction);
+		    }
+		    if (oldFrame.selectionListDialog != null) {
+		        oldFrame.selectionListDialog.getPopupMenuHandler().removeAction(selectionListAction);
+		    }
 		}
 	}
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsAction.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsAction.java	(revision 29460)
+++ applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsAction.java	(revision 29461)
@@ -19,4 +19,5 @@
 import java.awt.Font;
 import java.awt.event.ActionEvent;
+import java.util.Collection;
 
 import javax.swing.Box;
@@ -27,4 +28,6 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.OsmPrimitiveAction;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.plugins.imageryxmlbounds.XmlBoundsLayer;
 
@@ -34,5 +37,5 @@
  */
 @SuppressWarnings("serial")
-public class ShowBoundsAction extends ComputeBoundsAction {
+public class ShowBoundsAction extends ComputeBoundsAction implements OsmPrimitiveAction {
 
 	public ShowBoundsAction() {
@@ -58,3 +61,8 @@
         JOptionPane.showMessageDialog(Main.parent, box, ACTION_NAME, JOptionPane.PLAIN_MESSAGE);
 	}
+
+    @Override
+    public void setPrimitives(Collection<? extends OsmPrimitive> primitives) {
+        updateOsmPrimitives(primitives);
+    }
 }
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsListAction.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsListAction.java	(revision 29460)
+++ 	(revision )
@@ -1,50 +1,0 @@
-//    JOSM Imagery XML Bounds plugin.
-//    Copyright (C) 2011 Don-vip
-//
-//    This program is free software: you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation, either version 3 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-package org.openstreetmap.josm.plugins.imageryxmlbounds.actions;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JList;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-
-/**
- * 
- * @author Don-vip
- *
- */
-@SuppressWarnings("serial")
-public class ShowBoundsListAction extends ShowBoundsAction implements ListSelectionListener {
-
-	@Override
-	public void valueChanged(ListSelectionEvent e) {
-		if (!e.getValueIsAdjusting()) {
-			JList list = (JList) e.getSource();
-			if (list.getModel().getSize() > list.getSelectionModel().getMaxSelectionIndex()) {
-				List<OsmPrimitive> primitives = new ArrayList<OsmPrimitive>();
-				for (Object value : list.getSelectedValues()) {
-					if (value instanceof OsmPrimitive) {
-						primitives.add((OsmPrimitive) value);
-					}
-				}
-				updateOsmPrimitives(primitives);
-			}
-		}
-	}
-}
Index: applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsPropertiesAction.java
===================================================================
--- applications/editors/josm/plugins/imagery-xml-bounds/src/org/openstreetmap/josm/plugins/imageryxmlbounds/actions/ShowBoundsPropertiesAction.java	(revision 29460)
+++ 	(revision )
@@ -1,38 +1,0 @@
-//    JOSM Imagery XML Bounds plugin.
-//    Copyright (C) 2011 Don-vip
-//
-//    This program is free software: you can redistribute it and/or modify
-//    it under the terms of the GNU General Public License as published by
-//    the Free Software Foundation, either version 3 of the License, or
-//    (at your option) any later version.
-//
-//    This program is distributed in the hope that it will be useful,
-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-//    GNU General Public License for more details.
-//
-//    You should have received a copy of the GNU General Public License
-//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-package org.openstreetmap.josm.plugins.imageryxmlbounds.actions;
-
-import java.util.Collections;
-
-import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.gui.dialogs.properties.PropertiesDialog.RelationRelated;
-
-@SuppressWarnings("serial")
-public class ShowBoundsPropertiesAction extends ShowBoundsAction implements RelationRelated {
-
-    protected Relation relation;
-    
-    @Override
-    public Relation getRelation() {
-        return relation;
-    }
-
-    @Override
-    public void setRelation(Relation relation) {
-        this.relation = relation;
-        updateOsmPrimitives(Collections.singleton(relation));
-    }
-}
Index: applications/editors/josm/plugins/tag2link/build.xml
===================================================================
--- applications/editors/josm/plugins/tag2link/build.xml	(revision 29460)
+++ applications/editors/josm/plugins/tag2link/build.xml	(revision 29461)
@@ -1,15 +1,3 @@
 ﻿<?xml version="1.0" encoding="utf-8"?>
-<!--
-** This is a template build file for a JOSM  plugin.
-**
-** Maintaining versions
-** ====================
-** See README.template
-**
-** Usage
-** =====
-** Call "ant help" to get possible build targets.
-**
--->
 <project name="tag2link" default="dist" basedir=".">
 
@@ -17,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4968"/>
+    <property name="plugin.main.version" value="5821"/>
 
     <property name="plugin.author" value="Don-vip &amp; FrViPofm"/>
Index: applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java
===================================================================
--- applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java	(revision 29460)
+++ applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java	(revision 29461)
@@ -74,19 +74,19 @@
         if (newFrame != null) {
             // Initialize dialogs listeners only after the main frame is created
-            newFrame.selectionListDialog.addPopupMenuListener(selectionPopupListener = new SelectionPopupListener(newFrame));
-            newFrame.propertiesDialog.addMembershipPopupMenuListener(membershipPopupListener = new MembershipPopupListener(newFrame));
-            newFrame.propertiesDialog.addPropertyPopupMenuListener(propertyPopupListener = new PropertyPopupListener(newFrame));
-            newFrame.relationListDialog.addPopupMenuListener(relationPopupListener = new RelationPopupListener(newFrame));
+            newFrame.selectionListDialog.getPopupMenuHandler().addListener(selectionPopupListener = new SelectionPopupListener(newFrame));
+            newFrame.propertiesDialog.getMembershipPopupMenuHandler().addListener(membershipPopupListener = new MembershipPopupListener(newFrame));
+            newFrame.propertiesDialog.getPropertyPopupMenuHandler().addListener(propertyPopupListener = new PropertyPopupListener(newFrame));
+            newFrame.relationListDialog.getPopupMenuHandler().addListener(relationPopupListener = new RelationPopupListener(newFrame));
         } else if (oldFrame != null) {
             // Remove listeners from previous frame to avoid memory leaks
             if (oldFrame.selectionListDialog != null) {
-                oldFrame.selectionListDialog.removePopupMenuListener(selectionPopupListener);
+                oldFrame.selectionListDialog.getPopupMenuHandler().removeListener(selectionPopupListener);
             }
             if (oldFrame.propertiesDialog != null) {
-                oldFrame.propertiesDialog.removeMembershipPopupMenuListener(membershipPopupListener);
-                oldFrame.propertiesDialog.removePropertyPopupMenuListener(propertyPopupListener);
+                oldFrame.propertiesDialog.getMembershipPopupMenuHandler().removeListener(membershipPopupListener);
+                oldFrame.propertiesDialog.getPropertyPopupMenuHandler().removeListener(propertyPopupListener);
             }
             if (oldFrame.relationListDialog != null) {
-                oldFrame.relationListDialog.removePopupMenuListener(relationPopupListener);
+                oldFrame.relationListDialog.getPopupMenuHandler().removeListener(relationPopupListener);
             }
             selectionPopupListener = null;
