boolean (@Nullable PsiElement parent) { if (parent instanceof PsiLocalVariable) { return ((PsiLocalVariable)parent).getTypeElement().isInferredType(); } return parent instanceof PsiExpressionStatement && !(parent.getParent() instanceof PsiSwitchLabeledRuleStatement); }