Ignore:
Timestamp:
2018-08-12T02:21:19+02:00 (6 years ago)
Author:
Don-vip
Message:

see #15229 - deprecate Main.platform and related methods - new class PlatformManager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/Main.java

    r14134 r14138  
    4141import org.openstreetmap.josm.tools.JosmRuntimeException;
    4242import org.openstreetmap.josm.tools.Logging;
    43 import org.openstreetmap.josm.tools.Platform;
    4443import org.openstreetmap.josm.tools.PlatformHook;
    45 import org.openstreetmap.josm.tools.PlatformHookOsx;
    46 import org.openstreetmap.josm.tools.PlatformHookWindows;
     44import org.openstreetmap.josm.tools.PlatformManager;
    4745import org.openstreetmap.josm.tools.Utils;
    4846import org.openstreetmap.josm.tools.bugreport.BugReport;
     
    8886     * So if you need to hook into those early ones, split your class and send the one with the early hooks
    8987     * to the JOSM team for inclusion.
    90      */
    91     public static volatile PlatformHook platform;
     88     * @deprecated Use {@link PlatformManager#getPlatform}
     89     */
     90    @Deprecated
     91    public static final PlatformHook platform = PlatformManager.getPlatform();
    9292
    9393    /**
     
    291291     * Identifies the current operating system family and initializes the platform hook accordingly.
    292292     * @since 1849
    293      */
     293     * @deprecated Not needed anymore
     294     */
     295    @Deprecated
    294296    public static void determinePlatformHook() {
    295         platform = Platform.determinePlatform().accept(PlatformHook.CONSTRUCT_FROM_PLATFORM);
     297        // Do nothing
    296298    }
    297299
     
    461463     * @return {@code true} if we are currently running on OSX
    462464     * @since 6957
    463      */
     465     * @deprecated Use {@link PlatformManager#isPlatformOsx}
     466     */
     467    @Deprecated
    464468    public static boolean isPlatformOsx() {
    465         return Main.platform instanceof PlatformHookOsx;
     469        return PlatformManager.isPlatformOsx();
    466470    }
    467471
     
    470474     * @return {@code true} if we are currently running on Windows
    471475     * @since 7335
    472      */
     476     * @deprecated Use {@link PlatformManager#isPlatformWindows}
     477     */
     478    @Deprecated
    473479    public static boolean isPlatformWindows() {
    474         return Main.platform instanceof PlatformHookWindows;
     480        return PlatformManager.isPlatformWindows();
    475481    }
    476482
Note: See TracChangeset for help on using the changeset viewer.