if (block != fNodeForListRewrite) { fListRewrite= fRewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY); fNodeForListRewrite= block; }
fListRewrite= fRewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY);
	private void initializeInsertionPoint(int nos) {		fInsertionIndex= -1;		fNeedsStatement= false;		// if we have a constructor invocation the invocation itself is already a statement		ASTNode parentStatement= fInvocation instanceof Statement 			? fInvocation 			: ASTNodes.getParent(fInvocation, Statement.class);		ASTNode container= parentStatement.getParent();		int type= container.getNodeType();		if (type == ASTNode.BLOCK) { 			Block block= (Block)container;			if (block != fNodeForListRewrite) {				fListRewrite= fRewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY);				fNodeForListRewrite= block;			}			fInsertionIndex= fListRewrite.getRewrittenList().indexOf(parentStatement);		} else if (type == ASTNode.SWITCH_STATEMENT) {			SwitchStatement switchStatement= (SwitchStatement)container;			if (switchStatement != fNodeForListRewrite) {				fListRewrite= fRewrite.getListRewrite(switchStatement, SwitchStatement.STATEMENTS_PROPERTY);				fNodeForListRewrite= switchStatement;			}			fInsertionIndex= fListRewrite.getRewrittenList().indexOf(parentStatement);		} else if (isControlStatement(container)) {			fNeedsStatement= true;			if (nos > 1) {				Block block= fInvocation.getAST().newBlock();				fInsertionIndex= 0;				Statement currentStatement= null;				switch(type) {					case ASTNode.FOR_STATEMENT:						currentStatement= ((ForStatement)container).getBody();						break;					case ASTNode.ENHANCED_FOR_STATEMENT:						currentStatement= ((EnhancedForStatement)container).getBody();						break;					case ASTNode.WHILE_STATEMENT:						currentStatement= ((WhileStatement)container).getBody();						break;					case ASTNode.DO_STATEMENT:						currentStatement= ((DoStatement)container).getBody();						break;					case ASTNode.IF_STATEMENT:						IfStatement node= (IfStatement)container;						Statement thenPart= node.getThenStatement();						if (fTargetNode == thenPart || ASTNodes.isParent(fTargetNode, thenPart)) {							currentStatement= thenPart;						} else {							currentStatement= node.getElseStatement();						}						break;				}				Assert.isNotNull(currentStatement);				fRewrite.replace(currentStatement, block, null);				fListRewrite= fRewrite.getListRewrite(block, Block.STATEMENTS_PROPERTY);				fNodeForListRewrite= block;				// The method to be inlined is not the body of the control statement.				if (currentStatement != fTargetNode) {					fListRewrite.insertLast(fRewrite.createCopyTarget(currentStatement), null);				} else {					// We can't replace a copy with something else. So we					// have to insert all statements to be inlined.					fTargetNode= null;				}			}		}		// We only insert one new statement or we delete the existing call. 		// So there is no need to have an insertion index.	}