简体   繁体   中英

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.

Let's say I want to create a BufferedReader for a file:

BufferedReader reader = new BufferedReader(something.filename);

Now I notice this doesn't work and I want to create a 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." (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.

You have probably selected 'Completion overwrites' radio button on the Preferences>Java>Editor>Content Assist screen. 'Completion overwrites' overwrites whatever follows the cursor position. The other option is 'Completion inserts'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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