Freigeben über


Adding custom menu items to "Team" menu

Few customers wanted to add a menu to context menu of workitems in result list. It seems like a great idea to show actions on selected work items, but we haven’t exposed the command ids for context menus in V1 and Orcas. We did expose the “Team” menu in the main menu and it is easy to add commands under it using a VSIP package. Below is sample code for CTC file to add a menu group under “Team” menu.

 

  NEWGROUPS_BEGIN

    // NewGroup Parent Group Priority

    guidClientCustomizationsCmdSet:MyMenuGroup, guidSHLMainMenu:IDM_MENU_TEAM_FOUNDATION_CLIENT, 0x0600;

  NEWGROUPS_END

 

If you need these ids exposed, pls raise your suggestion at https://connect.microsoft.com/VisualStudio/feedback  with which menu groups you want to be exposed.

 

Update 9/27/07: One of our customers, Kurt, took the ids from me and managed to add custom menus under context menus. Below is information on the lines he added to his VSIP files. This should help to add your own context menus (may be with some troubleshooting). once you have the menu added, you can get the workitem under context by using DocumentService described in https://blogs.msdn.com/narend/archive/2006/07/07/AccessingWitFromAddin.aspx
Please note that this is not supported feature and the ids could change in future releases though I guess it would be unlikely.

 

 guidCustomReportingExtensionPackageCmdSet:MyMenuGroup,   guidSHLMainMenu:IDM_MENU_PROJECT_CONTEXT_MENU,      0x0600;  // Team Project context menu
  guidCustomReportingExtensionPackageCmdSet:MyMenuGroup,    CommandSetGuid:MENU_RESULTLIST,    0x0600;                 // Result List context menu
  guidCustomReportingExtensionPackageCmdSet:MyMenuGroup,   CommandSetGuid:MENU_WORKITEM,        0x0600;                 // Work Item document context menu

// Command IDs rom the CommandIDs.h
#define MENU_RESULTLIST        0x205
#define MENU_WORKITEM          0x206

Comments