Skip to content

Instantly share code, notes, and snippets.

@anshumanatri
Created March 9, 2009 09:31
Show Gist options
  • Save anshumanatri/76192 to your computer and use it in GitHub Desktop.
Save anshumanatri/76192 to your computer and use it in GitHub Desktop.
public int ExecCommand(uint itemid, ref Guid pguidCmdGroup, uint nCmdID,
uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
{
if (pguidCmdGroup == VsMenus.guidVsUIHierarchyWindowCmds)
{
ActiveNode = NodeFromId(itemid);
switch (nCmdID)
{
case (uint)VSConstants.VsUIHierarchyWindowCmdIds.UIHWCMDID_RightClick:
if (activeNode.MenuId != 0)
activeNode.showContext(serviceProvider,pvaIn);
break;
}
return VSConstants.S_OK;
}
return (int)OleConstants.OLECMDERR_E_NOTSUPPORTED;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment