rewrite.markAsReplaced(expr, InfixExpression.OPERATOR_PROPERTY, InfixExpression.Operator.MINUS, null);
rewrite.set(expr, InfixExpression.OPERATOR_PROPERTY, InfixExpression.Operator.MINUS, null);
	public void testInfixExpression() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    public void foo() {\n");		buf.append("        i= 1 + 2;\n");		buf.append("        j= 1 + 2 + 3 + 4 + 5;\n");		buf.append("        k= 1 + 2 + 3 + 4 + 5;\n");				buf.append("    }\n");		buf.append("}\n");			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);				CompilationUnit astRoot= createAST(cu);		NewASTRewrite rewrite= new NewASTRewrite(astRoot.getAST());				AST ast= astRoot.getAST();				assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);		TypeDeclaration type= findTypeDeclaration(astRoot, "E");		MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");		Block block= methodDecl.getBody();		List statements= block.statements();		assertTrue("Number of statements not 3", statements.size() == 3);		{ // change left side & right side & operand			ExpressionStatement stmt= (ExpressionStatement) statements.get(0);			Assignment assignment= (Assignment) stmt.getExpression();			InfixExpression expr= (InfixExpression) assignment.getRightHandSide();						SimpleName leftOp= ast.newSimpleName("k");			rewrite.markAsReplaced(expr.getLeftOperand(), leftOp);				SimpleName rightOp= ast.newSimpleName("j");			rewrite.markAsReplaced(expr.getRightOperand(), rightOp);							// change operand			rewrite.markAsReplaced(expr, InfixExpression.OPERATOR_PROPERTY, InfixExpression.Operator.MINUS, null);		}				{ // remove an ext. operand, add one and replace one			ExpressionStatement stmt= (ExpressionStatement) statements.get(1);			Assignment assignment= (Assignment) stmt.getExpression();			InfixExpression expr= (InfixExpression) assignment.getRightHandSide();						List extendedOperands= expr.extendedOperands();			assertTrue("Number of extendedOperands not 3", extendedOperands.size() == 3);						rewrite.markAsRemoved((ASTNode) extendedOperands.get(0));						SimpleName newOp1= ast.newSimpleName("k");			rewrite.markAsReplaced((ASTNode) extendedOperands.get(1), newOp1);						SimpleName newOp2= ast.newSimpleName("n");			rewrite.getListRewrite(expr, InfixExpression.EXTENDED_OPERANDS_PROPERTY).insertLast(newOp2, null);		}				{ // change operand			ExpressionStatement stmt= (ExpressionStatement) statements.get(2);			Assignment assignment= (Assignment) stmt.getExpression();			InfixExpression expr= (InfixExpression) assignment.getRightHandSide();									rewrite.markAsReplaced(expr, InfixExpression.OPERATOR_PROPERTY, InfixExpression.Operator.TIMES, null);		}								String preview= evaluateRewrite(cu, rewrite);				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public class E {\n");		buf.append("    public void foo() {\n");		buf.append("        i= k - j;\n");		buf.append("        j= 1 + 2 + k + 5 + n;\n");		buf.append("        k= 1 * 2 * 3 * 4 * 5;\n");				buf.append("    }\n");		buf.append("}\n");			assertEqualString(preview, buf.toString());			}