locked
Disable context menu for find symbol window items RRS feed

  • Question

  • When I implement "Find All Reference" using IVsSimpleLibrary and IVsSimpleObjectList. Results records will display in find symbol window. But override IVsSimpleObjectList.GetContextMenu() and return VSConstants.S_FAIL can't prevent context menu pop out. How to make right click event disable in Find symbol window? 

    Any response will be OK......

    Wednesday, August 7, 2013 6:10 AM

Answers

  • Hi TreeShadow,

    ReSharper extensibility would meet your requirement for another way to implement ‘Find All Reference’, and you could download it here: http://visualstudiogallery.msdn.microsoft.com/EA4AC039-1B5C-4D11-804E-9BEDE2E63ECF.

    After you have installed ReSharper:

    In Visual Studio, right click on the type name and choose "Go to Inheritor". Alternatively, select the type name, then go to ReSharper/View/Type Hierarchy to open up a new tab and the menu will show the keyboard shortcut.


    Sophia Gou
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, August 9, 2013 8:10 AM

All replies

  • You can't, GetContextMenu simply gives you an option to replace the context menu, not prevent one from showing. You could return an IOleCommandTarget that would say every menu item was invisible/disabled, but then I think you would end up with the context menu that has the single 'No Items Available' label on it.
    Wednesday, August 7, 2013 3:07 PM
  • Is there any way to disable right click event in Find symbol window? Or to change a way to implement Find All Reference? 
    Thursday, August 8, 2013 2:15 AM
  • Hi TreeShadow,

    ReSharper extensibility would meet your requirement for another way to implement ‘Find All Reference’, and you could download it here: http://visualstudiogallery.msdn.microsoft.com/EA4AC039-1B5C-4D11-804E-9BEDE2E63ECF.

    After you have installed ReSharper:

    In Visual Studio, right click on the type name and choose "Go to Inheritor". Alternatively, select the type name, then go to ReSharper/View/Type Hierarchy to open up a new tab and the menu will show the keyboard shortcut.


    Sophia Gou
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, August 9, 2013 8:10 AM