public static void OpenIntellisenseDefinitionFileInTextEditor() { var configJson = ConfigJson.Load(); var file = Path.Combine(ConfigJson.GetExtensionPath(), configJson.GetIntellisenseDefinitionFileName()); TextHighlighterConfigApi.OpenFileInVS(file); }
private void LoadColorDefinitions() { var fullColorDefinitionFileName = Path.Combine(ConfigJson.GetExtensionPath(), this.GetColorDefinitionFileName()); Log("Loading color definition {0}".format(fullColorDefinitionFileName)); this._colorDefinition = new TextHighlighterColorDefinition.ColorDefinition(fullColorDefinitionFileName); }
public static string GetColorDefinitionFileName() { var configJson = ConfigJson.Load(); var file = Path.Combine(ConfigJson.GetExtensionPath(), configJson.GetColorDefinitionFileName()); return(file); }
public static void OpenExtensionFolder() { Executor.Executor.Execute("explorer.exe", @"""{0}""".format(ConfigJson.GetExtensionPath())); }
public static List <string> GetAvailableThemes() { return(TextHighlighterColorDefinition.ColorDefinition.GetAvailableThemes(ConfigJson.GetExtensionPath())); }
/// <summary> /// Return a full path for any file in the extension /// </summary> /// <param name="f"></param> /// <returns></returns> private string GetAbsoluteFile(string f) { return(@"{0}\{1}".format(ConfigJson.GetExtensionPath(), f)); }
private static string GetLogFileName() { return(Path.Combine(ConfigJson.GetExtensionPath(), "log.log")); }
/// <summary> /// Load the color definition and take care of the first execution /// </summary> public void Load() { TextHighlighterColorDefinition.ColorDefinition.ExtractDefaultColorDefinitionJsonFile(ConfigJson.GetExtensionPath()); if (this.IsFirstExecution()) { Log("First execution"); // Create the Config.json file var configJson = new TextHighlighterExtension2012.ConfigJson(); configJson.Save(); } this.LoadColorDefinitions(); #if VS2012 this.CTxtDefinition = new CTxt.CTxtDefinition(_colorDefinition.JsonObject["CTXT"] as JObject); #endif }