Visual Studio 2010 has been out for a while now. If you read my articles on DevProConnections.com you know that I’m a fan of Visual Studio 2010. See “Thumbs Up on Visual Studio,” InstantDoc ID 125279. But I’m also a very picky developer who spends many hours each day within Visual Studio. So, even though I like the product a lot, I’ve started a list of features, additions, or issues that I would like to see addressed in the next version of Visual Studio. You can see the beginnings of my list here. If you have any additions to my list, please send them to my editor firstname.lastname@example.org.
Working IntelliSense with HTML Attributes
I really need to see this feature fixed; it’s a top priority for me. Easily my favorite thing about Visual Studio is IntelliSense. In fact, hailing from a web developer background, I still remember the days when I used Visual InterDev, and I had absolutely no idea what the heck all of the bells, options, knobs, and levers did. But I didn’t care because InterDev gave me IntelliSense. What baffles me is that a good 10 years after InterDev, Visual Studio 2010 doesn’t work within HTML attributes. I was certain this was one of those hideously annoying bugs in Visual Studio 2008 that was going to make my life so much easier with Visual Studio 2010.
Unfortunately, Visual Studio 2010 IntelliSense doesn’t work within HTML attributes either. For example, if I’m working on an ASP.NET View, and need a <div> to have a dynamically populated id, IntelliSense won’t work. So, while coding the following, IntelliSense works as soon as I type the period after Model:
<p><%: Model.TopId %></p>
It even works in the following example (where I’m trying to outsmart it by wrapping stuff in quotes):
<p>”<%: Model.TopId %>”</p>
But if I try:
<div id=”Selection_<%: Model.TopId %>”><p>stuff goes here</p></div>
IntelliSense patently doesn’t work. At all. Same thing goes with a src, an alt, or any other attribute. I can’t understand how developers put up with it. It feels like a bug–especially when you think about all the amazing things that Visual Studio 2010 lets you do because it knows and understands the DOM of any document you’re working with. So, fixing this one is a huge requirement for Visual Studio vNext in my book.
I’m a big fan of the Document Outline Window in Visual Studio. It’s a great way to get an “at a glance” overview of the DOM within an .ASPX (or .html) page while editing. I don’t use it all the time though, and that’s mostly because it goes dark when I switch over to a .cs or any other non .aspx/.html file.
I’d love a correspondingly useful window for working with C# (or VB.NET) files. Obviously, with code files there isn’t a DOM, but in the same way that the Properties Window (when working with a Web Form or Win Form) lets you toggle between alphabetized and categorized properties, it would be fantastic if you could get the same thing to provide a view of the code you’re working on. For example, in non-grouped mode, you’d just have a tree view showing the class itself and all of its child-members. Members would be shown in the order they appeared within the file itself, and icons would show whether they were properties, methods, constructors, and so on. Then, double-clicking one of these members would take you right to the code in question. Likewise, if you were looking at this window in Grouped Mode it would group all properties, methods, and so on into collapsible sections that you could navigate through.
Right now the bottom-half of what you get in the Class View Explorer is very close to what I’m hoping for. However, what’s displayed in the bottom half of the Class View Explorer isn’t synchronized with the file you’re currently editing. If it were (and if you could toggle between grouping different kinds of members or just see a representation of where members were physically laid out in the file), I think that would be very helpful. In the end, this isn’t a make or break feature, but I can’t help but feel that having something like this could help me speed my way through files when I’m working on certain kinds of tasks.