Feature Requests for Visual Studio 9
October 26th, 2006There are a few obvious features which I would like added to Visual Studio. I have seen quite often that add-ins like CodeRush and ReSharper attempt to add useful features, but I would really prefer that I get the following requests as a part of the base IDE.
#1 Categorized and Grouped Intellisense
I would like the Intellisense listing to be categorized. It should have methods, properties and events grouped together so it is easy to find them. I once saw an add-in which placed these categories onto separate tabs so that it was not necessary to scroll that far.
#2 Method and Property Creation Wizards
I would like a few wizards to create methods and properties. Ideally while the cursor is on a line within a class there would be icons in the toolbar to create a new method or property. It would help me select the types and set the parameters. I find that as I move between C# and VB.NET I am slowed down by the syntax differences and a wizard would go a long way to get me past the syntax differences and back to writing the code within those methods and properties.
#3 Code Region Organizer
I would like the editor to make better use of code regions. Currently I have to manage them all manually. With the above method and property creation wizards, it could give the option to create the new entry inside an existing or new region. That would really help keep the code organized with minimal effort. And when I do have an existing method placed anywhere in the code, I would like to right-click the method name and have the option to move it to an existing or new region. That would dramatically cut down on the time I take to organize my code.
#4 Auto Ordering Methods and Properties
I would like a little help with ordering the methods and properties. I normally try to order them by their respective use. If a set of event handlers are for GridView1, then I place them next to each other. And when the existing wizards generate these handles they already use a naming convention with names like GridView1_RowCommand and GridView1_DataBound, so it could be a simple matter of sorting the methods alphabetically. Naturally this would work much like the existing code formatting where it helps you keep it in order when you create it but then lets you change it as you see fit, while later giving you the option to automatically organize it again with a menu option.
With these above features, it would be so much more pleasant to work in Visual Studio and help me make better use of my time.
If you agree with these feature requests, please vote for the feedback issue I have opened.

October 26th, 2006 at 10:57 am
#1, so if I'm used to pressing the first letter of a method and properties are listed before methods I have to now press that letter MORE... I don't like that idea. What is a method changes to a property, and vice versa (bad thing to do; but...) now it would be in a different position in the list. Organizing in groups would them make the icons redundant and those should be removed...
#2, there are some code snippets to ease creation of properties (methods as well, I think). You can also add methods and properties via wizard-like interface in the Class Diagram.
#3, again there's code snippets for this.
#4, I don't see that value of this. Maybe a PowerToy...
October 26th, 2006 at 11:11 am
Peter,
For #1 I think the can provide options to group or not to group. They already have the Common and All tabs so this would just be another way to summarize the items. For #2, I realize there are code snippets, but the keywords between VB and C# are different. A couple of icons in the toolbar would make it that much easier. As for the Class Diagram, that interface is very minimal. A method and property creation dialog window could provide a more complete set of options. For #3, how can a code snippet help organize regions? Right now I have to manually cut and past code segments to the Regions I create. I do use the snippet to define a region but it does not help me with moving code into the region. When I do move code into a region I do so as the code is collapsed to just the signature. But when I paste it, the code automatically expands, requiring me to collapse it all again so I can see the summarized code so I can continue organizing it. The automation here would be helpful. For #4, I see it much like the current code formatting. Being able to order the methods, properties and even import declarations makes the code more readable and easier to navigate. If I can order the code and then see all event handlers related to GridView1 at a glance, it does save me time and help me understand the code.
October 27th, 2006 at 11:45 am
Brennan, I'm not sure what you mean by your comments on #2. You can drag-and-drop selections from one part of a file to another (including into a region) --there's no region-specific syntax... The region has to be expanded to copy into it mind you. Maybe a "move selection to region" sub-menu on a context menu (where the sub-menu would be a list of regions in the current file) and dropping on a colapsed region rectangle puts the selection properly formattered at the end of the region?
#3, I'm not sure why there's such a discrepancy between the available interfaces for adding classes in C++/C#/VB.Net. It would be nice if there was some consistency there (or the ability for consistency). I don't find the Class Diagram to be minimal though. Sure, right on the diagram it's fairly minimal; but, the Class Details (View\Other Windows while Class Diagram is active) along with the Properties window has everything I've ever needed to edit...
#4. How would this work if I stick some methods/properties in a region? Are you suggesting per-region sorting, or all members sorting? Would the sorting also group properties/methods/types? I would love the ability to have a check-in/check-out reformatter though... I've always thought the format of a source file should be encapsulated from what is stored and be a user preference, but I'm digressing.
October 27th, 2006 at 12:15 pm
#1 we'll probably do if Orcas doesn't ship with this.
#2 is solved by CodeRush templates. If you work in C# and/or VB and/or C++, you can quickly create the methods and properties you need using the same keystrokes in all languages. CodeRush even has the ability to convert keywords from a different language into the active language, so if you're thinking and writing in VB while writing C# code, you'll still get C# code.
#3 is already implemented in CodeRush.
#4 I created a free DXCore plug-in that did this for dnrTV. You can get source code and tweak it to your satisfaction. http://dnrtv.com/default.aspx?showID=0005
October 27th, 2006 at 12:30 pm
Peter,
#2, I just want it to be easier. Normally when I am organizing a class is because it has become fairly large (over 400 lines) and scrolling up and down to get to code has become a chore. And even when the methods are collapsed to just the signature they can still take up many lines. By having a context menu action handle the move for me automatically, it would take less effort to keep the code organized.
#3, I have been using the Class Diagram mostly to add comments quickly using the Class Details panel. Occasionally I use it to create new methods and properties. I suppose I could be missing something. Recently when I added new methods using the Class Details window I wanted set the methods to Private or Protected Friend, but that window does not offer that option. However, I just looked and do see the Properties window does have those options. It is just not in one place.
What I want is a toolbar icon which opens a dialog window with everything from the Class Details and Properties window as well as the selection for the Region. And it would be great if I could place my cursor on the method signature and also see the Class Details and Properties window as they are show in the Class Diagram. Not having to deal with language specific syntax would help me avoid simple coding errors.
#4, I would do the sorting within the regions. And to help group things logically, developers can easily rename the methods and properties with a useful prefix. That could easily become the standard convention for a development team. Fortunately VS 2005 already has a method renaming mechanism to help here already.
October 27th, 2006 at 12:36 pm
Mark, that is great.
I just switched to CodeRush from ReSharper yesterday after a year of being frustrated by it. I am still very new to CodeRush but did read up a little on DXCore yesterday. I am interested in seeing what I could do with it.