Can IDEA do this?

A

Aleksi Kallio

I have been told that IntelliJ IDEA can detect unused public methods.
However I can't find such a feature from Analyzer -> Inspect Code.

Is it just confusingly named or do you need some plugin for that?

Of course such a search is just a heuristic, as reflection and usage
outside of searched code can't be detected, but it's not an issue.

I'm using version 5.1.2.
 
C

Christopher Benson-Manica

Aleksi Kallio said:
I have been told that IntelliJ IDEA can detect unused public methods.
However I can't find such a feature from Analyzer -> Inspect Code.
Is it just confusingly named or do you need some plugin for that?

Have you tried "unused declaration"? (I'm using the 6 Beta FWIW) I
don't know that it detects unused *public* methods, though.
 
A

Aleksi Kallio

I have been told that IntelliJ IDEA can detect unused public methods.
Have you tried "unused declaration"? (I'm using the 6 Beta FWIW) I
don't know that it detects unused *public* methods, though.

Is it in the "Declaration redundancy" category? I don't have it there,
maybe I should try beta 6.

There is "Declaration access can be weaker" which reports when public
methods could be package local, protected or private, but not when they
could be removed completely.
 
A

Aleksi Kallio

Have you tried "unused declaration"? (I'm using the 6 Beta FWIW) I
Is it in the "Declaration redundancy" category? I don't have it there,
maybe I should try beta 6.

Oh, it was under "General". It did the trick, thanks for your help!

It's strange how such a useful tool as this is so hard to find...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top