Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Currently the Eclipse autocompletion seems only to be triggered after a dot or on parameters, I want to use it for variables too, e.g. if I have

String test="hello";

then I want the autocompletion to suggest "test" if I start typing "t" in the next line (e.g. if I intent to change the value of the variable test).

Is there any Eclipse plugin capable of doing this? I already checked the Eclipse content assist options, but seems like there no option for what I want? Thanks for any hint!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
220 views
Welcome To Ask or Share your Answers For Others

1 Answer

First of all, thanks for all the replies. They are correct, however you have to press the key combination each time. Here's how it's done automatically:

That plug-in is not necessary any more. Just go to Preferences > Java > Editor > Content Assist and paste:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.

into the "Auto activation triggers for Java:" field.

This simply triggers auto activation after any English alphabet character and after dot. https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157#c12 Works fine :-)

Hint: You probably want to additionally set the auto activation delay to 0, at least if you are used to visual studio ;-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...