Index: applications/editors/josm/plugins/OsmInspectorPlugin/build.xml
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/build.xml	(revision 32309)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/build.xml	(revision 32450)
@@ -5,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="7001"/>
+    <property name="plugin.main.version" value="10279"/>
 
     <property name="plugin.author" value="Nikhil Shirahatti"/>
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/ImportOsmInspectorBugsAction.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/ImportOsmInspectorBugsAction.java	(revision 32309)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/ImportOsmInspectorBugsAction.java	(revision 32450)
@@ -6,11 +6,16 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.io.IOException;
+import java.util.NoSuchElementException;
 
 import javax.swing.ProgressMonitor;
 
+import org.opengis.referencing.FactoryException;
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.tools.Shortcut;
+
+import com.vividsolutions.jts.io.ParseException;
 
 public class ImportOsmInspectorBugsAction extends JosmAction {
@@ -49,5 +54,5 @@
 					wfs.initializeDataStore();
 					inspector = new OsmInspectorLayer(wfs, monitor);
-					Main.main.addLayer(inspector);
+					Main.getLayerManager().addLayer(inspector);
 					plugin.setLayer(inspector);
 				} else {
@@ -57,7 +62,6 @@
 
 				}
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
+			} catch (IOException | IndexOutOfBoundsException | NoSuchElementException | FactoryException | ParseException e) {
+				Main.error(e);
 			} finally {
 				monitor.close();
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java	(revision 32309)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java	(revision 32450)
@@ -13,11 +13,8 @@
 import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.NavigatableComponent;
 import org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener;
 import org.openstreetmap.josm.gui.download.DownloadDialog;
 import org.openstreetmap.josm.gui.download.DownloadSelection;
-import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -25,5 +22,5 @@
 
 public class OsmInspectorPlugin extends Plugin 
-implements LayerChangeListener, ZoomChangeListener, 
+implements ZoomChangeListener, 
 MouseListener, PreferenceChangedListener, DownloadSelection{
 
@@ -66,5 +63,4 @@
 		if (newFrame == null) {
             /* if new MapFrame is null, remove listener */
-            MapView.removeLayerChangeListener(this);
             NavigatableComponent.removeZoomChangeListener(this);
         } else {
@@ -76,5 +72,4 @@
                 /* add Listeners */
                 NavigatableComponent.addZoomChangeListener(this);
-                MapView.addLayerChangeListener(this);
                 Main.map.mapView.addMouseListener(this);
                 Main.pref.addPreferenceChangeListener(this);
@@ -85,19 +80,4 @@
             }
         }
-	}
-
-	@Override
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-		
-	}
-
-	@Override
-	public void layerAdded(Layer newLayer) {
-		
-	}
-
-	@Override
-	public void layerRemoved(Layer oldLayer) {
-		
 	}
 
@@ -152,20 +132,12 @@
 	}
 
-
-
-
 	@Override
 	public void addGui(DownloadDialog gui) {
 		// TODO Auto-generated method stub
-		
 	}
-
-
-
 
 	@Override
 	public void setDownloadArea(Bounds bounds) {
 		// TODO Auto-generated method stub
-		
 	}
 }
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorBugInfoDialog.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorBugInfoDialog.java	(revision 32309)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorBugInfoDialog.java	(revision 32450)
@@ -4,23 +4,16 @@
 
 import java.awt.event.KeyEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
 import java.util.Arrays;
 
 import javax.swing.JTextPane;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
-import org.openstreetmap.josm.gui.layer.Layer;
 import org.openstreetmap.josm.plugins.osminspector.OsmInspectorLayer;
 import org.openstreetmap.josm.plugins.osminspector.OsmInspectorLayer.BugInfo;
 import org.openstreetmap.josm.tools.Shortcut;
 
-public class OsmInspectorBugInfoDialog extends ToggleDialog implements
-		ListSelectionListener, LayerChangeListener, MouseListener {
+public class OsmInspectorBugInfoDialog extends ToggleDialog {
 
 	private JTextPane bugTextArea;
@@ -63,39 +56,3 @@
 		}
 	}
-
-	@Override
-	public void mouseClicked(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseEntered(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseExited(MouseEvent e) {
-	}
-
-	@Override
-	public void mousePressed(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseReleased(MouseEvent e) {
-	}
-
-	@Override
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-	}
-
-	@Override
-	public void layerAdded(Layer layer) {
-	}
-
-	@Override
-	public void layerRemoved(Layer arg0) {
-	}
-
-	@Override
-	public void valueChanged(ListSelectionEvent e) {
-	}
 }
Index: applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorDialog.java
===================================================================
--- applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorDialog.java	(revision 32309)
+++ applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorDialog.java	(revision 32450)
@@ -6,6 +6,4 @@
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
 import java.util.Arrays;
 
@@ -21,8 +19,13 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
 import org.openstreetmap.josm.plugins.osminspector.OsmInspectorLayer;
 import org.openstreetmap.josm.plugins.osminspector.OsmInspectorLayer.BugInfo;
@@ -32,6 +35,5 @@
 import com.vividsolutions.jts.geom.Point;
 
-public class OsmInspectorDialog extends ToggleDialog implements
-		ListSelectionListener, LayerChangeListener, MouseListener {
+public class OsmInspectorDialog extends ToggleDialog implements LayerChangeListener, ActiveLayerChangeListener {
 
 	private OsmInspectorLayer layer;
@@ -85,5 +87,4 @@
 		final SideButton nextButton = new SideButton(
 				actNext = new OsmInspectorNextAction(layer));
-		bugsList.getSelectionModel().addListSelectionListener(actNext);
 		nextButton.createArrow(new ActionListener() {
 			public void actionPerformed(ActionEvent e) {
@@ -160,6 +161,5 @@
 	}
 
-	public class OsmInspectorNextAction extends AbstractAction implements
-			ListSelectionListener {
+	public class OsmInspectorNextAction extends AbstractAction {
 
 		private OsmInspectorLayer inspectlayer;
@@ -182,8 +182,4 @@
 			updateSelection(next);
 		}
-
-		@Override
-		public void valueChanged(ListSelectionEvent arg0) {
-		}
 	}
 
@@ -195,6 +191,5 @@
 	}
 
-	private class OsmInspectorPrevAction extends AbstractAction implements
-			ListSelectionListener {
+	private class OsmInspectorPrevAction extends AbstractAction {
 
 		private OsmInspectorLayer inspectlayer;
@@ -217,32 +212,9 @@
 			updateSelection(prev);
 		}
-
-		@Override
-		public void valueChanged(ListSelectionEvent e) {
-		}
-	}
-
-	@Override
-	public void mouseClicked(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseEntered(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseExited(MouseEvent e) {
-	}
-
-	@Override
-	public void mousePressed(MouseEvent e) {
-	}
-
-	@Override
-	public void mouseReleased(MouseEvent e) {
-	}
-
-	@Override
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+	}
+
+	@Override
+	public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
+	    Layer newLayer = Main.getLayerManager().getActiveLayer();
 		if (newLayer instanceof OsmInspectorLayer) {
 			this.layer = (OsmInspectorLayer) newLayer;
@@ -258,5 +230,5 @@
 
 	@Override
-	public void layerAdded(Layer layer) {
+	public void layerAdded(LayerAddEvent e) {
 		if (layer instanceof OsmInspectorLayer) {
 			refreshModel();
@@ -266,5 +238,5 @@
 
 	@Override
-	public void layerRemoved(Layer arg0) {
+	public void layerRemoving(LayerRemoveEvent e) {
 		if (layer instanceof OsmInspectorLayer) {
 			bugsList.clearSelection();
@@ -273,7 +245,6 @@
 	}
 
-	@Override
-	public void valueChanged(ListSelectionEvent e) {
-		
-	}
+    @Override
+    public void layerOrderChanged(LayerOrderChangeEvent e) {
+    }
 }
