Bug 67614 After "create field", additional text is inserted at multiple locations
I wrote the following method call: assertEquals(1.0d, blah(), delta); The field "delta" is not yet declared. I press Ctrl-1 and select "create field". The resulting line is: private Object delta; By typing the following sequence of keys: [Tab] double [Tab] [Right] = 0.0001d I change that manually to: private double delta = 0.00001d; Surprisingly, my original method call is now changed to: assertEquals(1.0d, blah(), delta = 0.00001d); And that is of course wrong. (BTW, I believe that the Ctrl-1 aid should guess the expected field type, but that's a different issue.)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LinkedCorrectionProposal.java
* Sets the end position of the linked mode to the end of the passed range.
	 * @param position The position that describes the end position of the linked mode.
	 */
	public void setEndPosition(ITrackedNodePosition position) {
		fSelectionDescription= position;
	}
	
	/**
	 * Adds a linked position proposal to the group with the given id.
	 * @param groupID The id of the group that should present the proposal
	 * @param proposal The string to propose.
	 * @param image The image to show for the position proposal or <code>null</code> if
	 * no image is desired.
	 */
	public void addLinkedPositionProposal(String groupID, String proposal, Image image) {
		addLinkedPositionProposal(groupID, new LinkedModeProposal(proposal));
	}
	
	/**
	 * Adds a linked position proposal to the group with the given id.
	 * @param groupID The id of the group that should present the proposal
	 * @param proposal The binding to use as type name proposal.
	 */
	public void addLinkedPositionProposal(String groupID, ITypeBinding proposal) {
		addLinkedPositionProposal(groupID, new LinkedModeProposal(getCompilationUnit(), proposal));
	}	
	
	/**
	 * Adds a linked position proposal to the group with the given id.
	 * @param groupID The id of the group that should present the proposal