0

I'm used to Visual Studio, where when you start typing System.Context list will appear and you will be able to choose not only from type names that start with Context, but also from names like ActivationContext.

This gives me the ability to quickly find a method just by guessing it's name. Especially important when I'm beginning to learn to program for Android. For example, I was sure that ListView must have a method for setting ListAdapter, but I was dumb enough not to figure it will be just setAdapter. In VS I would just type adapter and setAdapter would have appeared.

Is there something similar in Eclipse?

4

1 回答 1

1

在 Eclipse 中,您可以使用键盘快捷键Ctrl + Space,它会尝试为您建议项目。您可以在您已经开始输入一段“建议”之后执行此操作。它更严格一些:

示例:在 String 对象上,您尝试查找equalsIgnoreCase()(您的字符串称为test)。键入test.e然后CTRL + SPACE给出三个选项(endsWith, equals, equalsIgnoreCase)。如果您键入test.ignore,则CTRL + SPACE不会得到任何结果。对于过滤帮助,您可以使用test.然后CTRL + SPACE,它将显示所有结果,以便您可以通过这种方式进行搜索。

于 2013-03-08T15:57:06.737 回答