Eclipse semicolon inserted before cursor when typing full line not using content assist
This behavior is dring me batty.
I type the following:
fileName.append(c.get(Calendar.HOUR_OF_DAY))
Now when I typed that the content assist poped up. I did not pick HOUR_OF_DAY from the content assist nor did I press enter to fill it in automatically. I just typed "HOUR_OF_DAY". I typed both end parens ")" at the end of line too, I did not press tab.
My cursor is now at the end of the line and I type ;
Eclipse inserts the ; AFTER the cursor! So when I press enter, the semicolon moves to the next line!
I've tried everything I can think of in the preferences. I turned on "auto smeicolon" option that is supposed to place semicolons at the end of the line automatically but it doesn't fix this.
One clue: if I press "ENTER" before typing ";" at the end of the line, the content assist window goes away and the ; is inserted properly with the cursor now afte the ;. So content assist is messing with me.
Any help is appreci开发者_StackOverflow社区ated.
Go to Window -> Preferences -> Java -> Editor -> Typing and uncheck Semicolons in the Automatically insert at correct position group.
Yeah I just started seeing this exact behavior after changing some of my preferences, I switched them back and the behavior went back to normal.
Preferences > Java > Editor > Content Assist:
These settings are the default and do not produce the bad behavior you describe.
When I was seeing the unwanted behavior, I had the delay set to 50ms and the auto activation triggers set to ".(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
"
精彩评论