private void OnDocumentClosing(object sender, EventArgs e)
        {
            if (_textBuffer != null)
            {
                EditorShell.Current.Idle -= OnIdle;

                _document.EditorTree.UpdateCompleted -= OnTreeUpdateCompleted;
                _document.EditorTree.NodesRemoved    -= OnNodesRemoved;

                _document.DocumentClosing -= OnDocumentClosing;
                _document = null;

                _errorTags.Clear();
                _errorTags = null;

                ServiceManager.RemoveService <EditorErrorTagger>(_textBuffer);
                ResultsQueue = null;

                _textBuffer.Changed -= OnTextBufferChanged;
                _textBuffer          = null;

                if (TaskList != null)
                {
                    TaskList.RemoveTaskSource(this);
                }
            }
        }
Beispiel #2
0
        private void OnDocumentClosing(object sender, EventArgs e)
        {
            if (_textBuffer != null)
            {
                _idleTime.Idle -= OnIdle;

                _document.EditorTree.UpdateCompleted -= OnTreeUpdateCompleted;
                _document.EditorTree.NodesRemoved    -= OnNodesRemoved;
                _document.Closing -= OnDocumentClosing;

                _errorTags.Clear();

                _textBuffer.Changed -= OnTextBufferChanged;
                _taskList?.RemoveTaskSource(this);
            }
        }