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
}
	/**
	 * Returns the cursor selection, after having entered the linked mode.
	 * <code>enter()</code> must be called prior to a call to this method.
	 */
	public IRegion getSelectedRegion() {
		if (fFramePosition == null)
			return new Region(fFinalCaretOffset, 0);
		else
			return new Region(fFramePosition.getOffset(), fFramePosition.getLength());
	}
	
	private void leave(int flags) {
		if ((flags & UNINSTALL) != 0)
			fManager.uninstall((flags & COMMIT) != 0);
		
		StyledText text= fViewer.getTextWidget();	
		text.removePaintListener(this);
		text.removeModifyListener(this);
		text.removeVerifyKeyListener(this);
		text.removeVerifyListener(this);
		fViewer.removeTextInputListener(this);
		
		try {
			IRegion region= fViewer.getVisibleRegion();
			IDocument document= fViewer.getDocument();
			if (((flags & COMMIT) != 0) &&
				((flags & DOCUMENT_CHANGED) == 0) &&
				((flags & UPDATE_CARET) != 0))
			{