public static @Nullable PsiReferenceExpression findReferenceExpression(Editor editor) {
    final PsiReference ref = TargetElementUtil.findReference(editor);
    return ref instanceof PsiReferenceExpression ? (PsiReferenceExpression)ref : null;
  }
public static @Nullable PsiReferenceExpression findReferenceExpression(Editor editor)