Пример #1
0
        static OnLoad()
        {
            SetDefaultScriptEditor();
            EditorUtility.ClearProgressBar();
            UCE_FOLDER_IN_PROJECT = PathManager.GetUCEFolderInProject();

            EditorCoroutine.StartCoroutine(SyncSolution());

            Utility.Log(string.Format("OmniSharpManager.CheckIfOmnisharpNeedsUpgrade = {0}", OmniSharpManager.CheckIfOmnisharpNeedsUpgrade()));

            if (!OmniSharpManager.CheckInstallationExists())
            {
                OmniSharpManager.InstallOmnisharp();
            }
            else if (OmniSharpManager.CheckIfOmnisharpNeedsUpgrade())
            {
                OmniSharpManager.UpdateOmnisharp();
            }

            MONO_PATH         = MonoHelper.GetMonoLocation();
            STDIO_BRIDGE_PATH = GetStdioBridgePath();
            WORKING_DIRECTORY = Application.dataPath;
            PROCESS_ID        = Process.GetCurrentProcess().Id;
            OMNISHARP_LOCK    = PathManager.OmnisharpRestartLockFile();

            STDIO_THREAD = new Thread(new ThreadStart(LanuchOmniSharp));
            STDIO_THREAD.Start();

            EditorApplication.update += FileSearch.Update;
            Undo.undoRedoPerformed   += UndoRedoPerformed;
        }
Пример #2
0
        /// <summary>
        /// Get file path fo Omnisharp version file.
        /// </summary>
        /// <returns>Path of Omnisharp version file</returns>
        public static string GetOmnisharpVersionFilePath()
        {
            var folder = Utility.PathCombine(OmniSharpManager.GetGlobalInstallLocation(), "Versions");

            Directory.CreateDirectory(folder);
            return(Utility.PathCombine(folder, "omnisharp"));
        }
Пример #3
0
        /// <summary>
        /// Get override shortcut mapping config path
        /// </summary>
        public static string GetKeyMappingConfigPath()
        {
            string folder         = OmniSharpManager.GetGlobalInstallLocation();
            string configFilePath = Utility.PathCombine(folder, Constants.KEYBINDING_CONFIG_FILE);

            configFilePath = Path.GetFullPath(configFilePath);
            return(configFilePath);
        }
Пример #4
0
 private static string GetOmnisharpPath()
 {
     return(OmniSharpManager.GetInstalledOmnisharpPath());
 }
Пример #5
0
        /// <summary>
        /// Get code editor config file path
        /// </summary>
        public static string GetEditorConfigPath()
        {
            string folder = OmniSharpManager.GetGlobalInstallLocation();

            return(Path.GetFullPath(Path.Combine(folder, "settings.json")));
        }
Пример #6
0
        /// <summary>
        /// Get user snippets config file path of a language
        /// </summary>
        /// <param name="language">Language name, for example shaderlab and csharp.</param>
        /// <returns>Path of user snippets config file</returns>
        public static string GetUserSnippetsFilePath(string language)
        {
            var folder = OmniSharpManager.GetGlobalInstallLocation();

            return(Utility.PathCombine(folder, string.Format("{0}.json", language)));
        }