public static string IsCurrentlySupported(ContextMenusClient client) { string errorMsg = null; TryCreateContextMenusIntegration(client, out errorMsg); return(errorMsg); }
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; }
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 }