Idea: Arranging Methods in a Class
Hello.
I cauught myself arranging methods (with Shift+Alt+Ctrl+ Up, Down) accorging to the execution quite often, especially when the new methods are always automatically generated by R# under a current methods.
So, here is an example of what I get by generating 3 methods and what I would like to get instead:
Option 1:
The best option here would be to search where exatly a method needs to be inserted, for example if I generate ValidateDigits() last, R# would find that the decalration of the method is between other two methods and put it there. Of course, any of the methods could have been in the base class or in a different file, but then the rules could apply like that:
1. between two methods
2. after first method
3. beofre second method
4. after current method
Option 2:
I believe that most of the time developers add new methods top to bottom, so maybe it is a good idea to have new methods generation in the end of the
Option 3:
Have an option of rearranging methods as a "Cleanup" option.
Please sign in to leave a comment.
You might want to look at the Greenkeeper plugin for ReSharper 8 - it will arrange your code in "newspaper mode" or in the order they're used.
Yep! The Geenkeeper will do
Thanks!