1

I am specifically trying to rediscover a feature that I have previously seen. Does anyone recognise / know where to find, this feature?

In the past I have seen (and indeed, used) a feature of my IDE (VS + Resharper) which would pop-up a dialogue box with a list of all the methods currently in my class (and the regions, IIRC) and would allow me to drag-and-drop the methods with-in that popup window. Then when I click 'OK' (or whatever was on the button) it would automatically rearrange the methods in my class according to the changes I made.

This allows me to control and easily manage the ordering of my methods.

I'm 100% sure that this feature existed previously, and am looking to find out what it was called so that I can re-access it.

I'm ...75%? ... confident that it was a piece of R# functionality, but it might have been pure VS.

I would have said (maybe 20% confidence?) that the Keyboard-Shortcut at the time was Ctrl-Alt-F, but that now brings up "Resharper Code Cleanup", which appears to be a "re-order all my methods for me" dialogue? (maybe it's changed in the latest version of R#?)

Does anyone recognise this description?


**To Pre-empt, NO ... this is NOT a duplicate of either of these:**

Those question are about how to get Resharper to automatically sort your methods, based on rigid configured rules, which isn't the feature that I'm remembering.

  • I'm not interested in the IDE deciding on the ordering or applying some preset ordering for me - I want to keep full control.
  • I'm not interested in installing some tool other than VS or Resharper.
  • I'm not trying to remember the shortcuts for moving methods one at a time (Ctrl-Alt-Shift-{ArrowKey})

I am specifically trying to rediscover a feature that I have previously seen.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Brondahl
  • 7,402
  • 5
  • 45
  • 74
  • This used to be a feature of both R# (a long time ago, perhaps v6.0) and MZTools. R# definitely doesn't do it anymore, not sure about MZTools – pinkfloydx33 Jan 27 '18 at 09:43
  • @pinkfloydx33 aww shucks. That would be really sad :( I don't suppose you can find anything referencing the prior functionality in R#, so that I can check that I'm thinking of the same thing as you? – Brondahl Jan 27 '18 at 12:00

1 Answers1

2

In the past I have seen (and indeed, used) a feature of my IDE (VS + Resharper) which would pop-up a dialogue box with a list of all the methods currently in my class (and the regions, IIRC) and would allow me to drag-and-drop the methods with-in that popup window.

The closest thing I can think of is ReSharper's File Structure window. To open it select ReSharper.Windows.File Structure or press ctrl+alt+f (in my environment anyway).

enter image description here

The File Structure window appears. This is a live overview of the current source file (works with .cs as well as other files like .xaml). For .cs files you can drag and drop class members around in the file.

enter image description here

  • Want to apply your own manual method ordering? You can do that
  • Want to put fields at the top. You can do that
  • Want to create/edit/delete regions for your methods. You can do that too

To move a member around just drag and drop it.

enter image description here

OP:

Then when I click 'OK' (or whatever was on the button) it would automatically rearrange the methods in my class according to the changes I made.

File Structure doesn't do any anything automatically. Perhaps you are thinking of Code Cleanup? That is still present in R#.

  • Ah hah! That's the one! Appears to now be bound to Ctrl-F11 for reasons unknown. My use of the word "automatically" in that last bit you quoted was poorly chosen and misleading. I actually just mean `When I click OK it will rearrange the methods`. – Brondahl Jan 27 '18 at 15:04