eclipse-jdt / eclipse.jdt.ui

Eclipse Public License 2.0
37 stars 92 forks source link

Code completion feature error #1377

Open xionggit opened 6 months ago

xionggit commented 6 months ago

"I'm using the latest version of Eclipse, version 202403, on Windows 10. My computer also has historical versions of Eclipse, 202206 and 202309. I'm using the DevStyle plugin." "I often find that when I'm writing code, the auto-suggested and auto-completed code often results in the deletion of carriage returns or line breaks, or selects additional characters such as ')' when code is automatically deleted. Please refer to the attached GIF recording, Pay attention to the mouse hovering position." eclipse-error Eclipse installation Destails 的Configuration("Configuration option under 'Installation Details' in Eclipse") config.zip

humphreygao commented 6 months ago

Please study these two configurations. I guess you select Completion overwrite. image

Here are the suggestions I have come up with regarding this issue:

  1. the IDE could automatically selects Completion inserts or completion overwrites according to the scenario.
  2. It is not necessary to automatically fill in parameters, because they are basically not the parameters you want. Therefore, the IDE should not check Fill method arguments and show guessed arguments by default. Unless the code completion make a breakthrough -- the estimated method parameters are correct after statistics.

The above two points have inertia: it is estimated that many contributors or users disagree. In the first point, I don't know the difficulty of implementation, but VS Code is based on eclipse, and it does a good job.

jukzi commented 6 months ago

Please use english only.

xionggit commented 6 months ago

你研究这两个配置就会了,你选择了Completion overwrites。 image

所以现在应该要求: 1.代码提示时,IDE根据场景,自动选择Completion inserts或者completion overwrites。 2.不需要在代码提示时,自动填充参数,因为基本都不是自己想要的参数。因此IDE应该默认不勾选 Fill method arguments and show guessed arguments,除非代码提示有所突破,猜出来的方法参数经过统计大概率都是对的。

上述两点,都有惯性:估计有很多人贡献者或者用户不同意。其中,第1点不知道实现难度啊,但VS Code是基于eclipse的,它就做的蛮不错的,我估计Eclipse实现难度不算太大。

是最佳选择的字符多了。

xionggit commented 6 months ago

Please use english only.

"I'm using the latest version of Eclipse, version 202403, on Windows 10. My computer also has historical versions of Eclipse, 202206 and 202309. I'm using the DevStyle plugin."

"I often find that when I'm writing code, the auto-suggested and auto-completed code often results in the deletion of carriage returns or line breaks, or selects additional characters such as ')' when code is automatically deleted. Please refer to the attached GIF recording, Pay attention to the mouse hovering position."

"Inserting the best guess parameters sometimes selects a range of 1-2 characters too much, or automatically selects the next line of code, resulting in confusion."