Community
Participate
Working Groups
Using I got this weird problem with code completion. 1) Use the following test case: public class X { static class Y { public boolean foo2(String s) { return true; } public boolean foo2(Number n) { return true; } } public static void main(String[] args) { Y y = new Y() { // code assist here }; } } 2) remove the comment with "code assist here and do Ctrl + Space at this location 3) Once you have all the completion proposals, type "foo2(N". This leaves only foo2(Number) in the list of proposals. Try to apply it, it won't work. Two issues: 1) If autoinsertion of ')' is set, then the completion doesn't do anything 2) If it is disabled, then you end up with: public boolean foo2(Number n) {}; which doesn't compile. If the completion is done after typing only: foo2 and selecting "foo2(Number), then it works as expected.
I forgot the build id: I20100323-0800
*** Bug 312194 has been marked as a duplicate of this bug. ***
*** Bug 411483 has been marked as a duplicate of this bug. ***
*** Bug 444383 has been marked as a duplicate of this bug. ***
*** Bug 481847 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/68144
New Gerrit change created: https://git.eclipse.org/r/68145
(In reply to Eclipse Genie from comment #6) > New Gerrit change created: https://git.eclipse.org/r/68144 Abandoned. (In reply to Eclipse Genie from comment #7) > New Gerrit change created: https://git.eclipse.org/r/68145 Updated to use ICompletionListener#selectionChanged(..).
Looks good, but I didn't test it. I assume you've verified that ContentAssistProcessor#fSelectedProposal doesn't leak proposals. Please add some explanation for the surprising code in CompilationUnitEditor, and include a link to this bug. OK to release after that.
Gerrit change https://git.eclipse.org/r/68145 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=952b1385d4738d93b7130a2cc958df049eec6493
Thanks, Markus. (In reply to Markus Keller from comment #9) > Looks good, but I didn't test it. I assume you've verified that > ContentAssistProcessor#fSelectedProposal doesn't leak proposals. Yes, the proposal is not stored anywhere and fSelectedProposal is set to null when content assist session ends. > Please add some explanation for the surprising code in > CompilationUnitEditor, and include a link to this bug. OK to release after > that. Done.