Q1/ Given a PsiMember (field, method, class), how can I obtain all the
references to it?
Q2/ Is it - Q1 - the most efficient way to locate fields/methods/classes
that are annotated with "@TestOnly", but are only used by test code?
I've created a @TestOnly annotation, to tag fields/methods/classes that
can only be accessed by test code (== code in test source tree).
I want to create an inspection that locates all the f/m/c that are not
yet annotated but could be, because they are only used by test code).
In the IG code I found the VariableAccessVisitor, that works the other
way around by counting accesses in a map, but it looks less efficient
for my purpose (because of the hashCode() usage and the big structure
building). Am I wrong, on this last assumption?