rewrite.markAsRemoved((ASTNode) parameters.get(0)); rewrite.markAsRemoved((ASTNode) parameters.get(1)); rewrite.markAsRemoved((ASTNode) parameters.get(2));
rewrite.markAsRemoved((ASTNode) parameters.get(0), null); rewrite.markAsRemoved((ASTNode) parameters.get(1), null); rewrite.markAsRemoved((ASTNode) parameters.get(2), null);
	public void testListCombination() throws Exception {		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);		StringBuffer buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public abstract class E {\n");		buf.append("    public E(int p1, int p2, int p3) {}\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();		TypeDeclaration type= findTypeDeclaration(astRoot, "E");				{ // delete all and insert after & insert 2 exceptions			MethodDeclaration methodDecl= findMethodDeclaration(type, "E");			List parameters= methodDecl.parameters();			assertTrue("must be 3 parameters", parameters.size() == 3);					rewrite.markAsRemoved((ASTNode) parameters.get(0));			rewrite.markAsRemoved((ASTNode) parameters.get(1));			rewrite.markAsRemoved((ASTNode) parameters.get(2));			SingleVariableDeclaration newParam= createNewParam(ast, "m");			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam, null);			List thrownExceptions= methodDecl.thrownExceptions();			assertTrue("must be 0 thrown exceptions", thrownExceptions.size() == 0);						Name newThrownException1= ast.newSimpleName("InterruptedException");			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException1, null);						Name newThrownException2= ast.newSimpleName("ArrayStoreException");			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);					}		String preview= evaluateRewrite(cu, rewrite);				buf= new StringBuffer();		buf.append("package test1;\n");		buf.append("public abstract class E {\n");		buf.append("    public E(float m) throws InterruptedException, ArrayStoreException {}\n");		buf.append("}\n");						assertEqualString(preview, buf.toString());	}