boolean (PsiExpression ref) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(ref.getParent()); return parent instanceof PsiReferenceExpression || parent instanceof PsiArrayAccessExpression || parent instanceof PsiSwitchStatement || parent instanceof PsiSynchronizedStatement; }