[Monodevelop-devel] Refactoring and navigation commands

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Jan 8 02:34:35 EST 2009


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
item.

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?

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-devel-list mailing list