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
* @return  the currently active java editor, or <code>null</code>
	 */
	private JavaEditor getJavaEditor() {
		IEditorPart part= JavaPlugin.getActivePage().getActiveEditor();
		if (part instanceof JavaEditor)
			return (JavaEditor) part;
		else
			return null;
	}
	private static class LinkedModeProposal implements IJavaCompletionProposal, ICompletionProposalExtension2 {
		private String fProposal;
		private ITypeBinding fTypeProposal;
		private ICompilationUnit fCompilationUnit;
		
		private Set fPositions;
		public LinkedModeProposal(String proposal) {
			fProposal= proposal;
		}
		
		public LinkedModeProposal(ICompilationUnit unit, ITypeBinding typeProposal) {
			this(typeProposal.getName());
			fTypeProposal= typeProposal;
			fCompilationUnit= unit;
		}
	
		public void addPosition(Position position) {
			if (fPositions == null)
				fPositions= new HashSet();
			fPositions.add(position);
		}