11

Okay, so my issue is when I am creating a variable, lets say for example "Object o" while I am typing "o" it'll suggest something like "object". Which is okay but when I press space it auto fills in the new name. Basically I don't want to turn off auto completion I just want to disable space auto filling the suggestion in. Even to disable variable naming suggestions would work.

I'm using Eclipse Juno Service Release 1.

zb226
  • 9,586
  • 6
  • 49
  • 79
Fiachra
  • 125
  • 1
  • 2
  • 9
  • Since the space character isn't part of a valid identifier, what should it do instead? – nitind Feb 14 '13 at 16:47
  • 3
    Well basically I just want space to stop filling in the names it suggests so essentially I want space to do nothing. Like I'll be typing Object obj = new Object(); for example and while I'm typing "obj" it'll suggest something like "objObject" and as soon as I hit space it applies it. So now my object will look like "Object objObject = new Object()" which just annoys me since I'll have to go back and change the name. – Fiachra Feb 14 '13 at 17:24

5 Answers5

14

I know it's an old question but since non of the answers here worked for me, and this problem was really annoying me too, I am adding solution that helped me.

In your Eclipse go to: Window/Preferences/Java/Editor/Content Assist

and enable:

Disable insertion triggers except 'Enter'

screen/shotted

Hopefully that will work for everyone!)

Alien
  • 141
  • 1
  • 3
3

As there isn't any definitive solution for this yet, what I find works best is to disable the alphabetic characters from triggers:

Windows > Prefereces > Java > Editor > Content Assist > Auto activation triggers for Java

This will mean no class name / type completion, but method name completion will still be suggested when you pressed dot, however at least Eclipse stop messing with my variable name

gerrytan
  • 40,313
  • 9
  • 84
  • 99
1

Go to Window/Preferences/Java/Editor/Content Assist and choose settings that works for you.

rebeliagamer
  • 1,257
  • 17
  • 33
  • 9
    No option there solves my problem. I dunno maybe I can only disable it by turning off auto completion entirely. Which is annoying since it's driving me mad. – Fiachra Feb 14 '13 at 16:03
  • You can turn of auto filling and use ctrl+space for filling when you want it. I use Eclipse SDK 4.2.1 and it was a default settings. It's all I got, sorry. – rebeliagamer Feb 16 '13 at 11:51
  • yeah I didn't think I could do exactly what I wanted, but I appreciate the help! – Fiachra Feb 18 '13 at 09:17
1

I realize this is a 3 year old post, but...

From what I can gather, there isn't an option to disable this, it was hard coded into the content assist feature. But there is a plugin that you can download from the answer to this stack overflow question that will disable this feature

Lightfire228
  • 546
  • 1
  • 5
  • 17
0

Window -> Preferences -> Java -> Editor -> Content Assist -> Advanced I turned off Java Type Proposals and made sure Java Proposals is turned on. By the way this is in Spring Tool Suite I haven't checked using eclipse.