score:28

Accepted answer

eclipse 2018-12 was already patched for this!

a patch for bug 348857 was recently merged to the eclipse project and was released as part of eclipse 2018-12. you can download that version here.

you now have a new option to disable all insertion triggers apart from enter, which will prevent spacebar from causing autocompletion.

simply go to preferences... -> java -> editor -> content assist (or window -> preferences -> java -> editor -> content assist on windows) and select disable insertion triggers except 'enter', as shown in the screenshot below: disable insertion triggers preferences

score:-4

you could disable auto activation via the check box in

window -> preferences -> java/editor/content assist

and activate the auto-complete feature on demand. the default hotkey for this is

ctrl+space

score:-3

in eclipse go to window -> preferences -> general -> keys and remove the binding for the command content assist.

score:0

same configuration as davnicwil, same issue, still on eclipse 4.4.

solution: intercept (hook) shift+space (press and hold) on (editor-window) eclipse and replace it with esc,space (sequence). now you my decide between

  • autocomplete+space: press space when autosuggestion present
  • just space: press predefined key combination or sequence (e.g. shift+space)

on windows you may use http://www.heise.de/download/activaid.html (you can also use autohotkey, java native hook, ...)

howto with activaid:

  1. open ac'tivaid, select "userhotkeys"
  2. click on "+", set a description
  3. click on "short cut", press e.g. shift+space
  4. command: "{esc}{space}" (without quotes)
  5. click "+", select eclipse editor frame, press enter
  6. click ok, ok in ac'tivaid

my config file:activaid/settings/ac'tivaid.ini:[userhotkeys]

hotkey11=+space
path11=<send>{esc}{space}
description11=eclipse shift+space -> esc,space
category11=
application11=ahk_class swt_window0

you may also remap keys on non-english keyboards with "hotstrings", e.g. ö->{,ä->} etc.

score:0

finally worked it out.

try download this org.eclipse.jface.text.jar and copy it to your plugin folder(typically eclipse/plugin). do not forget to backup your own one.

works on eclipse juno.

if the link doesn't work, comment on this, thanks.

score:3

the spacebar has been a key to select the autocomplete even in indigo. to my knowledge, this can't be configured. in fact, that is probably why the delay exists.

i suggest setting the delay to some optimal value that allows you to type things like private void ... comfortably without triggering suggestions for private and void. then in case you get a suggestion because you waited too long, press escape to abort content assist.

score:7

use a sdk version of eclipse

1.open plug-ins view and find org.eclipse.jface.text, right click, choose import as source project. after import, you find it in your workspace.

2.in src/org/eclipse/jface/text/contentassist/completionproposalpopup.java

char[] triggers = t.gettriggercharacter();
if(contains(triggers,key))

change to

if(key!='='&&key!=0x20&&contains(triggers,key))

3.export org.eclipse.jface.text

right click the project folder of org.eclipse.jface.text, choose export-->deployable plugins and fragments, next, destination choose archive file, finish. replace the one in eclipse/plugins with the one you generate.

score:26

there is a solution on the issue tracker for this. copy the jar in the eclipse/dropins folder. with the next restart space is diabled as autocompletion trigger.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=348857

eclipse 12-2018 and newer: this is working natively, check pyves answer.


Related Query

More Query from same tag