简体   繁体   English

Eclipse CTRL + SPACE删除文本

[英]Eclipse CTRL+SPACE deletes text

Somehow the CTRL + SPACE handling in Eclipse changed twice in the last weeks when existing text stands after positions in which we use it. 不知何故,当现有文本位于我们使用它的位置之后,Eclipse中的CTRL + SPACE处理在过去几周内改变了两次。

Let's say I want to create a BufferedReader for a file: 假设我想为文件创建一个BufferedReader:

BufferedReader reader = new BufferedReader(something.filename);

Now I notice this doesn't work and I want to create a FileReader: 现在我注意到这不起作用,我想创建一个FileReader:

BufferedReader reader = new BufferedReader(new FileReader[CURSORPOSITION]something.filename);

However when I now hit CTRL + SPACE and choose the FileReader constructor from the list and hit ENTER , "something." 但是当我现在按下CTRL + SPACE并从列表中选择FileReader构造函数并按Enter键时 ,“有些东西”。 (the part up to or including the space) gets deleted. (删除或包括空格的部分)将被删除。 Did this behaviour change recently and is it configurable? 这种行为最近是否发生了变化,是否可以配置? I remember being amazed that CTRL + SPACE handling somehow got better with a recent update but it seems it didn't last. 我记得很惊讶CTRL + SPACE处理在最近的更新中变得更好但似乎并没有持续。

You have probably selected 'Completion overwrites' radio button on the Preferences>Java>Editor>Content Assist screen. 您可能已在“ 首选项”>“Java”>“编辑器”>“内容辅助”屏幕上选择了“完成覆盖”单选按钮。 'Completion overwrites' overwrites whatever follows the cursor position. “完成覆盖”会覆盖光标位置之后的任何内容。 The other option is 'Completion inserts'. 另一个选项是“完成插入”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM