使 Eclipse 智能感知/自动建议自动用于本地范围和成员变量/方法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3900818/
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
Make Eclipse intellisense/auto-suggest automatic for locally scoped and member variables/methods
提问by Garcon
Is there any way to make the auto-suggest drop down list appear for locally scoped variables and local member variables/methods without having to push ctrl+space? Like Visual Studio does? It appears automatically for members of objects after getting as far as typing 'object.'
有没有办法让自动建议下拉列表出现在本地范围变量和本地成员变量/方法中,而不必按 ctrl+space?像 Visual Studio 那样?在输入“object”后,它会自动为对象成员显示。
I'm finding myself typing a couple of letters and hitting ctrl+space straight away when it would be far more efficient for me if I could see the list to know if typing more letters, or tapping the down key was going to be quickest...
我发现自己输入了几个字母并立即按 ctrl+space ,如果我能看到列表以了解输入更多字母或点击向下键是否最快,这对我来说效率会更高。 ..
I can't find this option in the settings so was wondering if there's some other way of achieving what I'm after.
我在设置中找不到这个选项,所以想知道是否还有其他方法可以实现我所追求的目标。
Thanks, Sam.
谢谢,山姆。
回答by JRL
You can put whatever characters you want in the activation trigger box (default is just a single "."):
您可以在激活触发框中输入您想要的任何字符(默认值只是一个“.”):
回答by User_86
Go to Window -> Preference -> Java -> Editor -> Content assist
转到窗口 -> 首选项 -> Java -> 编辑器 -> 内容辅助
"Auto activation -> auto activation for trigger for Java:" then mentioned the character on which you want to get pop up. then ok.
“自动激活 -> Java 触发器的自动激活:”然后提到了您想要弹出的字符。那么好的。
回答by musiKk
Never knew about Ctrl-O. Do you mean Ctrl-Space? Try it. I think this is the closest to Intellisense Eclipse has to offer and the most useful shortcut there is.
从来不知道 Ctrl-O。你的意思是Ctrl-空格键吗?尝试一下。我认为这是最接近 Intellisense Eclipse 所提供的,也是最有用的快捷方式。