I found myself having to add an item to the code editor window context menu, which ended up being cmdBars["Script Context"] as I was wanting it specifically for JavaScript files.
As a technique for finding this which I felt useful sharing, I added the new menu item to all (456) menu controls in visual studio with the following loop:
foreach (CommandBar cc in cmdBars)
{
if (cc.Index >= 1 && cc.Index <= 456)
{
command.AddControl(cmdBars[cc.NameLocal]);
}
}
I then narrowed this using a divide and conquer technique by adjusting the bounds of the loop:
if (cc.Index >= 1 && cc.Index <= 256)
...
if (cc.Index >= 1 && cc.Index <= 128)
...
if (cc.Index >= 64 && cc.Index <= 128)
...etc...
Until I eventually found what I was looking for.
(The related question for this is at Visual Studio 2010 Plug-in - Adding a context-menu to the Editor Window)
answered 2012-07-29T12:51:08.833