简体   繁体   中英

Implement “Navigate To Definition” (Ctrl+Click) in Visual Studio extension

I am writing a Visual Studio extension and I want to implement the Ctrl + Click command for my own file type. This is similar to the C#/C++ editor whereby Ctrl + clicking on a type name will take user to the definition of that type (aka. Go To Definition command.)

Is there any sample on how to achieve this? I searched on Microsoft Docs website but I couldn't find anything that I want.

Ctrl+Click Go To Definition example from VS Productivity Power Tools may get you started.

Description https://marketplace.visualstudio.com/items?itemName=VisualStudioPlatformTeam.CtrlClickGoToDefinition

Source code https://github.com/microsoft/VS-PPT/tree/master/src/GoToDef

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM