boolean (@NotNull PsiElement e) { e = adjustElementToTheLeft(e); final PsiElement parent = e.getParent(); if (e instanceof PsiExpression){ if (parent instanceof PsiExpressionList) { return true; } if (e instanceof PsiReferenceExpression && parent instanceof PsiCallExpression) { final PsiExpressionList argumentList = ((PsiCall)parent).getArgumentList(); if (argumentList != null && argumentList.getExpressionCount() == 1) { return true; } } } else if (e instanceof PsiJavaCodeReferenceElement) { if (parent instanceof PsiCall) { final PsiExpressionList argumentList = ((PsiCall)parent).getArgumentList(); if (argumentList != null && argumentList.getExpressionCount() == 1) { return true; } } } return false; }