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/ConvertIterableLoopProposal.java
return (MethodInvocation) rewrite.createMoveTarget(fExpression);
		return (Expression) ASTNode.copySubtree(rewrite.getAST(), fExpression);
	}
	/**
	 * Returns the iterable type from the iterator type binding.
	 * 
	 * @param iterator the iterator type binding, or <code>null</code>
	 * @return the iterable type
	 */
	private ITypeBinding getIterableType(final ITypeBinding iterator) {
		if (iterator != null) {
			final ITypeBinding[] bindings= iterator.getTypeArguments();
			if (bindings.length > 0)
				return bindings[0];
		}
		return fRoot.getAST().resolveWellKnownType("java.lang.Object"); 
	}
	private ITrackedNodePosition rewriteAST(final AST ast, final ASTRewrite astRewrite, final NewImportRewrite importRewrite, final TextEditGroup group) throws CoreException {
		final ImportRemover remover= new ImportRemover(fCompilationUnit.getJavaProject(), (CompilationUnit) fStatement.getRoot());
		
		final EnhancedForStatement statement= ast.newEnhancedForStatement();
		final List names= computeElementNames();
		String name= fIdentifierName;
		if (fElement != null) {
			name= fElement.getName();
			if (!names.contains(name))
				names.add(0, name);
		} else {
			if (!names.isEmpty())
				name= (String) names.get(0);