PsiSubstitutor (PsiElement originalElement) { PsiSubstitutor substitutor = PsiSubstitutor.EMPTY; if (originalElement instanceof GrReferenceExpression) { substitutor = ((GrReferenceExpression)originalElement).advancedResolve().getSubstitutor(); } return substitutor; }