Index: applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java
===================================================================
--- applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 34396)
+++ applications/editors/josm/plugins/osmarender/src/org/openstreetmap/josm/plugins/osmarender/OsmarenderPlugin.java	(revision 34537)
@@ -30,7 +30,7 @@
 import javax.swing.JTextField;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -51,7 +51,8 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Logging;
-import org.openstreetmap.josm.tools.PlatformHookWindows;
+import org.openstreetmap.josm.tools.PlatformManager;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -84,5 +85,5 @@
             }
 
-            String firefox = Main.pref.get("osmarender.firefox", "firefox");
+            String firefox = Config.getPref().get("osmarender.firefox", "firefox");
             String pluginDir = getPluginDirs().getUserDataDirectory(false).getPath();
             try (OsmWriter w = OsmWriterFactory.createOsmWriter(new PrintWriter(new OutputStreamWriter(
@@ -129,5 +130,5 @@
                 // get the exec line
                 String argument;
-                if (Main.platform instanceof PlatformHookWindows)
+                if (PlatformManager.isPlatformWindows())
                     argument = "file:///"+pluginDir.replace('\\','/').replace(" ","%20")+File.separator+"generated.xml\"";
                 else
@@ -137,5 +138,5 @@
                 Runtime.getRuntime().exec(new String[]{firefox, argument});
             } catch (IOException e1) {
-                JOptionPane.showMessageDialog(Main.parent, 
+                JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 
                         tr("Firefox not found. Please set firefox executable in the Map Settings page of the preferences."));
             }
@@ -168,5 +169,5 @@
     @Deprecated
     public String _getPluginDir() {
-        return new File(Main.pref.getPluginsDirectory(), getPluginInformation().name).getPath();
+        return new File(Preferences.main().getPluginsDirectory(), getPluginInformation().name).getPath();
     }
 
@@ -222,5 +223,5 @@
             panel.add(firefox, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
             panel.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
-            firefox.setText(Main.pref.get("osmarender.firefox"));
+            firefox.setText(Config.getPref().get("osmarender.firefox"));
             gui.getMapPreference().getTabPane().addTab(tr("Osmarender"), panel);
         }
@@ -228,5 +229,5 @@
         @Override
         public boolean ok() {
-            Main.pref.put("osmarender.firefox", firefox.getText());
+            Config.getPref().put("osmarender.firefox", firefox.getText());
             return false;
         }
