Bug 49485 Extra carriage return required after auto-completion of brackets
When typing in a statement such as for(), when completion is enabled (so that the closing bracket is added automatically), an extra carriage return keystroke is sometimes required. For example, type the following: for( Eclipse adds the closing bracket to complete the statement, and leaves the caret between the two brackets. If you then cursor-right, to place the caret at the end of the statement and press Enter (carriage return), nothing happens. The caret does not move, and no new line is created. If, instead of cursor-right, you type the closing bracket youself (overwriting the one Eclipse added) and press Enter (carriage-return), then a new line is created and the caret moves to it as you would expect. When typing in a hurry, this is a real nuisance! I don't know which Java preferences are relevant to help to reproduce this, but for reference, the Java|Editor|Typing preferences are all checked. Please ask if you need more info. This occurs in Eclipse M6
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedUIControl.java
* @param target the target where the exit position is located
	 * @param offset the offset of the exit position
	 * @param length the length of the exit position (in case there should be a
	 *        selection)
	 * @param sequence set to the tab stop position of the exit position, or 
	 * 		  <code>LinkedPositionGroup.NO_STOP</code> if there should be no tab stop.
	 * @throws BadLocationException if the position is not valid in the
	 *         viewer's document
	 */
	public void setExitPosition(LinkedUITarget target, int offset, int length, int sequence) throws BadLocationException {
		
		if (fExitPosition != null) {
			fExitPosition.getDocument().removePosition(fExitPosition);
			fIterator.removePosition(fExitPosition);
			fExitPosition= null;
		}
		IDocument doc= target.getViewer().getDocument();
		if (doc == null)
			return;
		
		fExitPosition= new LinkedPosition(doc, offset, length, sequence);
		doc.addPosition(fExitPosition); 
		if (sequence != LinkedPositionGroup.NO_STOP)
			fIterator.addPosition(fExitPosition);
	}
	/**
	 * Sets the exit position to move the caret to when linked mode is exited.
	 * 
	 * @param viewer the viewer where the exit position is located
	 * @param offset the offset of the exit position