Eclipse semicolon inserted before cursor when entering a full line without using supporting information

This behavior betrays me.

I type the following:
fileName.append(c.get(Calendar.HOUR_OF_DAY))

Now that I have typed that contextual advertising has surfaced. I did not select HOUR_OF_DAY from the content help, and I did not press the enter button to fill it in automatically. I just typed "HOUR_OF_DAY". I typed both ends of parens ")" at the end of the line too, I did not click the tab.

My cursor is at the end of the line, and I type:

Eclipse inserts; AFTER the cursor! So when I press enter, the semicolon will move to the next line!

I tried everything I could think of in the settings. I turned on the "auto smeicolon" option, which should automatically put semicolons at the end of the line, but that doesn't fix it.

One key: if I press "ENTER" before entering ";" at the end of the line, the content support window goes off and; inserted correctly with the cursor, now afte ;. Therefore, the content assistant is messing with me.

Any help is appreciated.

+6
eclipse
source share
2 answers

Go to Window β†’ Settings β†’ Java β†’ Editor β†’ Entering and unmarking the semicolon in Auto Insert in the correct position group.

0
source share

Yes, I just started to see this exact behavior after changing some of my preferences, I switched them back, and the behavior returned to normal.

Settings> Java> Editor> Content Assist:

Auto Activation Settings

These settings are default values ​​and do not create the bad behavior that you describe.

When I saw the unwanted behavior, I had a delay of 50 ms set, and the automatic activation triggers were set to " .(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "

0
source share

All Articles