Bug 10247 Template - code assist ends template editing
Build > 20020214.1 Create the following class import java.util.List; public class T { public List getList() { return null; } public void foo() { T t= null; for <= code assist } } - select for - iterate over collection - press tab - type t.get <= code assist - select getList observe: template editing gets ended.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalResultCollector.java
return original;
	
		int count= parameterNames.length;
		int[] offsets= new int[count];
		int[] lengths= new int[count];
		StringBuffer buffer= new StringBuffer();	
		buffer.append(name);
		buffer.append('(');
		for (int i= 0; i != count; i++) {
			if (i != 0)
				buffer.append(", ");
				
			offsets[i]= buffer.length();
			buffer.append(parameterNames[i]);
			lengths[i]= buffer.length() - offsets[i];
		}
		buffer.append(')');
		
		return new ExperimentalProposal(buffer.toString(), start, end - start, original.getImage(),
			original.getDisplayString(), offsets, lengths, fViewer);
	}
	/**
	 * Sets the viewer.
	 * @param viewer The viewer to set
	 */
	public void setViewer(ITextViewer viewer) {
		fViewer= viewer;
	}
}