Skip to content

Commit

Permalink
QueryStatus is used to enable commands that are not enabled by defaul…
Browse files Browse the repository at this point in the history
…t, such as Goto Definition in the Sourcecode Editor
  • Loading branch information
RobertvanderHulst committed Aug 15, 2024
1 parent 2fac3c4 commit 56480b6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ public CommandInterceptor(CommandID cmd, Func<CommandProgression> func)

public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
{
if (prgCmds[0].cmdID == _cmd.ID)
{
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_ENABLED | (uint)OLECMDF.OLECMDF_SUPPORTED;
return VSConstants.S_OK;
}
return (int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED;
}

Expand Down

0 comments on commit 56480b6

Please sign in to comment.