Ziff Davis EnterpriseDevLife
Advertisement
Advertisement

Thursday, May 21, 2009 2:02 PM/EST

VS2010 Code Editor helps you navigate around your code

The VS2010 editor has been rewritten in WPF enabling many more ways to visualize your code.

I've been poking around to see some of these improvements and thought I would share my discoveries.

The first (and most obvious to me) new feature shows up when you select a property, variable or method in your code. All other instances of that item which are in scope will also be highlighted.

For example, in this screenshot, I clicked on one of the instances of the entsets variable (note that I did not double-click and select the entire word). Then all of the other entsets were automatically highlighted. entsets is private to this extension method.

VS2010EditorA.png

If I had selected a variable which ws scoped to a class, not a method, then all of the other instances of that variable would be highlighted.

Another nice features is that if you hover your mouse on the border of the editor window, the method that is to your right will get highlighted.

 

VS2010EditorB.png

Rest assured this is just a WPF UI trick. The text is not being selected so you don't have to worry about accidentally overwriting anything.

Another really great feature is the sequence diagram. This will be invaluable to devs who inherit code. The diagram provides a visual map of your code.

In these screenshots I have selected the GetEntitySetFullName method and right clicked to get a context menu.

VS2010EditorC.png

 

In the wizard, I changed theMaximum call depth to 5 so that I follow the call path of my method.

VS2010EditorD.png

Here is part of the resulting map.

 

VS2010EditorE.png
                                         Click for larger view

Unfortunately, there seems to be no way to resize the image or save it. I imagine those obvious features will be coming.

Another great tool for getting the "bigger picture" of your code is the Call Hierarchy view. Check this out.

VS2010EditorF.png

You can see what methods call GetCustomerswithRelatedData as well as what methods it calls.

 

VS2010EditorG.png

 

And you can expand each method to see what its hierarchy is as well. Very very useful!

  VS2010EditorH.png

TrackBack

TrackBack

http://blogs.devsource.com/cgi-bin/mte/mt-tb.cgi/17119

Listed below are links to weblogs that reference VS2010 Code Editor helps you navigate around your code:

The Technology Post for May 22nd from Jason N. Gaylord's Blog
UPDATE: If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds [Read More]
The Technology Post for May 22nd from Jason N. Gaylord's Blog
UPDATE: If you are looking to follow this series, be sure to subscribe to my RSS feed at http://feeds [Read More]

Post a Comment

 
 

Advertisement

Syndication

Subscribe: