Not finding unused references
I have an enumerator class in which I define a number of objects as follows * public static final RuntimeMsgCode VSJTEXTFIELD1 = new RuntimeMsgCode(
_VSJTEXTFIELD1);*
The issues is that this was a migration from an old code base and a number of these references are now unused. If I do a find usages ]]> it comes back with no usages found. My question is, is there an easier way to find all unused attributes other than one at a time as I have hunderds of them to check
请先登录再写评论。
tony lodge wrote:
> My question is, is there an
IDEA has an "Unused Declaration" inspection which should find these
problems.
Bas
I have tried that and it did not report any problems, I do not know if it has something to do with the fact the object is static
tony lodge wrote:
It works for me, even with static objects. Are your declarations part of
inner classes? I believe there could be some problems there. Also note
that "Unused Declaration" does not highlight items in the editor, you
need to "Analyze > Inspect Code".
Bas