static void ApplyChanges(string fileName, IEnumerable <TextEdit> edits) { bool open = false; ITextDocument document = TextFileProvider.Instance.GetTextEditorData(fileName, out open); if (document != null) { document.ApplyEdits(edits); if (!open) { document.Save(); } } else { LanguageClientLoggingService.Log("Unable to find text editor for file: '{0}'", fileName); } }