一、写代码的时候常用快捷键
1、新建代码的操作
- 快速生成:Generate:
alt + G
2、查看代码的操作
- 查看文件结构信息:File Structure:
alt + F
- 查看定义:Declaration:
alt +D
- 查找实现类:Implementation:
alt + I
- 谁调用了这个方法:Call Hierarchy:
alt + c
- 导航窗口的操作:Navigate - Back/Forward:
ctrl + alt + 左右箭头
3、修改代码的操作
- 格式化代码:Reformat Code:
alt + R
- 定位到下一个错误:Next Highlighted Error:
alt + N
- 高级重命名:Rename:
shift + f6
4、项目查找相关
- 高级查找:Find in Path :
ctrl + shift +f
二、Debug常用快捷键
step over:f6
step into:f7
step out:f8
exaluate Expression:alt + f8
设置断点的条件?
如何改变变量的值?
如何调试非自己项目的代码?
三、其他操作
1、定位文件位置
1565919086931
点击这个,可以定位到文件在项目的位置
2、打开底部Terminal:alt+insert
四、git相关操作
-
查看代码是谁写的:annotate:
- 選中代碼 -> git -> annotate
- 在代码行处,右击选择“annotate”
- 選中代碼 -> git -> annotate
查看此次修改的内容:show diff:
ctrl + d
-
在github找到对应行
- > 当本机项目与github相连后,可以使用“open on github”,在github网页上找到该代码。
- > 当本机项目与github相连后,可以使用“open on github”,在github网页上找到该代码。