/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.TextTipData"]/*' /> public TextTipData(IServiceProvider site) { if (site == null) { throw new System.ArgumentNullException("site"); } //this.textView = view; // Create our method tip window (through the local registry) Type t = typeof(IVsTextTipWindow); Guid riid = t.GUID; Guid clsid = typeof(VsTextTipWindowClass).GUID; Microsoft.VisualStudio.Shell.Package pkg = (Microsoft.VisualStudio.Shell.Package)site.GetService(typeof(Microsoft.VisualStudio.Shell.Package)); if (pkg == null) { throw new NullReferenceException(typeof(Microsoft.VisualStudio.Shell.Package).FullName); } this.textTipWindow = (IVsTextTipWindow)pkg.CreateInstance(ref clsid, ref riid, t); if (this.textTipWindow == null) { NativeHelpers.RaiseComError(NativeMethods.E_FAIL); } NativeMethods.ThrowOnFailure(textTipWindow.SetTextTipData(this)); }
public void Close(IVsTextView textView) { if (this.isWindowUp) { textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS); } this.textTipWindow = null; }
/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Close"]/*' /> public void Close(IVsTextView textView) { if (this.textTipWindow != null) { if (this.isWindowUp) { NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS)); } Marshal.ReleaseComObject(this.textTipWindow); this.textTipWindow = null; } }
public TextTipData(IServiceProvider site) { Debug.Assert(site != null); //this.textView = view; // Create our method tip window (through the local registry) this.textTipWindow = (IVsTextTipWindow)VsShell.CreateInstance(site, ref VsConstants.CLSID_VsTextTipWindow, ref VsConstants.IID_IVsTextTipWindow, typeof(IVsTextTipWindow)); if (this.textTipWindow == null) { NativeHelpers.RaiseComError(HResult.E_FAIL); } textTipWindow.SetTextTipData(this); }
/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.TextTipData"]/*' /> internal TextTipData(IServiceProvider site) { if (site == null) throw new System.ArgumentNullException("site"); //this.textView = view; // Create our method tip window (through the local registry) Type t = typeof(IVsTextTipWindow); Guid riid = t.GUID; Guid clsid = typeof(VsTextTipWindowClass).GUID; Microsoft.VisualStudio.Shell.Package pkg = (Microsoft.VisualStudio.Shell.Package)site.GetService(typeof(Microsoft.VisualStudio.Shell.Package)); if (pkg == null) { throw new NullReferenceException(typeof(Microsoft.VisualStudio.Shell.Package).FullName); } this.textTipWindow = (IVsTextTipWindow)pkg.CreateInstance(ref clsid, ref riid, t); if (this.textTipWindow == null) NativeHelpers.RaiseComError(NativeMethods.E_FAIL); else NativeMethods.ThrowOnFailure(textTipWindow.SetTextTipData(this)); }
public void Close(IVsTextView textView) { if (this.isWindowUp) textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS); this.textTipWindow = null; }
public TextTipData(ServiceProvider site) { Debug.Assert(site != null); //this.textView = view; // Create our method tip window (through the local registry) this.textTipWindow = (IVsTextTipWindow)VsShell.CreateInstance(site, ref VsConstants.CLSID_VsTextTipWindow, ref VsConstants.IID_IVsTextTipWindow, typeof(IVsTextTipWindow)); if (this.textTipWindow == null) NativeHelpers.RaiseComError(HResult.E_FAIL); textTipWindow.SetTextTipData(this); }
/// <include file='doc\ViewFilter.uex' path='docs/doc[@for="TextTipData.Close"]/*' /> public void Close(IVsTextView textView) { if (this.textTipWindow != null) { if (this.isWindowUp) NativeMethods.ThrowOnFailure(textView.UpdateTipWindow(this.textTipWindow, (uint)TipWindowFlags.UTW_DISMISS)); Marshal.ReleaseComObject(this.textTipWindow); this.textTipWindow = null; } }