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
private static final IPositionUpdater fgUpdater= new DefaultPositionUpdater(CARET_POSITION);
	
	private final ITextViewer fViewer;
	private final LinkedPositionManager fManager;	
	private final Color fFrameColor;
	private int fFinalCaretOffset= -1; 
	private Position fFramePosition;
	private int fCaretOffset;
	
	private ExitListener fExitListener;
	
	/**
	 * Creates a user interface for <code>LinkedPositionManager</code>.
	 * 
	 * @param viewer  the text viewer.
	 * @param manager the <code>LinkedPositionManager</code> managing a <code>IDocument</code> of the <code>ITextViewer</code>.
	 */
	public LinkedPositionUI(ITextViewer viewer, LinkedPositionManager manager) {
		Assert.isNotNull(viewer);
		Assert.isNotNull(manager);
		
		fViewer= viewer;
		fManager= manager;
		
		fManager.setLinkedPositionListener(this);
		fFrameColor= viewer.getTextWidget().getDisplay().getSystemColor(SWT.COLOR_RED);
	}
	
	/**
	 * Sets the final position of the caret when the linked mode is exited