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
else return inferIndexBinding();
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.corext.fix.LinkedFix.ILinkedFixRewriteOperation#rewriteAST(org.eclipse.jdt.core.dom.rewrite.ASTRewrite, org.eclipse.jdt.internal.corext.codemanipulation.ImportRewrite, org.eclipse.jdt.core.dom.CompilationUnit, java.util.List, org.eclipse.jdt.internal.corext.fix.LinkedFix.IPositionLinkable)
	 */
	public ITrackedNodePosition rewriteAST(ASTRewrite rewrite, NewImportRewrite importRewrite, CompilationUnit compilationUnit, List textEditGroups, List positionGroups) throws CoreException {
		TextEditGroup group= new TextEditGroup(FixMessages.Java50Fix_ConvertToEnhancedForLoop_description);
		textEditGroups.add(group);
		fPositionGroups= new Hashtable();
		ITrackedNodePosition endPosition= doConvert(rewrite, importRewrite, group);
		positionGroups.addAll(fPositionGroups.values());
		return endPosition;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.corext.fix.AbstractFix.FixRewriteAdapter#rewriteAST(org.eclipse.jdt.core.dom.rewrite.ASTRewrite, org.eclipse.jdt.internal.corext.codemanipulation.ImportRewrite, org.eclipse.jdt.core.dom.CompilationUnit, java.util.List)
	 */
	public void rewriteAST(ASTRewrite rewrite, NewImportRewrite importRewrite, CompilationUnit compilationUnit, List textEditGroups) throws CoreException {
		rewriteAST(rewrite, importRewrite, compilationUnit, textEditGroups, new ArrayList());
	}
	
	private Hashtable fPositionGroups;
	
	private PositionGroup getPositionGroup(String parameterName) {
		if (!fPositionGroups.containsKey(parameterName)) {
			fPositionGroups.put(parameterName, new PositionGroup(parameterName));
		}
		return (PositionGroup)fPositionGroups.get(parameterName);
	}
}