well I've seen in Tips & Tricks of Eclipse that it's possible to get a variable name generated by eclipse by clicking Ctrl + Space. However I'm getting empty suggestions. Fors instance I'm typing this and click ctrl + space:
private Color
And I am supposed to get some name suggestions on it? All I'm getting is an empty list of suggestions. So what's turned off? Any idea?
Thanks in advance.
This is what I want to achieve:
I believe you are trying to get variable name e.g. color
after private Color
where Color
is you class i.e. private Color color
. I see that working in my eclipse.
To verify your settings, go to below settings and verify as they look good to you.
Windows -> Preferences -> Java -> Editor ->Content Assist
and
Windows -> Preferences -> Java -> Editor ->Content Assist -> Advanced
This is the default behavior after entering a Java type and a space, and then pressing CTRL+Space to activate auto-complete. For example, if you enter:
private Color
then activate auto-complete it will suggest some variable names for you.
An easier way than having to press CTRL+Space all the time is to change the characters which automatically activate auto-complete. I find it very useful to have all characters which could possible be variable names to activate auto-complete. Try having ._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
as Auto activation triggers for Java
found in Preferences -> Java -> Editor -> Content Assist:
This way you can achieve how Visual Studio handles auto-complete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With