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 14120)
+++ applications/editors/josm/plugins/openvisible/src/at/dallermassl/josm/plugin/openvisible/OpenVisibleAction.java	(revision 15707)
@@ -29,5 +29,7 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
+import org.openstreetmap.josm.io.GpxImporter;
 import org.openstreetmap.josm.io.GpxReader;
+import org.openstreetmap.josm.io.OsmImporter;
 import org.openstreetmap.josm.io.OsmReader;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -100,16 +102,16 @@
     private void openAsData(File file) throws SAXException, IOException, FileNotFoundException {
         String fn = file.getName();
-        if (ExtensionFileFilter.filters[ExtensionFileFilter.OSM].acceptName(fn)) {
+        if (new OsmImporter().acceptFile(file)) {
             DataSet dataSet = OsmReader.parseDataSet(new FileInputStream(file), null, Main.pleaseWaitDlg);
-            OsmDataLayer layer = new OsmDataLayer(dataSet, file.getName(), file);
+            OsmDataLayer layer = new OsmDataLayer(dataSet, fn, file);
             Main.main.addLayer(layer);
         }
         else
-            JOptionPane.showMessageDialog(Main.parent, fn+": "+tr("Unknown file extension: {0}", fn.substring(file.getName().lastIndexOf('.')+1)));
+            JOptionPane.showMessageDialog(Main.parent, fn+": "+tr("Unknown file extension: {0}", fn.substring(fn.lastIndexOf('.')+1)));
     }
 
     private void openFileAsGpx(File file) throws SAXException, IOException, FileNotFoundException {
         String fn = file.getName();
-        if (ExtensionFileFilter.filters[ExtensionFileFilter.GPX].acceptName(fn)) {
+        if (new GpxImporter().acceptFile(file)) {
             GpxReader r = null;
             if (file.getName().endsWith(".gpx.gz")) {
