Bug 4360 Template - cursor at wrong position
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateProposal.java
private int fSelectionEnd;
	
	private CursorSelectionEvaluator fCursorSelectionEvaluator= new CursorSelectionEvaluator();
	private VariableEvaluator fLocalVariableEvaluator= new LocalVariableEvaluator();
	private TemplateInterpolator fInterpolator= new TemplateInterpolator();
	private ArgumentEvaluator fArgumentEvaluator;
	private ModelEvaluator fModelEvaluator= new ModelEvaluator();
	
	private boolean fDisposed;	
	/**
	 * Creates a template proposal with a template and the range of its key.
	 * @param template  the template
	 * @param arguments arguments to the template, or <code>null</code> for no arguments
	 * @param start     the starting position of the key.
	 * @param end       the ending position of the key (exclusive).
	 */	
	TemplateProposal(Template template, String[] arguments, TemplateContext context) {
		Assert.isNotNull(template);
		Assert.isNotNull(context);
		
		fTemplate= template;
		fArgumentEvaluator= new ArgumentEvaluator(arguments);
		fContext= context;
	}
	/**
	 * @see ICompletionProposal#apply(IDocument)
	 */
	public void apply(IDocument document) {
		int indentationLevel= guessIndentationLevel(document, fContext.getStart());
		String pattern= fTemplate.getPattern();