[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: How to find non-referenced methods in Eclipse?

Robert Klemme wrote:
"Johann Uhrmann" <johann.uhrmann@xxxxxxxxxx> schrieb im Newsbeitrag
news:bbetip$tn$1@xxxxxxxxxxxxxxxx

Hi,

is there a plug-in or a built-in functionality in Eclipse
that allows to search for methods and public members that
are not referenced in the whole work space?

It would be nice to detect methods that are no longer used.


There's a warning for unused private methods.  I'm not sure whether what
you want can be properly done: How should this module know that you are
not building a library and in fact many public methods are not called in
the library code?  Maybe it's worth a feature request to expand this
warning to package visible methods.  But that might be as far as
automation could get.

If you want to know it for a single method just rename it and watch the
compiler errors.

    robert


there is also dynamic method invocation using reflection. but most users do not right libraries or use reflection so it make sense to have such warning as an option. i believe there are tools like lint for java that might give you just this, but i could not name anything off my hat.


oleg