When IDEA has the following code:
final public static String unused="";
It will show "unused" in grey with a squiggle underscore and a tooltip that say "Field 'unused' is never used".
However this code:
enum MyEnum{
UNUSED
}
does not show the squiggle. I can run Analyze|Inspect Code to get an "Unused declaration" message in the "Inspection Results".
Is there a way to make IDEA find the unused fields of an enum automatically when opening the code in the editor?
As said in here go to Settings
|search for unused declaration
and under Java
click on that. On the right, there are all available things you can do with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With