[英]Eclipse autocompletion for jdk.* packages does not work
I write here because I noticed a strange behaviour of Eclipse IDE (2022-12).我写在这里是因为我注意到 Eclipse IDE (2022-12) 的奇怪行为。
Basically, the autocompletition does not work properly when I use a class from a jdk.*
package.基本上,当我使用来自
jdk.*
package 的 class 时,自动完成无法正常工作。
For example:例如:
import jdk.jshell.*;
public class Test {
private static final JShell JSHELL = JShell.create();
...
...
public static void main(String[] args) {}
}
Now when I write JSHELL.
现在写
JSHELL.
(eg, inside the main method), I get only proposal for the methods of the Object
class. No specific proposal is available. (例如,在 main 方法内部),我只得到
Object
class 方法的建议。没有具体的建议可用。
What am I doing wrong?我究竟做错了什么?
Thanks.谢谢。
Tried updating & reinstalling Eclipse.尝试更新和重新安装 Eclipse。
jdk.*
is filtered by default. jdk.*
默认过滤。
When you want to use something of jdk.*
in a project, go to the preferences Java > Appearance > Type Filters and uncheck the item jdk.*
.当你想在项目中使用
jdk.*
的东西时,go 到首选项Java > Appearance > Type Filters并取消选中项目jdk.*
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.