Search code examples
visual-studiorefactoringcoderush

How can I change the template CodeRush uses when it extracts a method?


When I extract a method in CodeRush, it has some default formatting. I'd like to change it. Specifically, when I choose the location of the extracted method, CodeRush smashes it in, directly above the method I put the location marker at.

So:

When I choose to drop the extracted method, like this: Extract Method Location

It ends up looking like this: Extract Method Results

What I want is for it to have some control over how the method looks, at the moment I want to add some blank lines between it and the next method. How can I do that?


Solution

  • Open the DevExpress -> Options dialog;

    Go to the Editor | Code Formatting | Blank Lines option page;

    Toggle the 'After multi-line members' option.