Bug 119923 [clean up][infrastructure] ConvertForLoop should use ContextSensitiveImportRewriteContext
Version: 3.2.0 Build id: I20051206-1200
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ConvertForLoopProposal.java
if (ASTNodes.findModifierNode(Modifier.FINAL, declarationStatement.modifiers()) != null) {
			ModifierRewrite.create(rewrite, fParameterDeclaration).setModifiers(Modifier.FINAL, Modifier.NONE, group);
		}
		
		LocalOccurencesFinder finder2= new LocalOccurencesFinder(theTempVariable.resolveBinding(), fOldForStatement.getBody());
		finder2.perform();
		List occurences2= finder2.getOccurences();
		linkAllReferences(rewrite, occurences2);
		rewrite.replace(declarationStatement, null, group);
		return;
	}
	private void linkAllReferences(ASTRewrite rewrite, List occurences) {
		for (Iterator iter= occurences.iterator(); iter.hasNext();) {
			ASTNode variableRef= (ASTNode)iter.next();
			getPositionGroup(fParameterName).addPosition(rewrite.track(variableRef));
		}
	}
	private void replaceMultipleOccurences(ASTRewrite rewrite, List occurences, TextEditGroup group) {
		for (Iterator iter= occurences.iterator(); iter.hasNext();) {
			ASTNode element= (ASTNode)iter.next();
			ArrayAccess arrayAccess= element instanceof ArrayAccess ? (ArrayAccess)element : (ArrayAccess)ASTNodes.getParent(
				element, ArrayAccess.class);
			if (arrayAccess != null) {
				SimpleName elementReference= fAst.newSimpleName(fParameterDeclaration.getName().getIdentifier());
				rewrite.replace(arrayAccess, elementReference, group);
				getPositionGroup(fParameterName).addPosition(rewrite.track(elementReference));
			}
		}
	}
	private void doInferElement(NewImportRewrite importRewrite) throws CoreException {