Index: /applications/editors/josm/plugins/waypoint_search/build.xml
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 33873)
+++ /applications/editors/josm/plugins/waypoint_search/build.xml	(revision 33874)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="bugfix of search when layer is added"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="10580"/>
+    <property name="plugin.main.version" value="12636"/>
 
     <property name="plugin.author" value="Åsmund Realfsen - realfsen at gmx.net"/>
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 33873)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/Engine.java	(revision 33874)
@@ -7,5 +7,5 @@
 import java.util.regex.Pattern;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.layer.markerlayer.Marker;
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
@@ -21,5 +21,5 @@
         if (gpxLayersExist()) {
             //Loop over marker (waypoint) layers.. it could be more than one
-            for (Iterator<MarkerLayer> it = Main.getLayerManager().getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
+            for (Iterator<MarkerLayer> it = MainApplication.getLayerManager().getLayersOfType(MarkerLayer.class).iterator(); it.hasNext();) {
                 //loop over each marker (waypoint)
                 for (Iterator<Marker> markerIterator = it.next().data.iterator(); markerIterator.hasNext();) {
@@ -35,5 +35,5 @@
 
     static boolean gpxLayersExist() {
-        return !Main.getLayerManager().getLayersOfType(MarkerLayer.class).isEmpty();
+        return !MainApplication.getLayerManager().getLayersOfType(MarkerLayer.class).isEmpty();
     }
 }
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 33873)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/SelectWaypointDialog.java	(revision 33874)
@@ -21,5 +21,5 @@
 import javax.swing.ListSelectionModel;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.dialogs.ToggleDialog;
 import org.openstreetmap.josm.gui.layer.markerlayer.Marker;
@@ -102,5 +102,5 @@
             if (idx >= 0) {
                 Marker marker = searchResultObjectCache.get(idx);
-                Main.map.mapView.zoomTo(marker.getCoor());
+                MainApplication.getMap().mapView.zoomTo(marker.getCoor());
             }
         }
Index: /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java
===================================================================
--- /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java	(revision 33873)
+++ /applications/editors/josm/plugins/waypoint_search/src/org/openstreetmap/josm/plugins/waypointSearch/WaypointSearchPlugin.java	(revision 33874)
@@ -4,5 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
@@ -15,5 +15,5 @@
 /**
  * This plugin enables a user to search for waypoint imported from a gpx file.
- * After the plugin is installed a new button is presented on the left side of the map window. 
+ * After the plugin is installed a new button is presented on the left side of the map window.
  * Pressing this buttons open the search dialog on the right side.
  * Click on one of the search results/waypoints to move the map.
@@ -21,20 +21,20 @@
 public class WaypointSearchPlugin extends Plugin implements LayerChangeListener {
     private SelectWaypointDialog waypointDialog;
-    
+
     /**
      * Will be invoked by JOSM to bootstrap the plugin
      *
-     * @param info  information about the plugin and its local installation    
+     * @param info  information about the plugin and its local installation
      */
     public WaypointSearchPlugin(PluginInformation info) {
         super(info);
-        Main.getLayerManager().addLayerChangeListener(this);
+        MainApplication.getLayerManager().addLayerChangeListener(this);
     }
-     
+
     @Override
     public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
         if (newFrame != null) {
             waypointDialog = new SelectWaypointDialog(
-                    tr("Waypoint search"), "ToolbarIcon", 
+                    tr("Waypoint search"), "ToolbarIcon",
                     tr("Search after waypoint. Click and move the map view to the waypoint."), null, 100);
             newFrame.addToggleDialog(waypointDialog);
@@ -48,5 +48,5 @@
         // Do nothing
     }
-    
+
     @Override
     public void layerAdded(LayerAddEvent e) {
@@ -61,5 +61,5 @@
         if (waypointDialog != null && !Engine.gpxLayersExist()) {
             waypointDialog.updateSearchResults();
-        }   
+        }
     }
 }
