问题
I have lots of header files with long method implementation inside.
Is there An automatic way of doing that?
One-by-one can take a lot of time...
Thanks.
回答1:
If you are using Visual Studio, there's an add-in called Visual Assist that can help you to do this. I'm using it at work and it is really helpful.
Unfortunately this add-in is not free but you can install the trial to do your stuff and test it.
回答2:
KDevelop has such ability too:
Right click to the method -> Refactoring -> Move to cpp
回答3:
In Eclipse CDT its combination is Alt+Shift+T
回答4:
There's a free version of DevExpress Refactor! for C++ that has two automatic 'refactorings' that may suit your needs:
- Move Method to Source File
- Move Method to Header
Refactorings Reference link
来源:https://stackoverflow.com/questions/6362995/c-refactoring-move-method-to-implementation-file