[Monodevelop-devel] Refactoring and navigation commands
Lluis Sanchez Gual
lluis at novell.com
Thu Jan 8 12:39:56 EST 2009
El jue, 08-01-2009 a las 02:34 -0500, Michael Hutchinson escribió:
> I recently implemented "Go to definition" and "Find references"
> commands as top-level items in the text editor context menu. This
> allows them to be bound to keyboard shortcuts, F12 and Shift-F12.
> However, I haven't committed them yet as I have a few concerns about
> how it relates to the existing refactoring/navigation context menus.
> Currently, MD dynamically generates submenus for the symbol under the
> cursor, and its enclosing/parent items, i.e. the enclosing member, the
> enclosing class, and (if it's a variable) the type. Each of these
> menus allows refactoring and navigation operations on the associated
> There are a few problems with this. Since the submenus are dynamically
> generated, user extensions cannot add new refactoring operations to
> the menu, nor can extensions override the handling of these commands.
> Also, the commands cannot be keybound -- and even if they could, it
> would not be obvious which commands the shortcuts would apply to,
> since the menus contain identical commands.
> So, my question is: are all of the submenus really necessary? How
> useful is it to be able to implement members on a class from the
> context menu on a field within it? What I'd like to do is replace all
> these menus with a simple refactor/navigate menu that would apply only
> to the item under the cursor, as this would be keybindable and
> extensible. However, would it be noticeably less usable or functional?
I think we should check how those refactoring commands are presented in
other IDEs and tools. In any case, I don't think the submenus add much
value. The editor context menu could have a "Go to declaration" command
at the top, maybe a "Go to declaring type" (for type members), and a
"Refactoring" menu with all other refactoring commands.
More information about the Monodevelop-devel-list