Example #1
0
        /// <summary>
        /// Tells document that massive change to text buffer is about to commence.
        /// Document will then stop tracking text buffer changes, will suspend
        /// R parser anc classifier and remove all projections. AST is no longer
        /// valid after this call.
        /// </summary>
        public void BeginMassiveChange()
        {
            if (_inMassiveChange == 0)
            {
                _editorTree.TreeUpdateTask.Suspend();

                RClassifier colorizer = ServiceManager.GetService <RClassifier>(TextBuffer);
                colorizer?.Suspend();

                MassiveChangeBegun?.Invoke(this, EventArgs.Empty);
            }

            _inMassiveChange++;
        }
Example #2
0
        /// <summary>
        /// Tells document that massive change to text buffer is about to commence.
        /// Document will then stop tracking text buffer changes, will suspend
        /// R parser anc classifier and remove all projections. AST is no longer
        /// valid after this call.
        /// </summary>
        public void BeginMassiveChange()
        {
            if (_inMassiveChange == 0)
            {
                _editorTree.TreeUpdateTask.Suspend();

                RClassifier colorizer = ServiceManager.GetService <RClassifier>(TextBuffer);
                if (colorizer != null)
                {
                    colorizer.Suspend();
                }

                if (MassiveChangeBegun != null)
                {
                    MassiveChangeBegun(this, EventArgs.Empty);
                }
            }

            _inMassiveChange++;
        }