问题描述
这种行为使我垂涎三尺.
This behavior is dring me batty.
我输入以下内容:fileName.append(c.get(Calendar.HOUR_OF_DAY))
现在,当我键入内容助手时会弹出.我没有从内容帮助中选择HOUR_OF_DAY,也没有按Enter来自动填写它.我刚刚输入了"HOUR_OF_DAY".我也在行尾输入了两个结尾括号)",我没有按Tab键.
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插入;光标之后!因此,当我按Enter键时,分号将移至下一行!
Eclipse inserts the ; AFTER the cursor! So when I press enter, the semicolon moves to the next line!
我已经尽我所能在首选项中想到的一切.我打开了自动smeicolon"选项,该选项应该自动在行的末尾放置分号,但不能解决此问题.
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.
一个提示:如果我在键入;"之前按"ENTER"在该行的末尾,内容辅助窗口消失,并且;现在可以在光标之后正确插入;.因此,内容帮助让我感到困惑.
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.
感谢您的帮助.
推荐答案
是的,我只是在更改了一些首选项后才开始看到这种确切的行为,我将它们切换回原来的状态,然后恢复正常.
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.
首选项> Java>编辑器>内容辅助:
Preferences > Java > Editor > Content Assist:
这些设置是默认设置,不会产生您描述的不良行为.
These settings are the default and do not produce the bad behavior you describe.
当我看到不良行为时,我将延迟设置为50ms,并将自动激活触发器设置为".((abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
"
When I was seeing the unwanted behavior, I had the delay set to 50ms and the auto activation triggers set to ".(abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
"
这篇关于当不使用内容辅助输入全行时,在光标前插入Eclipse分号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!