boolean (PsiElement element) { if (PsiUtil.isExpressionStatement(element) && element instanceof GrExpression) { if (!PsiTypes.voidType().equals(((GrExpression)element).getType())) { if (PsiTreeUtil.getParentOfType(element, GrAssignmentExpression.class) == null) { return true; } } } return false; }