boolean (@NotNull Project project, Editor editor, @NotNull PsiElement element) { if (element instanceof SyntheticElement){ return false; } if (getTypeOfUnfilledParameter(editor, element) != null) return true; final PsiExpression expression = detectExpressionStatement(element); if (expression == null) { return false; } if (expression.getParent() instanceof PsiExpressionStatement) { if (!PsiUtil.isStatement(expression.getParent()) || expression.getParent().getLastChild() instanceof PsiErrorElement && editor.getCaretModel().getOffset() == expression.getParent().getTextRange().getEndOffset()) { // Same action is available as an error quick-fix return false; } } final PsiType expressionType = expression.getType(); return expressionType != null && !PsiTypes.voidType().equals(expressionType) && !(expression instanceof PsiAssignmentExpression); }