Index: /applications/editors/josm/plugins/OsmInspectorPlugin/build.xml
===================================================================
--- /applications/editors/josm/plugins/OsmInspectorPlugin/build.xml	(revision 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/build.xml	(revision 33793)
@@ -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="10580"/>
+    <property name="plugin.main.version" value="12881"/>
 
     <property name="plugin.author" value="Nikhil Shirahatti"/>
Index: /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java
===================================================================
--- /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java	(revision 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/GeoFabrikWFSClient.java	(revision 33793)
@@ -24,7 +24,8 @@
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.tools.Logging;
 
 public class GeoFabrikWFSClient {
@@ -51,6 +52,6 @@
 		FeatureSource<SimpleFeatureType, SimpleFeature> source = data
 				.getFeatureSource(typeName);
-		Main.info("Source Metadata Bounds:" + source.getBounds());
-		Main.info("Source schema: " + source.getSchema());
+		Logging.info("Source Metadata Bounds:" + source.getBounds());
+		Logging.info("Source schema: " + source.getSchema());
 
 		progressMonitor.setProgress(40);
@@ -61,6 +62,6 @@
 		CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4236");
 
-		Bounds bounds = Main.map.mapView.getLatLonBounds(Main.map.mapView
-				.getBounds());
+		Bounds bounds = MainApplication.getMap().mapView.getLatLonBounds(
+		        MainApplication.getMap().mapView.getBounds());
 
 		LatLon minLL = bounds.getMin();
@@ -73,5 +74,5 @@
 		ReferencedEnvelope bboxRef = new ReferencedEnvelope(minLon, maxLon,
 				minLat, maxLat, targetCRS);
-		Main.info("Reference Bounds:" + bboxRef);
+		Logging.info("Reference Bounds:" + bboxRef);
 
 		progressMonitor.setProgress(50);
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 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/ImportOsmInspectorBugsAction.java	(revision 33793)
@@ -12,7 +12,9 @@
 
 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.gui.MainApplication;
+import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -38,12 +40,12 @@
 	public void actionPerformed(ActionEvent event) {
 		if (isEnabled()) {
-			ProgressMonitor monitor = new ProgressMonitor(Main.map.mapView,
+		    MapView mapView = MainApplication.getMap().mapView;
+			ProgressMonitor monitor = new ProgressMonitor(mapView,
 					"Querying WFS Geofabrik", "Dowloading features", 0, 100);
 
 			try {
-				Bounds bounds = Main.map.mapView
-						.getLatLonBounds(Main.map.mapView.getBounds());
+				Bounds bounds = mapView.getLatLonBounds(mapView.getBounds());
 
-				Main.info("OSMI View bounds" + bounds);
+				Logging.info("OSMI View bounds" + bounds);
 
 				monitor.setProgress(10);
@@ -54,5 +56,5 @@
 					wfs.initializeDataStore();
 					inspector = new OsmInspectorLayer(wfs, monitor);
-					Main.getLayerManager().addLayer(inspector);
+					MainApplication.getLayerManager().addLayer(inspector);
 					plugin.setLayer(inspector);
 				} else {
@@ -63,5 +65,5 @@
 				}
 			} catch (IOException | IndexOutOfBoundsException | NoSuchElementException | FactoryException | ParseException e) {
-				Main.error(e);
+				Logging.error(e);
 			} finally {
 				monitor.close();
@@ -71,5 +73,5 @@
 			}
 		} else {
-		    Main.warn("Osm Inspector Action not enabled");
+		    Logging.warn("Osm Inspector Action not enabled");
 		}
 	}
Index: /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java
===================================================================
--- /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java	(revision 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorLayer.java	(revision 33793)
@@ -151,5 +151,5 @@
 	 * 
 	 */
-	public class BugInfo implements Comparable<BugInfo>{
+	public static class BugInfo implements Comparable<BugInfo>{
 
 		public Geometry getGeom() {
@@ -255,5 +255,5 @@
 	 * 
 	 */
-	public class BugIndex {
+	public static class BugIndex {
 		private int nextIndex;
 		private int previousIndex;
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 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/OsmInspectorPlugin.java	(revision 33793)
@@ -9,7 +9,6 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.Preferences.PreferenceChangeEvent;
-import org.openstreetmap.josm.data.Preferences.PreferenceChangedListener;
-import org.openstreetmap.josm.gui.JosmUserIdentityManager;
+import org.openstreetmap.josm.data.UserIdentityManager;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.NavigatableComponent;
@@ -19,4 +18,6 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.spi.preferences.PreferenceChangeEvent;
+import org.openstreetmap.josm.spi.preferences.PreferenceChangedListener;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -26,5 +27,5 @@
 
 	/** The JOSM user identity manager, it is used for obtaining the user name */
-    private final JosmUserIdentityManager userIdentityManager;
+    private final UserIdentityManager userIdentityManager;
    
 
@@ -36,5 +37,5 @@
 	public OsmInspectorPlugin(PluginInformation info) {
 		super(info);
-		userIdentityManager = JosmUserIdentityManager.getInstance();
+		userIdentityManager = UserIdentityManager.getInstance();
 		initializePlugin();
 	}
@@ -53,5 +54,5 @@
         /* add default values for static variables */
         Main.pref.put("osmInspector.nickname", "osmi");
-        Main.pref.put("osmInspector.showBugs", true);
+        Main.pref.putBoolean("osmInspector.showBugs", true);
         Main.pref.put("osmInspector.version", getPluginInformation().version);
         Main.pref.put("osmInspector.localVersion",getPluginInformation().localversion);
@@ -60,5 +61,5 @@
 	@Override
 	public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
-		Main.toolbar.register( new ImportOsmInspectorBugsAction( this ) );
+		MainApplication.getToolbar().register( new ImportOsmInspectorBugsAction( this ) );
 		if (newFrame == null) {
             /* if new MapFrame is null, remove listener */
@@ -66,16 +67,16 @@
         } else {
             /* add MapDust dialog window */
-            if (Main.map != null && Main.map.mapView != null) {
+            if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
                 /* add MapdustGUI */
-                Main.map.setBounds(newFrame.getBounds());
+                MainApplication.getMap().setBounds(newFrame.getBounds());
                 
                 /* add Listeners */
                 NavigatableComponent.addZoomChangeListener(this);
-                Main.map.mapView.addMouseListener(this);
+                MainApplication.getMap().mapView.addMouseListener(this);
                 Main.pref.addPreferenceChangeListener(this);
                 /* put username to preferences */
                 Main.pref.put("osmInspector.josmUserName",
                         userIdentityManager.getUserName());
-                Main.toolbar.control.add( new ImportOsmInspectorBugsAction( this ) );
+                MainApplication.getToolbar().control.add( new ImportOsmInspectorBugsAction( this ) );
             }
         }
@@ -91,27 +92,27 @@
 	//  Delegate feature selection to layer
 	//
-	public void mouseClicked(MouseEvent arg0) {
+	public void mouseClicked(MouseEvent e) {
 	    if (inspectorLayer != null) {
-	        inspectorLayer.selectFeatures(arg0.getX(), arg0.getY());
+	        inspectorLayer.selectFeatures(e.getX(), e.getY());
 	    }
 	}
 
 	@Override
-	public void mouseEntered(MouseEvent arg0) {
+	public void mouseEntered(MouseEvent e) {
 		
 	}
 
 	@Override
-	public void mouseExited(MouseEvent arg0) {
+	public void mouseExited(MouseEvent e) {
 		
 	}
 
 	@Override
-	public void mousePressed(MouseEvent arg0) {
+	public void mousePressed(MouseEvent e) {
 		
 	}
 
 	@Override
-	public void mouseReleased(MouseEvent arg0) {
+	public void mouseReleased(MouseEvent e) {
 		
 	}
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 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorBugInfoDialog.java	(revision 33793)
@@ -8,5 +8,5 @@
 import javax.swing.JTextPane;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
@@ -23,5 +23,5 @@
 	 */
 	protected void buildContentPanel() {
-		Main.map.addToggleDialog(this, true);
+		MainApplication.getMap().addToggleDialog(this, true);
 		
 		bugTextArea = new JTextPane();
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 33792)
+++ /applications/editors/josm/plugins/OsmInspectorPlugin/src/org/openstreetmap/josm/plugins/osminspector/gui/OsmInspectorDialog.java	(revision 33793)
@@ -17,6 +17,6 @@
 import javax.swing.event.ListSelectionListener;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.SideButton;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
@@ -54,5 +54,5 @@
 	 */
 	protected void buildContentPanel() {
-		Main.map.addToggleDialog(this, true);
+		MainApplication.getMap().addToggleDialog(this, true);
 
 		model = new DefaultListModel<>();
@@ -77,5 +77,5 @@
 				Point centroid = geom.getCentroid();
 				LatLon center = new LatLon(centroid.getY(), centroid.getX());
-				Main.map.mapView.zoomTo(center);
+				MainApplication.getMap().mapView.zoomTo(center);
 				layer.selectFeatures(center);
 				bugInfoDialog.setBugDescription(next);
@@ -88,4 +88,5 @@
 				actNext = new OsmInspectorNextAction(layer));
 		nextButton.createArrow(new ActionListener() {
+		    @Override
 			public void actionPerformed(ActionEvent e) {
 				int index = bugsList.getSelectedIndex();
@@ -93,5 +94,5 @@
 				Point centroid = geom.getCentroid();
 				LatLon center = new LatLon(centroid.getY(), centroid.getX());
-				Main.map.mapView.zoomTo(center);
+				MainApplication.getMap().mapView.zoomTo(center);
 				layer.selectFeatures(center);
 			}
@@ -102,4 +103,5 @@
 				actPrev = new OsmInspectorPrevAction(layer));
 		prevButton.createArrow(new ActionListener() {
+            @Override
 			public void actionPerformed(ActionEvent e) {
 			}
@@ -112,9 +114,9 @@
 		Shortcut sprev = Shortcut.registerShortcut("osmi:prev", tr("Prev OSMI bug"),
 				KeyEvent.VK_J, Shortcut.CTRL_SHIFT);
-		Main.registerActionShortcut(actPrev, sprev);
+		MainApplication.registerActionShortcut(actPrev, sprev);
 
 		Shortcut snext = Shortcut.registerShortcut("osmi:next", tr("Next OSMI bug"),
 				KeyEvent.VK_K, Shortcut.CTRL_SHIFT);
-		Main.registerActionShortcut(actNext, snext);
+		MainApplication.registerActionShortcut(actNext, snext);
 	}
 
@@ -177,5 +179,5 @@
 			Point centroid = geom.getCentroid();
 			LatLon center = new LatLon(centroid.getY(), centroid.getX());
-			Main.map.mapView.zoomTo(center);
+			MainApplication.getMap().mapView.zoomTo(center);
 			inspectlayer.selectFeatures(center);
 			bugInfoDialog.setBugDescription(next);
@@ -207,5 +209,5 @@
 			Point centroid = geom.getCentroid();
 			LatLon center = new LatLon(centroid.getY(), centroid.getX());
-			Main.map.mapView.zoomTo(center);
+			MainApplication.getMap().mapView.zoomTo(center);
 			inspectlayer.selectFeatures(center);
 			bugInfoDialog.setBugDescription(prev);
@@ -216,5 +218,5 @@
 	@Override
 	public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
-	    Layer newLayer = Main.getLayerManager().getActiveLayer();
+	    Layer newLayer = MainApplication.getLayerManager().getActiveLayer();
 		if (newLayer instanceof OsmInspectorLayer) {
 			this.layer = (OsmInspectorLayer) newLayer;
