PsiExpression (@Nullable PsiExpression indexExpression) { if (indexExpression != null) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(indexExpression.getParent()); if (parent instanceof PsiExpression && PsiTreeUtil.isAncestor(extractIndexFromGetExpression((PsiExpression)parent), indexExpression, false)) { return (PsiExpression)parent; } } return null; }