Do there exist examples that use IAsyncQuickInfoBroker? #10
Comments
@gundermanc to answer the question, but a sample can be found at https://github.com/Microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncQuickInfo |
Turns out the intellisense controller was never needed for quick info because the IDE provides one. Simply implementing the quick info source is enough. You shouldn't need to call the broker at all unless you need to programmatically pop quick info for some reason. The sample Oleg linked is the definitive sample. Note that you're called on a background thread. |
Thank you for the quick reply. @olegtk, I seemed I hadn't pulled that repo recently, AsyncQuickInfo demo is what I sought. @gundermanc, I didn't know that I didn't need one! "Note that you're called on a background thread." Is there an simple method to add a UserControl to the QuickInfoItem that is returned by GetQuickInfoItemAsync? It is not obvious (to me) how to do that. Or is it still not advisable to add UserControls (with buttons etc) to a QuickInfoItem? |
Adding user controls is still supported, albeit a little bit more roundabout. My recommendation would be to use the built in data-types, but if you need a custom piece of UI, you can 1) define a custom data type and 2) define a IViewElementFactory that defines how it is rendered as UI on the UI thread. AFAIK, Visual FSharp is the only public example of this. Keep in mind that going this route may prevent your content from working with VS Live Share and other advanced scenarios. |
Yes that helped. Thanks for the info! |
I like to migrate to the new IAsync* QuickInfo api, but I can't find any examples that use this new API. I'm a bit confused how to migrate the following piece of code. Is the IntellisenseController still part of the new API? Where do I call the AsyncQuickInfoBroker?
The text was updated successfully, but these errors were encountered: