This is similar to the following question: Visual Studio 2010 Plug-in - Adding a context-menu to the Solution Explorer, however my query is how to add the item to the context menu item to the code editor window for JavaScript files.
I am attempting to add the context menu in with a Visual studio Add-in project (not a Visual studio package).
The code from the above link has been supremely helpful. To summarise, to add an item to the context menu of the Solution Explorer and Project explorer, we do so first by retrieving the items themselves:
CommandBars cmdBars = (CommandBars)(_applicationObject.CommandBars);
CommandBar vsBarProject = cmdBars["Project"];
CommandBar vsBarSolution = cmdBars["Solution"];
And later on, adding them adding them in by augmenting the readily available project template code:
command.AddControl(vsBarProject);
command.AddControl(vsBarSolution);
Now my query is regarding which of the cmdBars
elements I have to add the command to, in order for my item to appear on the context menu for editing script files
I have already established its not cmdBars["Code Window"]
. Is there one item for all files, or do I have to add it for each editor type (e.g. ASPX, Script, HTML, etc)?