VSIX Get method name, parameters, namespace and class name RRS feed

  • Question

  • Hi,

    How can I get method name, parameters, class name and namespace with command on context menu from code windows on VSIX? Thanks.



    Monday, December 2, 2019 10:51 PM

All replies

  • Hi _Abd,

    Welcome to MSDN forum.

    Do you want to use intellisene feature of visual studio? If so, we recommend you could use IVsIntellisenseHost Interface, it could provide a intellisense hosting functionality.

    If I misunderstand it, we will appreciate that you could share more details with us about this requirement, 

    Hope it could help you.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, December 3, 2019 2:13 AM
  • You can use Visual Studio code model to access this information.

    For example, to get method name and parameters get a CodeFunction like this:

    EnvDTE.TextSelection ts = DTE.ActiveWindow.Selection as EnvDTE.TextSelection;
    EnvDTE.CodeFunction func = ts.ActivePoint.CodeElement[vsCMElement.vsCMElementFunction]
    					as EnvDTE.CodeFunction;

    Sergey Vlasov | Vlasov Studio | Best in class Visual Studio extensions and tools

    Tuesday, December 3, 2019 3:38 AM