Eclipse的自动完成刺激

问题描述:

我似乎经常在Eclipse的自动完成行为的一个特定的功能之旅。说我在Java编程,并开始code这样的方法调用:

I seem to frequently trip over a particular "feature" of Eclipse's autocomplete behavior. Say that I'm programming in Java and start to code a method call like this:

for (int i = 0; i < n; ++i) {
    thing.

当我键入时,Eclipse会弹出候选方法列表的事情。假设我选择办法(INT指数)。 Eclipse中插入我的选择:

When I type the ., Eclipse pops up a list of candidate methods for thing. Suppose I select method(int index). Eclipse inserts my choice:

for (int i = 0; i < n; ++i) {
    thing.method(index)

它还强调首页

和弹出的变量我可能要使用的列表。名单上的第一项是首页,第二个是 I 。不想从键盘移到我的手,我键入 I

It also highlights index and pops up a list of variables I might want to use. The first item on the list is index and the second one is i. Not wanting to move my hands from the keyboard, I type i.

问题是,我当时出于习惯通常preSS 输入来完成自动完成序列。不幸的是,这将导致Eclipse的选择与开始建议列表中的第一项我,这是首页。哎呀!为了避免这种情况,我需要或者:

The problem is, I then out of habit usually press enter to complete the autocompletion sequence. Unfortunately, this causes Eclipse to select the first item on the suggestion list that starts with i, which is index. Argh! To avoid this, I need to either:


  1. 记得preSS 设置页而不是输入键入后,我;

  2. 选择 I 从建议列表而不是键入它;

  3. preSS ESC 前pressing 输入摆脱建议名单(两次!)

  1. remember to press tab instead of enter after typing i;
  2. select i from the suggestion list instead of typing it;
  3. press esc (twice!) to get rid of the suggestion list before pressing enter.

通过所有这些,我不得不打断我的思考我的code,以思考如何使用Eclipse。

With all of these, I'm forced to interrupt my thinking about my code in order to think about how to use Eclipse.

我意识到,这是一个相当琐碎的问题啰嗦夸大其词,但我的确有一个问题。有没有在Eclipse中的任何设置(短关闭自动完成,这是否则非常有帮助的)或者(1)告诉它排在上面的建议列表暗道法律选择或(2)以其他方式告诉Eclipse,当我键入 I ,这就是我想要的吗?

I realize that this is a long-winded rant for a fairly niggling problem, but I do actually have a question. Are there any settings in Eclipse (short of turning off autocompletion, which is otherwise very helpful) to either (1) tell it to rank legal options above illegal ones in the suggestion list or (2) otherwise tell Eclipse that when I type an i, that's what I want?

在爪哇 - >编辑 - >内容辅助'preference页面设置填充方法参数并显示猜测争论到插入最佳猜测参数

In the 'Java -> Editor -> Content Assist' preference page set 'Fill method arguments and show guessed arguments' to 'Insert best guessed arguments'