views:

555

answers:

0

I created this Visual Studio addin a while ago for saving shortcuts to files as a more extensible alternative to an MRU.

The problem I've had with it since the start is the context menu item only appears for source code files - not .sql, .js, .aspx and so on.

This is a snippet of the code used for registering the context menu item:

CommandBar commandBar = ( (CommandBars) this.DTEApplication.CommandBars )["MenuBar"];
CommandBarControl viewControl = commandBar.Controls["View"];
CommandBarPopup viewCmdBar = (CommandBarPopup) viewControl;
CommandBarControl commandBarControl = (CommandBarControl) this.ViewMenuCommand.AddControl( viewCmdBar.CommandBar, 5 );

this.ContextMenuCommand = this.DTEApplication.Commands.AddNamedCommand(...)

Is there any way of altering this so it registers for every file type?