Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Validate Autocomplete in Eclipse

Coming from Visual Studio and starting a project in Java, I realized I couldn't cope with having to press ctrl+space to have the autocomplete panel show up. An easy workaround was to set all keyboard characters to be trigger characters for autocompletion.

My only problem is that, when presented with autocomplete suggestions, a single press on the space bar will write the first proposition. In situations where I'm happy with the suggestions, that's just fine. In situations where I actually want to use what I wrote down initially, I have to press 'escape' first to remove the autocomplete panel before I can press 'space' safely.

Netbeans doesn't use the space bar as a validating key for autocompletion (only 'enter' does that) and I like that behavior. Any way to replicate it in Eclipse?

Thanks in advance for your answers!

EDIT: I should have mentioned I'm using Eclipse on the Mac.

Guillaume

like image 425
guidupuy Avatar asked Sep 10 '11 12:09

guidupuy


People also ask

How do I show autocomplete in eclipse?

Step 1: Open your Eclipse or Spring Tool Suite, then go to the Window > Preferences as shown in the below image. Step 2: In the next screen go to the Java > Editor > Content Assist > Auto activation triggers for Java as shown in the below image.

Is there IntelliSense in eclipse?

Microsoft Visual Studio has a famous feature called IntelliSense. Eclipse has a similar built in feature called "Code Assist" which I find very useful. Code Assist is triggered automatically in a number of situations (for example, typing the "." after a variable name or class name).

How do I autocomplete variables in Eclipse?

it only works after you have created some variables. you type the first letter/letters and when you click ctrl + space you get a list of all the variables that start with that letter/letters. it's an auto-complete tool...


1 Answers

I have the same problem with Eclipse Indigo on Windows XP actually. Coming from intellij idea, I also felt the need to set the whole keyboard to trigger auto-complete.

A quick proof that SPACE key does accept suggestions : type inte on a new line. If the auto-complete menu shows, press SPACE. It goes for Integer.

If anyone knows how to set the SPACE key to "ignore suggestions", it would be great, because the escape key on my keyboard is also too far away :)

Thanks

Edit : actually the best would be to have only the ENTER key validating, because ';' and '(' also seem to validate

like image 105
Arnaud P Avatar answered Oct 29 '22 16:10

Arnaud P