Esempio n. 1
0
        public override void Close()
        {
            ServiceManager.RemoveService <VsMdEditorDocument>(TextBuffer);
            base.Close();

            _editorInstance?.Dispose();
            _editorInstance = null;
        }
Esempio n. 2
0
        protected override void OnTextBufferDisposing(ITextBuffer textBuffer)
        {
            IEditorInstance editorInstance = ServiceManager.GetService <IEditorInstance>(textBuffer);

            if (editorInstance != null)
            {
                editorInstance.Dispose();
            }
            base.OnTextBufferDisposing(textBuffer);
        }
Esempio n. 3
0
        public void Close()
        {
            if (_wpftextViewHost != null)
            {
                _wpftextViewHost.Close();
                _wpftextViewHost = null;
            }

            if (_editorIntance != null)
            {
                _editorIntance.Dispose();
                _editorIntance = null;
            }
        }
        protected override void OnTextBufferDisposing(ITextBuffer textBuffer)
        {
            IEditorInstance editorInstance = ServiceManager.GetService <IEditorInstance>(textBuffer);

            if (editorInstance != null)
            {
                editorInstance.Dispose();
            }
            else
            {
                IREditorDocument doc = REditorDocument.TryFromTextBuffer(textBuffer);
                if (doc != null)
                {
                    doc.Dispose();
                }
            }

            base.OnTextBufferDisposing(textBuffer);
        }