This seems like the following question: Visual Studio 2010 Plug-in - adding a context menu to the solution explorer , however my request is how to add an item to the context menu in the code editor window for JavaScript files.
I am trying to add a context menu to a Visual Studio add-in project (and not a Visual Studio package).
The code from the link above was extremely useful. To summarize, to add an element to the context menu of the solution explorer and the project explorer, we do this first by selecting the elements themselves:
CommandBars cmdBars = (CommandBars)(_applicationObject.CommandBars); CommandBar vsBarProject = cmdBars["Project"]; CommandBar vsBarSolution = cmdBars["Solution"];
And later, adding them, adding them, adding the easily accessible project template code:
command.AddControl(vsBarProject); command.AddControl(vsBarSolution);
Now my request concerns which cmdBars element I should add to the command so that my element appears in the context menu for editing script files
I already installed it not cmdBars["Code Window"] . Is there one element for all files, or should I add it for each type of editor (e.g. ASPX, Script, HTML, etc.)?
c # plugins visual-studio-2010
James Wiseman Jul 29 '12 at 12:35 2012-07-29 12:35
source share