boolean (PsiNewExpression newExpression) { final PsiExpressionStatement expressionStatement = PsiTreeUtil.getParentOfType(newExpression, PsiExpressionStatement.class); if (expressionStatement != null) { final PsiExpression expression = expressionStatement.getExpression(); if (JavaPsiConstructorUtil.isConstructorCall(expression)) { return true; } } return false; }