1

In VS 2008, when the caret is on the name of the class which doesnt have a using statement in the file, SHIFT+ALT+F10 will bring up a context menu to add the using statement.

Is the same function possible with Coderush/Refactor Pro, only using the CRTL+' shortcut? Id CodeRush/Refactor Pro doesn't support it out of the box then an Addon would suffice.

Jaimal Chohan
  • 8,530
  • 6
  • 43
  • 64

2 Answers2

5

You can also use Ctrl+. in Visual Studio to show the "add usings" context menu.

adrianbanks
  • 81,306
  • 22
  • 176
  • 206
  • Cool, didn't know this, however ideally, I'd like this to always add a using statement. – Jaimal Chohan Oct 13 '09 at 21:31
  • I don't follow - do you want a shortcut to auto-add the using, bypassing the menu completely? – adrianbanks Oct 13 '09 at 21:38
  • 1
    Thats exactly what I would like. – Jaimal Chohan Oct 13 '09 at 21:50
  • @Jaimal Chohan: Obv only if there is an unambiguous one. Also how would you trigger the choice of saying it explicitly then (i.e. the bottom half of the Ctrl-./Shift-Aklt-F10 context menu)? Have you thought about logging a request at devexpress support? (e.g, I have one for adding LINQ easily where appropriate) – Ruben Bartelink Apr 20 '10 at 12:43
2

You can bind a keystroke to any refactoring (or CodeProvider) by supplying the display name of the refactoring in the parameters box of the binding.

Rory Becker
  • 15,551
  • 16
  • 69
  • 94
  • @Rory: Have you and/or your squad of merry men got anything in your toolbox that could generate a using (as discussed in the other question?) [that we could bind such a keystroke to] ? :P – Ruben Bartelink Apr 20 '10 at 12:44