I used the methods, getReference() and getReferences() of PsiElement, but they won't return any reference for any of the elements. (tested: PsiClass, PsiIdentifier, PsiMethod, PsiField).
Also I tried ReferencesSearch for the PsiIdentifier but I get empty array.
So, what is the proper way to get the usages of a e.g. local variable?
(I want to do some refactoring on the name of variable/class/...)