PsiReference type resolve

Hi,
i'm using ReferenceSearch to search for references of a PsiField
let say i'm only interested in assignments

how do i figure out the expression type (i.e. PsiAssignmentExpression) from the PsiReference i get ?

1 comment
Comment actions Permalink

Hello Aviram,

i'm using ReferenceSearch to search for references of a PsiField
let say i'm only interested in assignments
how do i figure out the expression type (i.e. PsiAssignmentExpression)
from the PsiReference i get ?


PsiTreeUtil.getParentOfType(psiReference.getElement(), PsiAssignmentExpression.class)

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.