How to get programmatic information displayed by Quick Info in Visual Studio

I searched without precedent for a method that can be obtained from my C # addin visual studio extension, which appears in Quick Info when the mouse moves over some code.

I hope there will be an elegant way to do this.

Thank.

+5
source share
2 answers

I don't have a sample code, but I found the following documentation for the ViewFilter.HandleQuickInfo method , which sounds like the steps you need to follow.

GetCaretPos IVsTextView, ViewFilter, . OnSyncQuickInfo (IVsTextView, Int32, Int32) Source ( CodeWindowManager ViewFilter). OnSyncQuickInfo (IVsTextView, Int32, Int32) , GetFullDataTipText , . , ( ) TextTipData.

: ViewFilter.HandleQuickInfo

Edit:

IVsTextView, IVsTextManager.

var textManager = Resolve.Service<IVsTextManager, SVsTextManager>();

IVsTextView textView;
ErrorHandler.ThrowOnFailure(textManager.GetActiveView(fMustHaveFocus: 1, pBuffer: null, ppView: out textView));

Int32 caretRow, caretCol;
ErrorHandler.ThrowOnFailure(textView.GetCaretPos(out caretRow, out caretCol));

IVsTextView.UpdateTipWindow, , , IVsTipWindow .

0

Quickview , , .

// MyClass MethodInfo [] methodInfos = typeof (MyClass).GetMethods(BindingFlags.Public |                                                     BindingFlags.Static);

-1

All Articles