You must be registered to post a reply. Click here to register.
T O P I C R E V I E W
ceretullis
Posted - Feb 01 2013 : 10:31:13 AM Love the extract method refactoring... currently I can extract method (and get the method in the class header), or I can extract method and choose "to source" and get the method in the class body.
It would be awesome if there was an option to extract method to an anonymous namespace in the source file.
We practice clean code techniques and end up with many small functions. An approach that we use to help keep classes from function bloat is to move small utility functions (that don't have high cohesion with the class invariant) to anonymous name spaces in the source file.
1 L A T E S T R E P L I E S (Newest First)
feline
Posted - Feb 01 2013 : 8:56:29 PM Picking a target namespace is a bit to specialised for the Extract Method dialog, since we try to keep our refactoring dialogs simple and focussed. Are you aware that you can use VA Outline to quickly and easy "cut and paste" or "drag and drop" to move one or more functions into an existing namespace in the current file? This should help here: