如何找到Intellij Idea中所有未使用的类? [英] How find all unused classes in Intellij Idea?
本文介绍了如何找到Intellij Idea中所有未使用的类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个检查未使用的声明,它可以找到Intellij Idea中所有未使用的代码。 (参见这个问题)
但我想找到所有未使用的类,不方法,变量等仅类。 (很难找到3000个结果列表中的类)。我怎么做?
There is an inspection "Unused declaration" which can find all unused code in Intellij Idea. (see this question) But I want to find all unused classes, not methods, variables etc. Only classes. (it is difficult to find only classes in 3000 result list). How I can do that?
推荐答案
- 按 Ctrl + Shift + A
- 输入unused declar
- 点击未使用的声明上的双倍
- Press Ctrl+Shift+A
- Enter "unused declar"
- Click double on "Unused declaration"
- 点击Java /声明冗余/未使用声明
- 在右下角选择动态编辑器设置
- 取消勾选检查字段,...,检查参数。只勾选支票类。
- 按确定
- Click on Java/Declaration redundancy/Unused declaration
- on the right bottom select "On the fly editor settings"
- untick check fields, ..., check parameters. Only Check Classes should be ticked.
- Press OK
- 在菜单栏上单击按名称分析/运行检查(或 Ctrl + Alt + Shift + I )
- 插入文本未使用的声明
- 选择未使用的声明Java |声明冗余
- On menu bar click on Analyze / Run Inspection by Name (or Ctrl+Alt+Shift+I)
- Insert text "Unused decla"
- Select "Unused declaration Java|Declaration redundancy"
- 在完成时检查Idea底部的工作状态:享受结果和清理混乱代码的伟大感觉。 :)
设置会弹出
收到的关闭
搜索开始
这篇关于如何找到Intellij Idea中所有未使用的类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文