C++ Refactoring - Move method to implementation file

蓝咒 提交于 2019-12-21 12:59:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!