public void Dispose() { //Remove message filter Application.RemoveMessageFilter((System.Windows.Forms.IMessageFilter) this); if (services != null) { // Remove this object from the list of the priority command targets. if (cmdTargetCookie != 0) { IVsRegisterPriorityCommandTarget register = services.VsRegisterPriorityCommandTarget; if (null != register) { int hr = register.UnregisterPriorityCommandTarget(cmdTargetCookie); if (hr != VSConstants.S_OK) { Marshal.ThrowExceptionForHR(hr); } } cmdTargetCookie = 0; } services = null; } if (coreEditor != null) { IVsCodeWindow win = coreEditor.CodeWindow; win.Close(); coreEditor = null; } }
public int Close() { IVsCodeWindow vsCodeWindow = SourceCodeWindow; if (vsCodeWindow != null) { return(vsCodeWindow.Close()); } return(VSConstants.E_NOTIMPL); }
private void ClearEditor() { if (_docData != null) { _docData.GetStateFlags(out uint oldFlags); _docData.SetStateFlags(oldFlags & ~(uint)BUFFERSTATEFLAGS.BSF_USER_READONLY); _docData = null; } if (_codeWindow != null) { _codeWindow.Close(); _codeWindow = null; } if (_textView != null) { _textView.CloseView(); _textView = null; } _textViewHost = null; }
public int Close() { return(codeWindow.Close()); }
int IVsCodeWindow.Close() => _editorWindow.Close();
protected override void OnClose() { _vsCodeWindow.Close(); base.OnClose(); }