views:

304

answers:

2

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.

+2  A: 

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

adrianbanks
Cool, didn't know this, however ideally, I'd like this to always add a using statement.
Jaimal Chohan
I don't follow - do you want a shortcut to auto-add the using, bypassing the menu completely?
adrianbanks
Thats exactly what I would like.
Jaimal Chohan
@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
+1  A: 

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
@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