示例#1
0
        public static string IsCurrentlySupported(ContextMenusClient client)
        {
            string errorMsg = null;

            TryCreateContextMenusIntegration(client, out errorMsg);

            return(errorMsg);
        }
示例#2
0
        internal static void SetupContextType(ContextMenusClient client)
        {
            string errorMsg;

            m_Integration = TryCreateContextMenusIntegration(client, out errorMsg);

            if (!string.IsNullOrEmpty(errorMsg))
            {
                UnityEngine.Debug.LogError($"WiseSVN: Unsupported context menus client: {client}. Reason: {errorMsg}");
            }

            WiseSVNIntegration.ShowChangesUI -= CheckChangesAll;
            WiseSVNIntegration.ShowChangesUI += CheckChangesAll;
        }
示例#3
0
        private static SVNContextMenusBase TryCreateContextMenusIntegration(ContextMenusClient client, out string errorMsg)
        {
            if (client == ContextMenusClient.None)
            {
                errorMsg = string.Empty;
                return(null);
            }

#if UNITY_EDITOR_WIN
            switch (client)
            {
            case ContextMenusClient.TortoiseSVN:
                errorMsg = string.Empty;
                return(new TortoiseSVNContextMenus());

            case ContextMenusClient.SnailSVN:
                errorMsg = "SnailSVN is not supported on windows.";
                return(null);

            default:
                throw new NotImplementedException(client + " not implemented yet for this platform.");
            }
#else
            switch (client)
            {
            case ContextMenusClient.TortoiseSVN:
                errorMsg = "TortoiseSVN is not supported on MacOS";
                return(null);

            case ContextMenusClient.SnailSVN:
                errorMsg = string.Empty;
                return(new SnailSVNContextMenus());

            default:
                throw new NotImplementedException(client + " not implemented yet for this platform.");
            }
#endif
        }