Project: JDT
Bug 3666 CodeCompletion - Hungry code assist (1GDRYW5)
Reported: 2001-10-10 22:58:52 | Status: verified fixed

jkca (5/15/2001 11:04:56 AM) jre-sdk 106 Under certain circumstances code assist eats too much code. Consider the enclosed class. As a programmer, I must add a parameter to the baz call in bar to make the program correct. Steps: 1. Change the baz call to baz(x.x.foo()) 2. Place the cursor after the first "x." 3. Ctrl-Space to bring up code assist 4. Type "f" to filter the list. 5. Select, "foo()" 6. The code is changed to: baz(x.foo().foo()) I would rather it gave me baz(x.foo()x.foo()) public class X { void bar(X x) { baz(x.foo()); } int foo() { return 5; } void baz(int i, int j) { } } KUM (5/21/01 9:02:11 AM) The text to replace is computed by the code assist infrastructure. Moved to ITPJCORE. PM (9/4/2001 2:58:56 PM) Option was added. PM (9/25/2001 2:20:50 PM) Removing option. UI can decide whether it wants to use the codeassist end position (until the end of current identifier) or the cursor location it used to start with, so as to control the amount of source to replace. The choice amongst one or the other should be conditioned by a keystroke (enter=replace until end, insert=replace until cursor location). Moving to ITPJUI. Removing codeassist option.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java