Redirection Notice
For the reference provider to work, you need to override the getReferences() method on the PsiElement. This is mentioned in the header comment of com.intellij.psi.PsiReferenceProvider
@NotNull @Override public PsiReference[] getReferences()
Works for me without any changes.
Do I create a new class that derives from PsiElement and then override the getReferences() method? Do I then to register this somewhere?
3 Comments
Anonymous
For the reference provider to work, you need to override the getReferences() method on the PsiElement. This is mentioned in the header comment of com.intellij.psi.PsiReferenceProvider
@NotNull
@Override
public PsiReference[] getReferences()
Andrey Myatlyuk
Works for me without any changes.
Anonymous
Do I create a new class that derives from PsiElement and then override the getReferences() method? Do I then to register this somewhere?