PsiExpression (PsiVariable array, int index) { if (index < 0) return null; PsiExpression[] elements = getConstantArrayElements(array); if (elements == null || index >= elements.length) return null; return elements[index]; }