Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GoToImplementation with ctrl + click via a VS Extension. #29

Open
rollsch opened this issue Jun 26, 2021 · 0 comments
Open

GoToImplementation with ctrl + click via a VS Extension. #29

rollsch opened this issue Jun 26, 2021 · 0 comments

Comments

@rollsch
Copy link

rollsch commented Jun 26, 2021

Hi @sharwell , I didn't know how else to contact you but I thought you may be able to assist as you have been very helpful in the past.

I want to write a Visual Studio extension similar to your mouse extension. I want to override ctrl + click to execute "GoToImplementation" instead of "GoToDec"

I can only find the following commands in VSConstants.cs
GotoDefn : Go to Definition
GotoDecl: Go to Declaration

GoToImplementation is no where to be found as it appears to be some kind of extension (as it shows a drop down menu instead).

After some digging I have found
GoToImplementationCommandArgs and GoToImplementationCommandHandler however I cannot find any source code or example of how to manually execute this in a manor similar to how you do it here:

cmdId = (uint)VSConstants.VSStd97CmdID.ShellNavForward;
...
 IVsUIShell shell = (IVsUIShell)ServiceProvider.GetService(typeof(SVsUIShell));
Guid cmdGroup = VSConstants.GUID_VSStandardCommandSet97;
OLECMDEXECOPT cmdExecOpt = OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER;
object obj = null;
ErrorHandler.ThrowOnFailure(shell.PostExecCommand(cmdGroup, cmdId, (uint)cmdExecOpt, ref obj));
e.Handled = true;

I appreciate you are busy and this is not the best place to ask, however could you assist pointing me in the right direction? I would like to publish this as an extension to help the community as it has been requested many times.

https://resharper-support.jetbrains.com/hc/en-us/community/posts/115000490890-Why-doesn-t-ctrl-left-click-go-straight-to-implementation-instead-of-interface-definition-

Thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant