Eclipse 插件:应有的自动完成

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7474940/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:01:02  来源:igfitidea点击:

Eclipse plugin: AutoComplete as it should be

javaeclipseautocompleteeclipse-plugin

提问by Jordy Langen

I have a problem, with multiple possible solutions.

我有一个问题,有多种可能的解决方案。

I'm doing a Computer Sience study and I'm working as an intern at the moment. My assignment is to make a business application for Android & iOS. I've been working for 2 years with Visual studio 2010 now, Xcode is rather simular so that's no biggy, Eclipse on the other hand is not as what I'm used to, I'm not saying it's bad. I have enjoyed Eclipse so far but now i'm constantly using Xcode and Eclipse

我正在攻读计算机科学,目前正在实习。我的任务是为 Android 和 iOS 制作一个商业应用程序。我现在已经在 Visual Studio 2010 上工作了 2 年,Xcode 相当相似,所以没什么大不了的,另一方面 Eclipse 不像我习惯的那样,我并不是说它很糟糕。到目前为止,我一直很喜欢 Eclipse,但现在我一直在使用 Xcode 和 Eclipse

Now hold on there before you answer! I know there is an autocomplete in Eclipse but it will only pop after you push Ctrl + Space or after one of the maximum of four Auto activition triggers is, well, triggered.

现在在你回答之前坚持下去!我知道 Eclipse 中有一个自动完成功能,但它只会在您按下 Ctrl + Space 或最多四个自动激活触发器之一被触发后弹出。

So my question is:

所以我的问题是:

Is there any tool that does trigger auto complete after every keystroke or something? I tried looking at making my own Eclipse plugin but it was way to hard with zero knowlegde about the Eclipse API, although tutorials considering the Auto Complete features are welcome! (they should cover classes like ContentAssistCommandAdapter)

是否有任何工具可以在每次击键后触发自动完成?我尝试着制作我自己的 Eclipse 插件,但是对于 Eclipse API 的零知识,这很难,尽管欢迎考虑自动完成功能的教程!(他们应该涵盖像这样的课程ContentAssistCommandAdapter

Thanks in advance!

提前致谢!

回答by jefflunt

The delay between keystroke and pop-up is configurable. So, as an alternative to a plug-in, you can adjust the autocomplete settings to pop-up after a shorter period of time, such as 1/10th of a second.

击键和弹出之间的延迟是可配置的。因此,作为插件的替代方案,您可以调整自动完成设置以在更短的时间后弹出,例如 1/10 秒。

Eclipse preferences ->
  Java ->
    Editor ->
      Content Assist -> 
        Enable Auto Activation
        Auto activation delay (ms)

(showing Mac OX 10.6, running Eclipse "Indigo" release, but the option has been around forever):

(显示 Mac OX 10.6,运行 Eclipse“Indigo”版本,但该选项一直存在)

enter image description here

在此处输入图片说明