Upon analysis, IntelliJ finds unused methods, but i need to be in the class in question. Additionally the only way i find about is by scrolling through the code to find a method with greyed out name.
Is there a way one can run a search across project to find unused methods?
Additionally, if A calls B and A is unused, is it possible to mark B as unused as well, as part of a single search?
You can do this through “Inspect Code”.
Go to Analyze -> Inspect Code, select the default project, and allow it to run. You’ll get a result set similar to this.
This is a dummy project I use for formatting code and experimenting with questions asked on SO. I had completely forgotten that I had a
StackOverflowclass here, but the inspection found that it was unused after all.