List<TreeChangeEventRecord> ApplyTreeChanges(EditorTreeChangeCollection changesToApply) {
// Check editor tree reference since document could have been
// closed before parsing was completed
if (!_disposed && _editorTree != null) {
if (TextBuffer != null)
_editorTree.TextSnapshot = TextBuffer.CurrentSnapshot;
return _editorTree.ApplyChangesFromQueue(changesToApply.ChangeQueue);
}
return new List<TreeChangeEventRecord>();
}