Index: applications/editors/josm/plugins/openvisible/build.xml
===================================================================
--- applications/editors/josm/plugins/openvisible/build.xml	(revision 34535)
+++ applications/editors/josm/plugins/openvisible/build.xml	(revision 34536)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class; updated build.xml"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12671"/>
+    <property name="plugin.main.version" value="14153"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java
===================================================================
--- applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java	(revision 34535)
+++ applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java	(revision 34536)
@@ -19,5 +19,4 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -34,8 +33,7 @@
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.OsmReader;
+import org.openstreetmap.josm.tools.Logging;
 import org.openstreetmap.josm.tools.Shortcut;
 import org.xml.sax.SAXException;
-
-import at.dallermassl.josm.plugin.openvisible.OsmGpxBounds;
 
 /**
@@ -57,7 +55,7 @@
      */
     @Override
-    public void actionPerformed(ActionEvent e) {
+    public void actionPerformed(ActionEvent event) {
         if(!MainApplication.isDisplayingMapView()) {
-            JOptionPane.showMessageDialog(Main.parent, tr("No view open - cannot determine boundaries!"));
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("No view open - cannot determine boundaries!"));
             return;
         }
@@ -76,5 +74,5 @@
         }
         fileChooser.setMultiSelectionEnabled(true);
-        fileChooser.showOpenDialog(Main.parent);
+        fileChooser.showOpenDialog(MainApplication.getMainFrame());
         File[] files = fileChooser.getSelectedFiles();
         lastDirectory = fileChooser.getCurrentDirectory();
@@ -93,15 +91,8 @@
 
                 }
-            } catch (FileNotFoundException e1) {
-                e1.printStackTrace();
-            } catch (IOException e1) {
-                e1.printStackTrace();
-            } catch (SAXException e1) {
-                e1.printStackTrace();
-            } catch(IllegalDataException e1) {
-                e1.printStackTrace();
+            } catch (IOException | SAXException | IllegalDataException e) {
+                Logging.error(e);
             }
         }
-
     }
 
@@ -114,5 +105,5 @@
         }
         else
-            JOptionPane.showMessageDialog(Main.parent, fn+": "+tr("Unknown file extension: {0}", fn.substring(fn.lastIndexOf('.')+1)));
+            JOptionPane.showMessageDialog(MainApplication.getMainFrame(), fn+": "+tr("Unknown file extension: {0}", fn.substring(fn.lastIndexOf('.')+1)));
     }
 
@@ -128,5 +119,5 @@
             if (!r.parse(true)) {
                 // input was not properly parsed, abort
-                JOptionPane.showMessageDialog(Main.parent, tr("Parsing file \"{0}\" failed", file));
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Parsing file \"{0}\" failed", file));
                 throw new IllegalStateException();
             }
Index: applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OsmGpxBounds.java
===================================================================
--- applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OsmGpxBounds.java	(revision 34535)
+++ applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OsmGpxBounds.java	(revision 34536)
@@ -4,8 +4,4 @@
 package at.dallermassl.josm.plugin.openvisible;
 
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
@@ -75,47 +71,3 @@
         return ((lat2-lat1) > 0) && ((lon2-lon1) > 0);
     }
-
-    public static void main(String[] args) {
-        if(args.length < 5) {
-            printHelp();
-            return;
-        }
-        double minLat = Double.parseDouble(args[0]);
-        double maxLat = Double.parseDouble(args[1]);
-        double minLon = Double.parseDouble(args[2]);
-        double maxLon = Double.parseDouble(args[3]);
-        String[] files = new String[args.length - 4];
-        System.arraycopy(args, 4, files, 0, args.length - 4);
-
-        try {
-            File file;
-            for(String fileName : files) {
-                file = new File(fileName);
-                if(!file.isDirectory()
-                  && (file.getName().endsWith("gpx") || file.getName().endsWith("osm"))) {
-                    OsmGpxBounds parser = new OsmGpxBounds();
-                    parser.parse(new BufferedInputStream(new FileInputStream(file)));
-                    if(parser.intersects(minLat, maxLat, minLon, maxLon)) {
-                        System.out.println(file.getAbsolutePath()); // + "," + parser.minLat + "," + parser.maxLat + "," + parser.minLon + "," + parser.maxLon);
-                    }
-//                    System.out.println(parser.intersects(47.0555, 47.09, 15.406, 15.4737));
-                }
-            }
-        } catch (FileNotFoundException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        } catch (SAXException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     *
-     */
-    private static void printHelp() {
-        System.out.println(OsmGpxBounds.class.getName() + " <minLat> <maxLat> <minLon> <maxLon> <files+>");
-
-    }
-
 }
