locked
Does anyone have a QuickInfo tooltip legacy code example RRS feed

  • Question

  • I like to add QuickInfo tooltips to the Disassembly window (see question here). I know how to make tooltips the 'modern way' but for the Disassebly window it seems I need to do that the 'legacy way'. Does anyone know how to do that. Or does anyone have a pointer to some example code (that i can run) that creates legacy tooltips?
    Saturday, June 10, 2017 4:14 PM

Answers

  • Hi,

    I'm not sure if this works for the Assembly window, but I can shortly describe how I show my quickinfo window:

    - In my own implementation of ViewFilter, I override the GetDataTipText(...) and HandleQuickInfo(...) methods. The former is called when hovering the mouse over something in the editor, the other one is called when choosing Edit|Intellisense|Quickinfo from the menu.

    - Having the location of the mouse-cursor, I retrieve whatever text is located under the cursor, and generate the respective quickinfo data structure (eg, simple string to display).

    - My Quickinfo window is a WPF-derived class (base class is "System.Windows.Window"), so I need to do something like this:

    public void Show(IVsTextView view, TextSpan extents, bool useTimer) {
    ...
    _wpf = new WpfQuickInfo();
    new System.Windows.Interop.WindowInteropHelper(_wpf) { Owner = view.GetWindowHandle() };
    ...
    }

    Hope that helps,

    f_max

    Saturday, July 22, 2017 7:52 PM
  • I don't recall if it QuickInfo was supported back then, but the older IronPython Studio sample (based on the VS 2008 isolated shell) might have an example of this (not for the disassembly window). It's one of the older VS language integration samples before the editor was rewritten with WPF for VS 2010.

    Sincerely,


    Ed Dore

    Tuesday, June 13, 2017 12:38 AM

All replies

  • I don't recall if it QuickInfo was supported back then, but the older IronPython Studio sample (based on the VS 2008 isolated shell) might have an example of this (not for the disassembly window). It's one of the older VS language integration samples before the editor was rewritten with WPF for VS 2010.

    Sincerely,


    Ed Dore

    Tuesday, June 13, 2017 12:38 AM
  • Hi Ed,

    Thank you for pointing to the IronPython plugin; I even used that long time ago! Sadly, I can't compile that project with current visual studios (that are freely available due to the SDK)

    I'm committed to bringing an improved Disassembly Window experience for free. To entice some of you people who have much more experience to help me a bit. I can bring the following popups to the Disassembly window.

    1. Description of mnemonics with performance metrics.
    2. Z3 theorem prover determines the bit values of registers.

    The example shows that RCL shifts an undefined carry flag into EAXl

    Question: Do you know someone who can help me create a popup in the disassembly window? Or, how to make a popup in the disassembly window?




    Thursday, July 20, 2017 9:47 AM
  • Hi,

    I'm not sure if this works for the Assembly window, but I can shortly describe how I show my quickinfo window:

    - In my own implementation of ViewFilter, I override the GetDataTipText(...) and HandleQuickInfo(...) methods. The former is called when hovering the mouse over something in the editor, the other one is called when choosing Edit|Intellisense|Quickinfo from the menu.

    - Having the location of the mouse-cursor, I retrieve whatever text is located under the cursor, and generate the respective quickinfo data structure (eg, simple string to display).

    - My Quickinfo window is a WPF-derived class (base class is "System.Windows.Window"), so I need to do something like this:

    public void Show(IVsTextView view, TextSpan extents, bool useTimer) {
    ...
    _wpf = new WpfQuickInfo();
    new System.Windows.Interop.WindowInteropHelper(_wpf) { Owner = view.GetWindowHandle() };
    ...
    }

    Hope that helps,

    f_max

    Saturday, July 22, 2017 7:52 PM
  • Thank you F_Max!

    I can now make tooltips in the disassembly window due to your comments.

    Monday, July 24, 2017 10:02 AM