PsiMember (@Nullable PsiElement psiElement) { if (psiElement instanceof PsiMember) { return (PsiMember)psiElement; } if (psiElement instanceof GrVariableDeclaration) { final GrMember[] members = ((GrVariableDeclaration)psiElement).getMembers(); if (members.length > 0) { return members[0]; } } return null; }