public override void Close() { ServiceManager.RemoveService <VsMdEditorDocument>(TextBuffer); base.Close(); _editorInstance?.Dispose(); _editorInstance = null; }
protected override void OnTextBufferDisposing(ITextBuffer textBuffer) { IEditorInstance editorInstance = ServiceManager.GetService <IEditorInstance>(textBuffer); if (editorInstance != null) { editorInstance.Dispose(); } base.OnTextBufferDisposing(textBuffer); }
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); }