开发者

Eclipse code completion problem

开发者 https://www.devze.com 2023-04-05 10:08 出处:网络
why doesn\'t eclipse match the argument while doing code completion. In the following example it should have automatically matched the thro开发者_开发知识库wable. In stead it shows arg1 as the first o

why doesn't eclipse match the argument while doing code completion. In the following example it should have automatically matched the thro开发者_开发知识库wable. In stead it shows arg1 as the first option.

Eclipse code completion problem


The autocomplete options in Eclipse for auto-completed method arguments, start with the parameter names found in the source distribution (that contains the class with the method). If no source distribution is available, then it will use the parameter names as indicated in the binary distributions i.e. in the compiled byte code. This is the default behavior

If you want to change this behavior of inserting parameter names from source code or binaries to inserting the best guessed arguments (including local variables), then you can configure the auto-complete options of Eclipse to do so, as shown in the following screenshot:

Eclipse code completion problem

This will produce the desired result of automatically displaying the options containing the list of best-guessed arguments. This also seems to avoid suggesting parameter names:

Eclipse code completion problem


I guess arg1 is thing you already typed. So the proposal eclipse can provide is trying to find something which start from arg1. So it puts it as the first choice.

You can type t , and try Alt+/ , to see if this is the reason.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号