Index: trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java
===================================================================
--- trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 14134)
+++ trunk/test/functional/org/openstreetmap/josm/gui/mappaint/StyleCacheTest.java	(revision 14138)
@@ -52,5 +52,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().mapStyles().timeout(60000);
+    public JOSMTestRules test = new JOSMTestRules().preferences().projection().mapStyles().timeout(60000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 14138)
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.tools.JosmRuntimeException;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.PlatformManager;
 import org.openstreetmap.josm.tools.date.DateUtils;
 
@@ -108,7 +109,6 @@
         I18n.init();
         // initialize the plaform hook, and
-        Main.determinePlatformHook();
         // call the really early hook before we anything else
-        Main.platform.preStartupHook();
+        PlatformManager.getPlatform().preStartupHook();
 
         Logging.setLogLevel(Logging.LEVEL_INFO);
Index: trunk/test/unit/org/openstreetmap/josm/MainTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/MainTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/MainTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().https().devAPI().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/AddImageryLayerActionTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().fakeAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CopyActionTest.java	(revision 14138)
@@ -47,5 +47,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().fakeAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 14138)
@@ -38,5 +38,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/DeleteLayerActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/DeleteLayerActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/DeleteLayerActionTest.java	(revision 14138)
@@ -24,5 +24,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/ExitActionTest.java	(revision 14138)
@@ -29,5 +29,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/ExpertToggleActionTest.java	(revision 14138)
@@ -27,5 +27,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/FullscreenToggleActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/FullscreenToggleActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/FullscreenToggleActionTest.java	(revision 14138)
@@ -17,5 +17,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/JoinAreasActionTest.java	(revision 14138)
@@ -49,5 +49,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/MergeLayerActionTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     private MergeLayerAction action;
Index: trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/MergeNodesActionTest.java	(revision 14138)
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/PurgeActionTest.java	(revision 14138)
@@ -32,5 +32,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveAsActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveAsActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/SessionSaveAsActionTest.java	(revision 14138)
@@ -20,5 +20,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/UnJoinNodeWayActionTest.java	(revision 14138)
@@ -42,5 +42,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/AddNoteActionTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DeleteActionTest.java	(revision 14138)
@@ -27,5 +27,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/DrawActionTest.java	(revision 14138)
@@ -40,5 +40,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection().timeout(20000);
+    public JOSMTestRules test = new JOSMTestRules().main().projection().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ExtrudeActionTest.java	(revision 14138)
@@ -27,5 +27,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyActionTest.java	(revision 14138)
@@ -27,5 +27,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/ParallelWayActionTest.java	(revision 14138)
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/PlayHeadDragModeTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().platform().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 14138)
@@ -60,5 +60,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/actions/upload/ValidateUploadHookTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().fakeAPI().timeout(30000);
+    public JOSMTestRules test = new JOSMTestRules().fakeAPI().timeout(30000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/ConflictAddCommandTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
     private CommandTestData testData;
 
Index: trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/command/conflict/CoordinateConflictResolveCommandTest.java	(revision 14138)
@@ -37,5 +37,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/PreferencesTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().preferences().fakeAPI();
+    public JOSMTestRules test = new JOSMTestRules().preferences().fakeAPI();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMSEndpointTileSourceTest.java	(revision 14138)
@@ -30,5 +30,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().projection();
 
     @Rule
Index: trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/imagery/WMTSTileSourceTest.java	(revision 14138)
@@ -47,5 +47,5 @@
     @ClassRule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public static JOSMTestRules test = new JOSMTestRules().preferences().platform().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));
+    public static JOSMTestRules test = new JOSMTestRules().preferences().projection().timeout((int) TimeUnit.MINUTES.toMillis(5));
 
     @Rule
Index: trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/osm/DefaultNameFormatterTest.java	(revision 14138)
@@ -38,5 +38,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java	(revision 14138)
@@ -35,5 +35,4 @@
 import org.junit.Rule;
 import org.junit.Test;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
@@ -42,4 +41,5 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.Pair;
+import org.openstreetmap.josm.tools.PlatformManager;
 import org.openstreetmap.josm.tools.Utils;
 
@@ -90,5 +90,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projectionNadGrids().timeout(90_000);
+    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().timeout(90_000);
 
     /**
@@ -104,5 +104,4 @@
             }
         }
-        Main.determinePlatformHook();
         Collection<RefEntry> refs = readData();
         refs = updateData(refs);
@@ -286,5 +285,5 @@
         // see http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/notice/NT111_V1_HARMEL_TransfoNTF-RGF93_FormatGrilleNTV2.pdf
         def = def.replace("ntf_r93_b.gsb", "ntf_r93.gsb");
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             def = def.replace("'", "\\'").replace("\"", "\\\"");
         }
Index: trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/projection/SwissGridTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids().platform();
+    public JOSMTestRules test = new JOSMTestRules().projectionNadGrids();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/OsmValidatorTest.java	(revision 14138)
@@ -19,5 +19,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java	(revision 14138)
@@ -52,5 +52,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().projection().platform();
+    public JOSMTestRules test = new JOSMTestRules().projection();
 
     static MapCSSTagChecker buildTagChecker(String css) throws ParseException {
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/MultipolygonTestTest.java	(revision 14138)
@@ -35,5 +35,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main().platform();
+    public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main();
 
     private static Way createUnclosedWay(String tags) {
Index: trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 14138)
@@ -28,5 +28,4 @@
 import org.junit.Rule;
 import org.junit.Test;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.actions.AboutAction;
@@ -44,4 +43,5 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.Logging;
+import org.openstreetmap.josm.tools.PlatformManager;
 import org.openstreetmap.josm.tools.Shortcut;
 
@@ -196,5 +196,6 @@
     public void testSetupUIManager() {
         MainApplication.setupUIManager();
-        assertEquals(Config.getPref().get("laf", Main.platform.getDefaultStyle()), UIManager.getLookAndFeel().getClass().getCanonicalName());
+        assertEquals(Config.getPref().get("laf", PlatformManager.getPlatform().getDefaultStyle()),
+                UIManager.getLookAndFeel().getClass().getCanonicalName());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MapScalerTest.java	(revision 14138)
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/NavigatableComponentTest.java	(revision 14138)
@@ -56,5 +56,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 14138)
@@ -53,5 +53,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandlerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/datatransfer/OsmTransferHandlerTest.java	(revision 14138)
@@ -29,5 +29,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().projection().main().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences().projection().main();
 
     private final OsmTransferHandler transferHandler = new OsmTransferHandler();
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/CommandStackDialogTest.java	(revision 14138)
@@ -28,5 +28,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/ConflictDialogTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialogTest.java	(revision 14138)
@@ -31,5 +31,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection().mapStyles();
+    public JOSMTestRules test = new JOSMTestRules().main().projection().mapStyles();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MinimapDialogTest.java	(revision 14138)
@@ -58,5 +58,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules josmTestRules = new JOSMTestRules().main().platform().projection().fakeImagery();
+    public JOSMTestRules josmTestRules = new JOSMTestRules().main().projection().fakeImagery();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheManagerTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/layer/LayerVisibilityActionTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().projection().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().preferences().projection().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditorTest.java	(revision 14138)
@@ -34,5 +34,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().preferences().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/relation/actions/AbstractRelationEditorActionTest.java	(revision 14138)
@@ -38,5 +38,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().preferences().main();
 
     protected OsmDataLayer layer;
Index: trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().https();
+    public JOSMTestRules test = new JOSMTestRules().preferences().https();
 
     static IHelpBrowser newHelpBrowser() {
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayerTest.java	(revision 14138)
@@ -46,5 +46,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     private static final class TMSTileStubSource extends AbstractTMSTileSource {
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java	(revision 14138)
@@ -41,5 +41,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().preferences().projection();
 
     private AutosaveTask task;
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/GpxLayerTest.java	(revision 14138)
@@ -41,5 +41,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection().i18n();
+    public JOSMTestRules test = new JOSMTestRules().main().projection().i18n();
 
     private static String getHtml(GpxLayer layer) {
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java	(revision 14138)
@@ -49,5 +49,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     private DataSet ds;
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/TMSLayerTest.java	(revision 14138)
@@ -23,5 +23,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/ValidatorLayerTest.java	(revision 14138)
@@ -25,5 +25,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/WMSLayerTest.java	(revision 14138)
@@ -23,5 +23,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/ChooseTrackVisibilityActionTest.java	(revision 14138)
@@ -19,5 +19,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadAlongTrackActionTest.java	(revision 14138)
@@ -32,5 +32,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     private static PleaseWaitRunnable createTask(String file) throws Exception {
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/gpx/DownloadWmsAlongTrackActionTest.java	(revision 14138)
@@ -30,5 +30,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection().fakeImagery().timeout(20000);
+    public JOSMTestRules test = new JOSMTestRules().main().projection().fakeImagery().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayerTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().main().platform().preferences().projection();
+    public JOSMTestRules test = new JOSMTestRules().main().preferences().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/AddWMSLayerPanelTest.java	(revision 14138)
@@ -20,5 +20,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().preferences();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreferenceTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main();
+    public JOSMTestRules test = new JOSMTestRules().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceHighLevelTest.java	(revision 14138)
@@ -52,5 +52,5 @@
     public JOSMTestRules test = new JOSMTestRules().assumeRevision(
         "Revision: 10000\n"
-    ).preferences().main().assertionsInEDT().platform();
+    ).preferences().main().assertionsInEDT();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/plugin/PluginPreferenceTest.java	(revision 14138)
@@ -34,5 +34,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences().assertionsInEDT();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/AuthenticationPreferenceTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/OverpassServerPreferenceTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ProxyPreferenceTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/preferences/server/ServerAccessPreferenceTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java	(revision 14138)
@@ -33,5 +33,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTestIT.java	(revision 14138)
@@ -25,5 +25,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().https().timeout(20000);
+    public JOSMTestRules test = new JOSMTestRules().https().timeout(20000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/io/NetworkManagerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/NetworkManagerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/NetworkManagerTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().https().devAPI().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/imagery/WMSImageryTest.java	(revision 14138)
@@ -32,5 +32,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().projection();
 
     @Rule
Index: trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImageryHandlerTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     private static ImageryHandler newHandler(String url) throws RequestHandlerBadRequestException {
Index: trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java	(revision 14138)
@@ -37,5 +37,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection();
+    public JOSMTestRules test = new JOSMTestRules().projection();
 
     private static String getSessionDataDir() {
Index: trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java	(revision 14138)
@@ -89,5 +89,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().projection().main();
+    public JOSMTestRules test = new JOSMTestRules().projection().main();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 14138)
@@ -34,5 +34,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform();
+    public JOSMTestRules test = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java	(revision 14138)
@@ -42,5 +42,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().main().projection().preferences().timeout(10*60*1000);
+    public JOSMTestRules test = new JOSMTestRules().main().projection().preferences().timeout(10*60*1000);
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/spi/lifecycle/LifecycleTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().platform().https().devAPI().main().projection();
+    public JOSMTestRules test = new JOSMTestRules().https().devAPI().main().projection();
 
     private static class InitStatusListenerStub implements InitStatusListener {
Index: trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/testutils/JOSMTestRules.java	(revision 14138)
@@ -79,5 +79,4 @@
     private Runnable navigableComponentMockingRunnable;
     private Runnable edtAssertionMockingRunnable;
-    private boolean platform;
     private boolean useProjection;
     private boolean useProjectionNadGrids;
@@ -150,7 +149,8 @@
      * Enable {@link Main#platform} global variable.
      * @return this instance, for easy chaining
-     */
+     * @deprecated Not needed anymore
+     */
+    @Deprecated
     public JOSMTestRules platform() {
-        platform = true;
         return this;
     }
@@ -209,5 +209,4 @@
     public JOSMTestRules https() {
         useHttps = true;
-        platform = true;
         return this;
     }
@@ -457,9 +456,4 @@
             // We force the use of a wrong API server, just in case anyone attempts an upload
             Config.getPref().put("osm-server.url", "http://invalid");
-        }
-
-        // Set Platform
-        if (platform) {
-            Main.determinePlatformHook();
         }
 
@@ -550,5 +544,4 @@
         cleanLayerEnvironment();
         Main.pref.resetToInitialState();
-        Main.platform = null;
         System.gc();
     }
@@ -592,5 +585,4 @@
         ProjectionRegistry.clearProjectionChangeListeners();
         Main.pref.resetToInitialState();
-        Main.platform = null;
 
         if (this.assumeRevisionString != null && this.originalVersion != null) {
Index: trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/KeyboardUtilsTest.java	(revision 14138)
@@ -26,5 +26,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules().platform();
+    public JOSMTestRules rules = new JOSMTestRules();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookOsxTest.java	(revision 14138)
@@ -14,5 +14,4 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.spi.preferences.Config;
 
@@ -64,5 +63,5 @@
     @Test
     public void testOpenUrl() throws IOException {
-        if (!Main.isPlatformWindows()) {
+        if (!PlatformManager.isPlatformWindows()) {
             hook.openUrl(Config.getUrls().getJOSMWebsite());
         } else {
@@ -83,5 +82,5 @@
         File cache = hook.getDefaultCacheDirectory();
         assertNotNull(cache);
-        if (Main.isPlatformOsx()) {
+        if (PlatformManager.isPlatformOsx()) {
             assertTrue(cache.toString().contains("/Library/"));
         }
@@ -95,5 +94,5 @@
         File cache = hook.getDefaultPrefDirectory();
         assertNotNull(cache);
-        if (Main.isPlatformOsx()) {
+        if (PlatformManager.isPlatformOsx()) {
             assertTrue(cache.toString().contains("/Library/"));
         }
@@ -114,5 +113,5 @@
     public void testGetOSDescription() {
         String os = hook.getOSDescription();
-        if (Main.isPlatformOsx()) {
+        if (PlatformManager.isPlatformOsx()) {
             assertTrue(os.contains("Mac"));
         } else {
Index: trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java	(revision 14138)
@@ -19,5 +19,4 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.remotecontrol.RemoteControlHttpsServer;
 import org.openstreetmap.josm.io.remotecontrol.RemoteControlTest;
@@ -54,5 +53,5 @@
     @Test
     public void testGetRootKeystore() throws Exception {
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             assertNotNull(PlatformHookWindows.getRootKeystore());
         } else {
@@ -72,5 +71,5 @@
     @Test
     public void testRemoveInsecureCertificates() throws Exception {
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             PlatformHookWindows.removeInsecureCertificates();
         } else {
@@ -93,5 +92,5 @@
         KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore();
         TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement()));
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             hook.setupHttpsCertificate(RemoteControlHttpsServer.ENTRY_ALIAS, trustedCert);
         } else {
@@ -119,5 +118,5 @@
     @Test
     public void testOpenUrl() throws IOException {
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             hook.openUrl(Config.getUrls().getJOSMWebsite());
         } else {
@@ -146,5 +145,5 @@
         File cache = hook.getDefaultCacheDirectory();
         assertNotNull(cache);
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             assertTrue(cache.toString().contains(":"));
         }
@@ -158,5 +157,5 @@
         File cache = hook.getDefaultPrefDirectory();
         assertNotNull(cache);
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             assertTrue(cache.toString().contains(":"));
         }
@@ -177,5 +176,5 @@
     public void testGetInstalledFonts() {
         Collection<String> fonts = hook.getInstalledFonts();
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             assertFalse(fonts.isEmpty());
         } else {
@@ -190,5 +189,5 @@
     public void testGetOSDescription() {
         String os = hook.getOSDescription();
-        if (Main.isPlatformWindows()) {
+        if (PlatformManager.isPlatformWindows()) {
             assertTrue(os.contains("Windows"));
         } else {
Index: trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/RightAndLefthandTrafficTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules().platform().projection().rlTraffic();
+    public JOSMTestRules rules = new JOSMTestRules().projection().rlTraffic();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/TerritoriesTest.java	(revision 14138)
@@ -21,5 +21,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules rules = new JOSMTestRules().platform().projection().territories();
+    public JOSMTestRules rules = new JOSMTestRules().projection().territories();
 
     /**
Index: trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 14134)
+++ trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportTest.java	(revision 14138)
@@ -27,5 +27,5 @@
     @Rule
     @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
-    public JOSMTestRules test = new JOSMTestRules().preferences().platform();
+    public JOSMTestRules test = new JOSMTestRules().preferences();
 
     /**
