void UpdateTypeScriptContextWithFileContentFromDisk(FileName fileName) { if (File.Exists(fileName)) { TypeScriptContext context = TypeScriptService.ContextProvider.GetContext(fileName); string fileContent = FileReader.ReadFileContent(fileName, SD.FileService.DefaultFileEncoding); context.UpdateFile(fileName, fileContent); } }
static void UpdateContext(TypeScriptContext context, ITextEditor editor) { if (IsFileInsideProject(editor.FileName)) { UpdateAllOpenFiles(context); } else { context.UpdateFile(editor.FileName, editor.Document.Text); } }
protected void UpdateFile(TypeScriptContext context, FileName fileName) { context.UpdateFile(fileName, TypeScriptService.GetFileContents(fileName)); }
static void UpdateContext(TypeScriptContext context, FileName fileName) { ITextSource fileContent = GetFileContent(fileName); context.UpdateFile(fileName, fileContent.Text); }