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

Categories

0 votes
222 views
in Technique[技术] by (71.8m points)

java - Improving Eclipse autocompletion?

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

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

1 Answer

0 votes
by (71.8m points)

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 ;-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...