10

I'm looking for an equivalent feature in Visual Studio to the drag-in-drop in Eclipse's Outline View. Specifically, after opening the class you were editing in Outline View, you saw all the methods in the class in the physical order they were in (not sorted alphabetically). You could to click on Method 1 and drag it above Method 2, moving all of the code from method 1 physically above Method 2's code. This was very useful for organization.

I looked at Class View in Studio, and while Class View does list all the methods in a class, it lists them according to an order you define (which obviously can't be dragged to rearrange). Is there any feature in Studio that allows you to view the physical layout of a class and rearrange it by dragging the methods?

Thanks, Alec

pghprogrammer4
  • 898
  • 2
  • 9
  • 21
  • possible duplicate of [How to show code outline in Visual Studio?](http://stackoverflow.com/questions/3793892/how-to-show-code-outline-in-visual-studio) – leoly Mar 12 '14 at 09:39

4 Answers4

14

I don't believe there is a direct equivalent in Visual Studio 2010. The closest I've found is the File Structure window, which is provided by Resharper (a great commercial plug-in). This will show you members in their actual order and let you re-arrange things.

enter image description here

Ben Hoffstein
  • 102,129
  • 8
  • 104
  • 120
  • Perfect, I downloaded the trial and it worked exactly as I was hoping. Thanks! – pghprogrammer4 May 03 '11 at 18:32
  • 1
    Whole Tomato's Visual Assist has an Outline window and it is an awesome tool in general so it may be worth paying for it. – TudorT Mar 07 '13 at 14:43
  • Resharper is great for a lot of things, but it still can't figure out how to give an alphabetized view of the file contents. I'm going to check out Visual Assist, maybe it can do it. – Evvo Nov 08 '17 at 20:08
5

VSCommands 2010 has a file structure feature that works with different kind of files in its free version.

Matthieu
  • 4,605
  • 4
  • 40
  • 60
  • 2
    I'm just going to add that File Structure in VSCommands supports C#\VB\C++\XML\XAML\Config\CSS files and support for ASPX\RAZOR\JavaScrip\SQL, filtering and sorting will be added soon. You can download it from http://visualstudiogallery.msdn.microsoft.com/d491911d-97f3-4cf6-87b0-6a2882120acf/ – Jarek Kardas Aug 09 '11 at 16:03
  • 1
    Was using VS10x Code Map but didn't like how they change the license, now using that alternative and happy :) – Guillaume86 Aug 16 '11 at 16:50
1

Whole Tomato's Visual Assist X has a "VA Outline" feature that has this capability:

Not free, but considered by many to be worth the cost.

Michael Burr
  • 333,147
  • 50
  • 533
  • 760
0

I've started using an extension called "VS10x Code Map v2" found in the extension manager. Its really nice and intuitive so far.

AdamC
  • 16,087
  • 8
  • 51
  • 67
  • VS10x Code Map v2 is great. But it no longer free... As I already had a Resharper licence, I switched to it's File Structure view. –  Aug 09 '11 at 15:12