改进 Eclipse 自动完成功能? [英] Improving Eclipse autocompletion?

查看:37
本文介绍了改进 Eclipse 自动完成功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前 Eclipse 自动完成似乎只在点或参数后触发,我也想将它用于变量,例如如果我有

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

String test="hello";

然后,如果我在下一行开始输入t"(例如,如果我打算更改变量 test 的值),我希望自动完成建议test".

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

是否有任何 Eclipse 插件能够做到这一点?我已经检查了 Eclipse 内容辅助选项,但似乎没有我想要的选项?感谢您的任何提示!

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!

推荐答案

首先感谢大家的回复.它们是正确的,但是您每次都必须按下组合键.这是自动完成的方式:

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:

不再需要那个插件了.就去首选项 > Java > 编辑器 > 内容辅助并粘贴:

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

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.

进入Java 的自动激活触发器:"字段.

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

这只是在任何英文字母字符和点之后触发自动激活.https://bugs.eclipse.org/bugs/show_bug.cgi?id=159157#c12工作正常:-)

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

提示:您可能还想将自动激活延迟设置为 0,至少如果您习惯了 Visual Studio ;-)

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

这篇关于改进 Eclipse 自动完成功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆