Skip to content

Commit 912c346

Browse files
Merge pull request #508 from X-Sharp/master
QueryStatus is used to enable commands that are not enabled by defaul… [release]
2 parents 2fac3c4 + 56480b6 commit 912c346

File tree

1 file changed

+5
-0
lines changed
  • src/toolkit/Community.VisualStudio.Toolkit.Shared/Commands

1 file changed

+5
-0
lines changed

src/toolkit/Community.VisualStudio.Toolkit.Shared/Commands/Commands.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ public CommandInterceptor(CommandID cmd, Func<CommandProgression> func)
140140

141141
public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
142142
{
143+
if (prgCmds[0].cmdID == _cmd.ID)
144+
{
145+
prgCmds[0].cmdf = (uint)OLECMDF.OLECMDF_ENABLED | (uint)OLECMDF.OLECMDF_SUPPORTED;
146+
return VSConstants.S_OK;
147+
}
143148
return (int)Microsoft.VisualStudio.OLE.Interop.Constants.OLECMDERR_E_NOTSUPPORTED;
144149
}
145150

0 commit comments

Comments
 (0)