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/link/LinkedPositionUI.java
if (!includes(region, fFramePosition)) {
		 	leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
		 	return;		    
		}
		int offset= fFramePosition.getOffset() -  region.getOffset();
		int length= fFramePosition.getLength();
		fViewer.getTextWidget().redrawRange(offset, length, true);
	}
	private void selectRegion() {
		IRegion region= fViewer.getVisibleRegion();
		if (!includes(region, fFramePosition)) {
		 	leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
		 	return;   
		}
		int start= fFramePosition.getOffset() - region.getOffset();
		int end= fFramePosition.getLength() + start;	
		fViewer.getTextWidget().setSelection(start, end);		
	}
	private void updateCaret() {
		IRegion region= fViewer.getVisibleRegion();		
		if (!includes(region, fFramePosition)) {
		 	leave(UNINSTALL | COMMIT | DOCUMENT_CHANGED);
		 	return;   
		}
		int offset= fFramePosition.getOffset() + fCaretOffset - region.getOffset();
		
		if ((offset >= 0) && (offset <= region.getLength()))	
			fViewer.getTextWidget().setCaretOffset(offset);
	}