intellij idea 的 find usage 功能可以查找:
- Fields, variables and parameters
- Classes, tags, attributes, and references in the HTML, XML, and CSS files
- Symbols at caret
- Elements of *.gsp files in the Grails views
查找配置对话框
1. “skip result tab with one usage”选项的作用是如果查到到的结果只有一个,那么就跳过结果 tab 显示,直接在编辑器中跳转到 usage 位置
2. Scope 是选择搜索范围,可以直接从下拉列表中选择欲定义的范围,也可以通过 … 按钮自定义范围
3. Open in new tab 如果选中会把搜索结果以新的 tab 显示,如果没有选中会把搜索结果显示到当前 tab 中
查找工具窗口
查找工具窗口常用按钮
对查找结果进行分组的按钮:
1. 按照使用类型分组
2. 按照测试/产品分组
3. 按照 module 分组
4. 按照 package 分组
5. 按照文件结构分组
6. show 读
7. show 写
8. 按照a-z排序
9. 源码自动跟随滚动
10. 在文本文件中打开查找结果
查找结果使用类型分类
使用类型包含:
- instanceof 类型判断
- import 导包
- cast target type 强制类型转换
- extends/implements clause 基础类或者实现接口
- .class
- field declaration 字段声明
- local variable declaration 局部变量声明
- method parameter declaration 方法参数声明
- catch clause parameter declaration catch 类型参数声明
- method return type 方法返回值类型
- delegates to another object instance 代理
- delegates to another object instance with different parameters
- delegates to super
- delegates to super with different parameters
- recursive method calls 递归的方法调用
- string constants 字符串常量
- comments 注释
- unclassified usage not related to any of the categories 其他未分类