Microsoft.R.Editor.Document.REditorDocument.EndMassiveChange C# (CSharp) Method

EndMassiveChange() public method

Tells document that massive change to text buffer is complete. Document will perform full parse, resume tracking of text buffer changes and classification (colorization).
public EndMassiveChange ( ) : bool
return bool
        public bool EndMassiveChange() {
            bool changed = _editorTree.TreeUpdateTask.TextBufferChangedSinceSuspend;

            if (_inMassiveChange == 1) {
                var colorizer = ServiceManager.GetService<RClassifier>(TextBuffer);
                colorizer?.Resume();

                if (changed) {
                    TextChangeEventArgs textChange =
                        new TextChangeEventArgs(0, 0, TextBuffer.CurrentSnapshot.Length, 0,
                            new TextProvider(_editorTree.TextSnapshot, partial: true),
                            new TextStream(string.Empty));

                    List<TextChangeEventArgs> textChanges = new List<TextChangeEventArgs>();
                    textChanges.Add(textChange);
                    _editorTree.FireOnUpdatesPending(textChanges);
                }

                _editorTree.TreeUpdateTask.Resume();
                MassiveChangeEnded?.Invoke(this, EventArgs.Empty);
            }

            if (_inMassiveChange > 0) {
                _inMassiveChange--;
            }

            return changed;
        }