From 1e8e30cf81114e8ffa726b21eeefdeeb799c9632 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Fri, 17 Feb 2012 16:29:58 +0100 Subject: [PATCH] AppCode: supported xcode version validation on lion (4.3), mountain lion (4.2) --- .../com/intellij/openapi/util/SystemInfo.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/platform/util/src/com/intellij/openapi/util/SystemInfo.java b/platform/util/src/com/intellij/openapi/util/SystemInfo.java index 86a50c9f74e7..b453b01c30b8 100644 --- a/platform/util/src/com/intellij/openapi/util/SystemInfo.java +++ b/platform/util/src/com/intellij/openapi/util/SystemInfo.java @@ -105,12 +105,23 @@ public class SystemInfo { */ public static final boolean isMacOSLion = isLion(); + /** + * Running under MacOS X version 10.8 or later; + * + * @since 11.1 + */ + public static final boolean isMacOSMountainLion = isMountainLion(); + /** * Operating system is supposed to have middle mouse button click occupied by paste action. * @since 6.0 */ public static boolean X11PasteEnabledSystem = isUnix && !isMac; + private static boolean isIntelMac() { + return isMac && "i386".equals(OS_ARCH); + } + private static boolean isTiger() { return isMac && !OS_VERSION.startsWith("10.0") && @@ -119,10 +130,6 @@ public class SystemInfo { !OS_VERSION.startsWith("10.3"); } - private static boolean isIntelMac() { - return isMac && "i386".equals(OS_ARCH); - } - private static boolean isLeopard() { return isMac && isTiger() && !OS_VERSION.startsWith("10.4"); } @@ -135,6 +142,10 @@ public class SystemInfo { return isMac && isSnowLeopard() && !OS_VERSION.startsWith("10.6"); } + private static boolean isMountainLion() { + return isMac && isLion() && !OS_VERSION.startsWith("10.7"); + } + @NotNull public static String getMacOSVersionCode() { return getMacOSVersionCode(OS_VERSION);