Community
Participate
Working Groups
I don't have a minimal case for reproducing this (yet), but I'll report it anyway: Given the following line with the cursor marked as "|": private IPreferenceChangeListener listener = new IPre| I use Ctrl-Space and the first code completion suggestion is to create a new anonymous inner type. Selecting that first suggestion yields the following: private IPreferenceChangeListener listener = new IPreferenceChangeListener() { public void preferenceChange(PreferenceChangeEvent event) { // TODO Auto-generated method stub } };|;; Again, the cursor is marked using "|" - it's after the first semicolon but there are two more semicolons that don't belong there. Also, I would expect the cursor to be in the empty line after the TODO tag. Seems to be sensitive to in which compilation unit you do this - I tried reproducing with a minimal project but couldn't.
Ayush, Please follow up - (Move to JDT/UI if needed.)
Doesnt look like a problem in the JDT core side. The proposals are correctly generated and collected by the UI. The selected proposal is inserted from org.eclipse.jdt.internal.ui.text.java.AnonymousTypeCompletionProposal.createNewBody(ImportRewrite). Move to JDT/UI for comment
Content assist in the UI is JDT Text.
*** This bug has been marked as a duplicate of bug 280801 ***