《重构——改善既有代码的设计》读书笔记1

2019-12-19  本文已影响0人  抬头挺胸才算活着

参考资料:
[1]. IDEA 重构快捷键

重命名文件、方法、属性等(rename):SHIFT+F6
提取当前选择为变量(extract variable):CTRL+ALT+V
提取当前选择为属性(extract field):CTRL+ALT+F
提取当前选择为常量(extract constant):CTRL+ALT+C
提取当前选择为方法(extract method):CTRL+ALT+M
提取当前选择为方法参数(extract parameter):CTRL+ALT+P
重构类、方法(change signarture):CTRL+F6
提取代码块至if、try等结构中(surround with):CTRL+ALT+T
创建模块文件等(new):CTRL+ALT+N
创建测试用例(test):CTRL+SHIFT+T
重构菜单(refactor for this):CTRL+T

  1. Replace Temp with Query(120)
  2. Introduce Parameter Object(295)
  3. Preserve Whole Object(288)
  4. Replace Method with Method Object(135)
  1. 寻找注释
  2. 条件表达式(Decompose Conditional(238))
  3. 循环
上一篇 下一篇

猜你喜欢

热点阅读