@Override
  public void processIntention(@NotNull PsiElement element) throws IncorrectOperationException {
    final JSBinaryExpression exp = (JSBinaryExpression) element;
    final JSExpression lhs = exp.getLOperand();
    final JSExpression rhs = exp.getROperand();
    final IElementType sign = exp.getOperationSign();
    final String negatedOperator = ComparisonUtils.getNegatedOperatorText(sign);
    final String lhsText = lhs.getText();

    assert (rhs != null);

    JSElementFactory.replaceExpressionWithNegatedExpressionString(
        exp, lhsText + negatedOperator + rhs.getText());
  }
  @Override
  public void processIntention(@NotNull PsiElement element) throws IncorrectOperationException {
    final JSAssignmentExpression exp = (JSAssignmentExpression) element;
    final JSBinaryExpression rhs = (JSBinaryExpression) exp.getROperand();
    final JSExpression lhs = exp.getLOperand();

    assert (rhs != null);

    final IElementType sign = rhs.getOperationSign();
    final String operand = BinaryOperatorUtils.getOperatorText(sign);
    final JSExpression rhsrhs = rhs.getROperand();

    assert (rhsrhs != null);

    JSElementFactory.replaceExpression(exp, lhs.getText() + operand + '=' + rhsrhs.getText());
  }
  @Override
  protected void processIntention(@NotNull PsiElement element) throws IncorrectOperationException {
    if (!(element instanceof JSStatement)) {
      return;
    }
    final JSStatement statement = (JSStatement) element;
    final JSElement parent = (JSElement) element.getParent();
    final String text = element.getText();
    String newText;

    if (parent.getLastChild() instanceof PsiComment) {
      newText = '{' + text + "\n}";
    } else {
      newText = '{' + text + '}';
    }
    JSElementFactory.replaceStatement(statement, newText);
  }